'sass' in a non thread-safe way

前端 未结 3 2042
甜味超标
甜味超标 2021-02-01 20:32

I\'m getting these warnings when trying to use sass in Rails 3.1 rc1.

WARN: tilt autoloading \'sass\' in a non thread-safe way; explicit requir         


        
3条回答
  •  遥遥无期
    2021-02-01 21:07

    I had the same problem, and was able to solve it by compiling assets locally before pushing to Heroku as mentioned in the article Rails 3.1+ Asset Pipeline on Heroku Cedar

    RAILS_ENV=production bundle exec rake assets:precompile
    

    I also tried Itecedors suggestion which also worked:

    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
    

提交回复
热议问题