heroku push error: “Could not detect rake tasks”

后端 未结 10 1203
离开以前
离开以前 2020-12-04 01:19

I\'m trying to deploy a basic app and it\'s not working. Using

git push heroku master 

I got this error message:

remote:          


        
10条回答
  •  庸人自扰
    2020-12-04 01:55

    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 yr 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"

    Sample:

提交回复
热议问题