rails/sass-rails — Issue #92: undefined method `members' for nil:NilClass
Author: jweslley
Created: 2012-02-12 18:45:18+00:00
State: open

In order to reproduce this error, follow the steps below:

1. create a app using rails 3.2.1: `rails new sass-rails-assets-helpers`
2. `cd sass-rails-assets-helpers`
3. `bundle install`
4. Rename `app/assets/stylesheets/application.css` to `app/assets/stylesheets/application.css.scss`
5. Add the some style using asset helpers, like:

body {
background-image: image-url('rails.png');
}

6. generate the assets: `RAILS_ENV=production bundle exec rake assets:precompile --trace`

Then, the error comes up:

undefined method `members' for nil:NilClass
(in /data/code/sass-rails-assets-helpers/app/assets/stylesheets/application.css.scss)
/home/jonhnny/.rvm/gems/ruby-1.9.3-p0@class_imoveis/gems/sass-3.1.15/lib/sass/tree/visitors/to_css.rb:137:in `block in visit_rule'
/home/jonhnny/.rvm/gems/ruby-1.9.3-p0@class_imoveis/gems/sass-3.1.15/lib/sass/tree/visitors/to_css.rb:18:in `with_tabs'
/home/jonhnny/.rvm/gems/ruby-1.9.3-p0@class_imoveis/gems/sass-3.1.15/lib/sass/tree/visitors/to_css.rb:126:in `visit_rule'
/home/jonhnny/.rvm/gems/ruby-1.9.3-p0@class_imoveis/gems/sass-3.1.15/lib/sass/tree/visitors/base.rb:37:in `visit'
/home/jonhnny/.rvm/gems/ruby-1.9.3-p0@class_imoveis/gems/sass-3.1.15/lib/sass/tree/visitors/to_css.rb:10:in `visit'
...