Does the compass-rail gem not start in heroics?

My gemfile recently updated my compass gem. I started getting the following error (production only for the hero - it works fine locally) and got stuck on it for several hours:

Completed 500 Internal Server Error in 14284ms 2012-09-03T20:53:25+00:00 app[web.1]: 2012-09-03T20:53:25+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: compass/css3. 2012-09-03T20:53:25+00:00 app[web.1]: Load path: Sass::Rails::Importer(/app/app/assets/stylesheets/application.css.scss) 

I think part of the problem should be that / app / app / appears here, but I don't understand why. When I change the compass configuration below to โ€œassets / style sheetsโ€, I still see / application / application / in the trace error.

production.rb:

  # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = false 

compass.rb

 # Require any additional compass plugins here. project_type = :rails sass_dir = "app/assets/stylesheets" 

Gemfile

 group :assets do gem 'sass-rails' gem 'coffee-rails' gem 'uglifier', '1.2.4' gem 'yui-compressor', '0.9.6' gem 'compass-rails' end 

In my application.css.scss file:

 @import "compass/css3"; 

I have tried every solution I can find without any luck so far

Is something sticking out?

+4
source share
2 answers

Yes, moving compass rails from: assets works, but is not an ideal solution.

Checking the result of clicking on the hero, I found

 Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! 

But it compiles locally with

 RAILS_ENV=production rake assets:precompile 

The solution is not to create an instance of the database when recompiling the assets. In config / application.rb:

 config.assets.initialize_on_precompile = false 

See this problem in the compass-rails project:

https://github.com/Compass/compass-rails/issues/19

+5
source

I upgraded my rails to 3.2+ and ended up moving compass rails outside the asset group to make it work. I do not understand why this works, but it seems to be a trick.

0
source

Source: https://habr.com/ru/post/1432154/


All Articles