Rails deployemnt Issue,rake task not detect

298 Views Asked by At

remote: ! remote: ! 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: ! rake aborted! remote: ! translation missing: en.Slack.Channels.MissingVariable remote: ! /tmp/build_00c6e226/config/application.rb:15:in block in <class:Application>' remote: ! /tmp/build_00c6e226/vendor/bundle/ruby/3.0.0/gems/slack-ruby-client-1.0.0/lib/slack/config.rb:18:in configure' remote: ! /tmp/build_00c6e226/config/application.rb:13:in <class:Application>' remote: ! /tmp/build_00c6e226/config/application.rb:11:in module:SparechangeApi' remote: ! /tmp/build_00c6e226/config/application.rb:9:in <main>' remote: ! /tmp/build_00c6e226/Rakefile:4:in require_relative' remote: ! /tmp/build_00c6e226/Rakefile:4:in `'

1

There are 1 best solutions below

1
Qasim Ali On

Sometimes Heroku throws an issue on deployment about assets. You can precompile assets and push it to Heroku.

RAILS_ENV=production bundle exec rake assets:precompile

Update:

In case of it doesn't work, make sure to add RAILS_SERVE_STATIC_FILES env. to your server.

Make it enabled or true nor anything :)

Because in Rails <5.1 production.rb has

config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

Heroku: App -> Settings -> "Reveal Config Vars"

enter image description here