'rake --tasks' in an new Rails project fails (for no obvious reason)

Steps to reproduce:

  1. Create a new project using the Rails application template
  2. Run `bundle install`

```

Error:[rake --tasks] Running via Spring preloader in process 20537
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/home/derrell/.rvm/gems/ruby-2.7.2/gems/rake-13.0.3/lib/rake/application.rb:698:in `raw_load_rakefile'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/rake-13.0.3/lib/rake/application.rb:104:in `block in load_rakefile'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/rake-13.0.3/lib/rake/application.rb:103:in `load_rakefile'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/rake-13.0.3/lib/rake/application.rb:82:in `block in run'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/rake-13.0.3/lib/rake/application.rb:80:in `run'
/home/derrell/RubymineProjects/show_spring_rake_bug/bin/rake:5:in `<main>'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/spring-2.1.1/lib/spring/command_wrapper.rb:40:in `call'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/spring-2.1.1/lib/spring/application.rb:220:in `block in serve'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.3/lib/active_support/fork_tracker.rb:10:in `block in fork'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.3/lib/active_support/fork_tracker.rb:8:in `fork'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.3/lib/active_support/fork_tracker.rb:8:in `fork'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.3/lib/active_support/fork_tracker.rb:26:in `fork'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/spring-2.1.1/lib/spring/application.rb:180:in `serve'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
/home/derrell/.rvm/gems/ruby-2.7.2/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
/home/derrell/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
/home/derrell/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
-e:1:in `<main>'

```

Project uploaded as: 2021_03_16_2nFpmfbVv7FxU3Mr (file: spring_rake_bug.tar)

I know this problem "goes away" if something changes, but I can't identify what that special something is at the moment, and it seems like this really ought to work early on (in my case, I was needing to "fix itself" after adding `gem 'rspec-rails'` to a project, and wanting to run `rake rspec:install` after `bundle install`.

Please sign in to leave a comment.