'sass' in a non thread-safe way

前端 未结 3 2049
甜味超标
甜味超标 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 20:59

    On Heroku I was getting this same error and googling did not help me find the problem, so I thought I would add what I found to this questions since it comes up first when searching.

    The problem was NOT this error, it was a smaller error while pushing the code up to Heroku. After the gems are listed these lines got me on the path to the answer:

    Running: rake assets:precompile
    rake aborted!
    Tasks: TOP => environment
    (See full trace by running task with --trace)
    Precompiling assets failed, enabling runtime asset compilation
    Injecting rails31_enable_runtime_asset_compilation
    Please see this article for troubleshooting help:
    http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting
    

    I had just been configuring Redis on Heroku so I knew that the problem had to be something related to those changes. At that URL I found this:

    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

    Adding the on_precompile = false line fixed all the errors, including the original one in this question.

提交回复
热议问题