Rails + Heroku : We're sorry, but something went wrong

后端 未结 2 936
小蘑菇
小蘑菇 2021-01-23 12:25

Hi this is my first time trying to push a project up to Heroku and I am getting the error: We\'re sorry, but something went wrong. I\'m not sure how to read the her

2条回答
  •  不思量自难忘°
    2021-01-23 12:44

    Google with WARN: tilt autoloading 'sass' in a non thread-safe way; explicit require 'sass' suggested.

    I found this answer: https://stackoverflow.com/a/12859696/1008230
    Looks like the assets need be compile locally.

    Here's some reference:

    For faster asset precompiles, you can partially load your application by setting config.assets.initialize_on_precompile to false in config/application.rb, though in that case templates cannot see application objects or methods. Heroku requires this to be false.

    http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets

    While precompiling assets, in Rails 3.1.1 and up, you can prevent initializing your application and connecting to the database by ensuring that the following line is in your config/application.rb: config.assets.initialize_on_precompile = false

    https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar#troubleshooting

    Haven't try it myself, hope that helps.

提交回复
热议问题