Rails 3.1.3 getting an error on an intermediate server when compiling assets using compass + sussy + haml + scss

My application works fine in a development environment with compass and sussy for haml and scss, and the Gemfile configuration for the application is: Gist for Gemfile

and my application.rb options are as follows: -

if defined?(Sass)
 config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
 config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets" 
 config.sass.load_paths << "#{Gem.loaded_specs['compass-susy-plugin'].full_gem_path}/sass"
end
 config.assets.precompile << /(^[^_]|\/[^_])[^\/]*/

But when I deploy my application to the server. What is in the intermediate environment. Always throwing me an error -:

Error compiling asset application.css:
    Sass::SyntaxError: Undefined variable: "$base-font-size".
    (in /var/www/App-staging/releases/20120405100127/app/assets/stylesheets/_mobile-first.scss)
    Served asset /application.css - 500 Internal Server Error

And if I try some hacks and corrections, give me an error -:

Compiled application.css  
Completed 500 Internal Server Error in 419ms

ActionView::Template::Error (File to import not found or unreadable: compass/css3/.
Load path: Sass::Rails::Importer

So maybe this is a problem with the version of Compass and rails? Ans has a permanent solution to get rid of this or any working configuration for an intermediate and production environment. Thanks for the help.

+3
2

, SASS

"import _mobile-first";

, rails 3.1

mobile_first.css.erb.scss

: .

, scss, erb .

<%= asset_path 'twitter.png' %>

. 0.12.1.

, .rb

if defined?(Sass)
 config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
 config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets" 
 config.sass.load_paths << "#{Gem.loaded_specs['compass-susy-plugin'].full_gem_path}/sass"
end

. . application.rb

, .

 config.assets.precompile << /(^[^_]|\/[^_])[^\/]*/

, mobile_first.scss, application.scss?

+1

, : RAILS_ENV , :

bundle exec rake assets:precompile RAILS_ENV=staging

?

0

All Articles