-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uninitialized constant Sass::Rails::SassTemplate in production #447
Comments
I have this issue as well. The error ends up pointing to https://github.com/rails/sass-rails/blob/3-1-stable/lib/sass/rails/railtie.rb line 38. Considering those classes do actually exist I'm assuming there's some loading-order issue going on? |
I've created the same issue in sass-rails: #447 |
Does this have a relation to #437 ? |
ok, i'm switching back to Rails 3.0.10 |
I got this error en development and test. It turned out to be because I've upgraded from Rails 3.1.0.rc5 to Rails 3.1.0 without updating the core files: If you upgraded Rails to version 3.1.0 (maybe from a 3.1 release candidate) and it worked before the upgrade then you might just need to update the files generated by the require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end The important part is the |
i have exactly that code in my config/application.rb, but it throws that error, but only in production, in development and test it works ok. probably it crashes becouse it wants to compile assets or something like that. |
tracedwax found solution - move sass-rails out of assets group, so that sass-rails will be loaded in active_admin: rails/sass-rails#38 (comment) |
I tracked the problem to |
It's a bad idea to rely on the environment, instead you should rely on the configuration that the environment establishes. In this case, |
I am not sure if that's entirely correct either. |
Agree. |
that error points to:
gems/ruby-1.9.2-p290@farmera/bundler/gems/active_admin-d6293514b99d/lib/active_admin/sass/helpers.rb:3:in `'
helpers.rb:3 :
require 'sass-rails' if ActiveAdmin::DependencyChecker.rails_3_1?
any ideas how to fix it?
The text was updated successfully, but these errors were encountered: