Osborne Saka
Osborne Saka

Reputation: 509

Could not detect rake tasks when deploying a rails app

I am trying to deploy a rails (version 6.1.0) app on heroku and getting a couple of errors. My bundler version is 2.2.4. I have tried following things but still getting the same error

  1. Running $ bundle exec rake -P
  2. Run RAILS_ENV=production bundle exec rake assets:precompile
  3. Changing the BUNDLED WITH version to 2.1.4
  4. Tried deploying on Digital Ocean App

All these gave me the this error message

Could not detect rake tasks
remote:  !     ensure you can run `$ bundle exec rake -P` against your app
remote:  !     and using the production group of your Gemfile.
remote:  !     /tmp/build_955ddefb/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
remote:  !     from /tmp/build_955ddefb/config/boot.rb:4:in `<top (required)>'
remote:  !     from /tmp/build_955ddefb/bin/rake:3:in `require_relative'
remote:  !     from /tmp/build_955ddefb/bin/rake:3:in `<main>'

Upvotes: 1

Views: 262

Answers (1)

pierrecode
pierrecode

Reputation: 222

Which is your Heroku version ? I work on Rails 6.0.4, bundle 2.1.4, I solved this problem with rake assets:precompile and before my push I downgrade to heroku-18 heroku stack:set heroku-18. Hope can be helpful.

Upvotes: 0

Related Questions