EDIT
This question should be: Why is rails_admin causing rake asset:precompile to fail?
I’m upgrading from Rails 3.0 to 3.1 and enabling the asset pipeline. Somewhere along the way, rails_admin broke my asset precompiling:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
Undefined variable: "$red".
(in /tmp/build_zkm1tzzdhdh6/vendor/bundle/ruby/1.9.1/bundler/gems/rails_admin-a887eee6e916/app/assets/stylesheets/rails_admin/base/theming.css.scss)
Tasks: TOP => assets:precompile:primary
(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
What’s going on here? $red is defined (in a different rails_admin .css file). So why isn’t theming.css.scss able access it? How do I avoid this?
I fixed this in the file config/environments/production.rb:
I replaced the line
to another
This solution is working for ruby 1.9.3 and rails 3.1