3

I am trying to deploy my aplication on server and using staging environment . But its keep giving me this error on staging environment .

undefined method `sass' for #Rails::Application::Configuration:0x1cf3338

On my development environment local its working fine. In my application i am using the compass and susy framework , my Gemfile look like this https://gist.github.com/2003755

I am trying it to configure this from past 2 days , but still not find a way to make it work . Previously this configuration is working fine . Suddenly after my last deployment every thing broke down . Thanks

3
  • How do you deploy your application? bundle install is run after the deploy? Mar 9, 2012 at 6:51
  • Using capistrano.After every deployment i run bundle install . Mar 9, 2012 at 6:56
  • This bundle install is do before your Exception. You have this gem install on your server ?
    – shingara
    Mar 9, 2012 at 8:53

1 Answer 1

3

If you're configuring sass from your application.rb then although the sass stuff is only used for asset precompilation (which I presume you are using) Rails will always try and configure sass.

Since in staging the app boots without the assets group loaded, sass-rails isn't loaded and so everything falls over. You could either move sass-rails to the main bit of your gemfile, or possibly bracket the bit of your application.rb which configures sass with

if defined?(Sass)
  ...
end

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.