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

Can't use image-path or asset-path with Rails 3.2.0.rc1 #81

Closed
nragaz opened this Issue Dec 20, 2011 · 42 comments

Comments

Projects
None yet
@nragaz
Contributor

nragaz commented Dec 20, 2011

I created a new, barebones Rails 3.2.0.rc1 application and tried to use image-path and asset-path from within a .scss file. It seems like the environment isn't being set up correctly - I'm getting an undefined method [] on nil error related to the options hash.

I've created a sample application here: https://github.com/nragaz/image-path-rails-32

I tried to dig into this but frankly the interrelations between sass-rails, sprockets, and rails itself are a beast.

@Psli

This comment has been minimized.

Show comment
Hide comment
@Psli

Psli commented Dec 20, 2011

@aaronchi

This comment has been minimized.

Show comment
Hide comment
@aaronchi

aaronchi Dec 20, 2011

all stylesheet related inclusions seem to be fubar in 3.2.rc1

Can't load bourbon, can't load compass, can't find css.scss files :(

aaronchi commented Dec 20, 2011

all stylesheet related inclusions seem to be fubar in 3.2.rc1

Can't load bourbon, can't load compass, can't find css.scss files :(

@Ptico

This comment has been minimized.

Show comment
Hide comment
@Ptico

Ptico Dec 20, 2011

This is because here https://github.com/rails/sass-rails/blob/master/lib/sass/rails/railtie.rb#L37 Sprockets::Engines is invisible. Only sprockets/railtie modules and classes.

Temporary solution:

require 'sprockets'
require 'sprockets/railtie'

on top of lib/sass/rails/railtie.rb. But i don't understand how it worked before and why tests pass now

Ptico commented Dec 20, 2011

This is because here https://github.com/rails/sass-rails/blob/master/lib/sass/rails/railtie.rb#L37 Sprockets::Engines is invisible. Only sprockets/railtie modules and classes.

Temporary solution:

require 'sprockets'
require 'sprockets/railtie'

on top of lib/sass/rails/railtie.rb. But i don't understand how it worked before and why tests pass now

@aaronchi

This comment has been minimized.

Show comment
Hide comment
@aaronchi

aaronchi Dec 20, 2011

wow, ok. Apparently if you specify sprockets before sass-rails in your gemfile, it works.

gem 'sprockets'
gem 'sass-rails'

This should be fixed though

aaronchi commented Dec 20, 2011

wow, ok. Apparently if you specify sprockets before sass-rails in your gemfile, it works.

gem 'sprockets'
gem 'sass-rails'

This should be fixed though

@nragaz

This comment has been minimized.

Show comment
Hide comment
@nragaz

nragaz Dec 20, 2011

Contributor

Thanks Aaron - I'd tried including sprockets in the Gemfile manually, but I guess I put it after sass-rails, not before.

Contributor

nragaz commented Dec 20, 2011

Thanks Aaron - I'd tried including sprockets in the Gemfile manually, but I guess I put it after sass-rails, not before.

@nragaz

This comment has been minimized.

Show comment
Hide comment
@nragaz

nragaz Dec 20, 2011

Contributor

FWIW, I suspect that removing sprockets from sass-rails' gemspec was the real issue:

3c24e4f

Contributor

nragaz commented Dec 20, 2011

FWIW, I suspect that removing sprockets from sass-rails' gemspec was the real issue:

3c24e4f

@ugisozols

This comment has been minimized.

Show comment
Hide comment
@ugisozols

ugisozols Dec 21, 2011

We run into this issue too and adding gem 'sprockets' before sass-rails fixes the problem.

ugisozols commented Dec 21, 2011

We run into this issue too and adding gem 'sprockets' before sass-rails fixes the problem.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 21, 2011

I ran into this issue when using rails 3.1.3. I added the sprockets gem before sass-rails gem, however this does not fix the problem in my case. I get this error when compiling the assets with the command

RAILS_ENV=production bundle exec rake assets:precompile

ruby 1.9.3-p0
Rails 3.1.3
sprockets 2.0.3
sass-rails 3.1.11

links to images are referenced with the tag, image-url("name_of_image")

Here is the complete trace for the error

RAILS_ENV=production bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/ruby /Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
undefined method `[]' for nil:NilClass
  (in /Users/me-myself/Rails_projects/pfvsa/app/assets/stylesheets/application.css)
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.5/lib/sass/rails/helpers.rb:40:in `resolver'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.5/lib/sass/rails/helpers.rb:25:in `image_url'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/funcall.rb:88:in `_perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/node.rb:40:in `perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/list.rb:69:in `block in _perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/list.rb:69:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/list.rb:69:in `_perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/node.rb:40:in `perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:214:in `visit_prop'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:234:in `visit_rule'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:47:in `visit_root'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/root_node.rb:20:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/engine.rb:300:in `_render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/engine.rb:247:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.5/lib/sass/rails/compressor.rb:8:in `compress'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/compressors.rb:18:in `compress'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/processing.rb:243:in `block in css_compressor='
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/processor.rb:29:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/processor.rb:29:in `evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/context.rb:175:in `block in evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:242:in `block in build_source'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/caching.rb:30:in `cache_hash'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:235:in `build_source'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:71:in `digest'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/asset.rb:95:in `digest_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:58:in `path_for'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:35:in `write_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:21:in `block in compile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:151:in `block in each_logical_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:139:in `block (2 levels) in each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each_entry'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:137:in `block in each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `load'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/me-myself/.rbenv/versions/1.9....]
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `sh'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `sh'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:80:in `ruby'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `ruby'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `load'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile

ghost commented Dec 21, 2011

I ran into this issue when using rails 3.1.3. I added the sprockets gem before sass-rails gem, however this does not fix the problem in my case. I get this error when compiling the assets with the command

RAILS_ENV=production bundle exec rake assets:precompile

ruby 1.9.3-p0
Rails 3.1.3
sprockets 2.0.3
sass-rails 3.1.11

links to images are referenced with the tag, image-url("name_of_image")

Here is the complete trace for the error

RAILS_ENV=production bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/ruby /Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
undefined method `[]' for nil:NilClass
  (in /Users/me-myself/Rails_projects/pfvsa/app/assets/stylesheets/application.css)
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.5/lib/sass/rails/helpers.rb:40:in `resolver'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.5/lib/sass/rails/helpers.rb:25:in `image_url'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/funcall.rb:88:in `_perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/node.rb:40:in `perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/list.rb:69:in `block in _perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/list.rb:69:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/list.rb:69:in `_perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/script/node.rb:40:in `perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:214:in `visit_prop'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:234:in `visit_rule'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:47:in `visit_root'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/tree/root_node.rb:20:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/engine.rb:300:in `_render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.11/lib/sass/engine.rb:247:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.5/lib/sass/rails/compressor.rb:8:in `compress'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/compressors.rb:18:in `compress'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/processing.rb:243:in `block in css_compressor='
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/processor.rb:29:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/processor.rb:29:in `evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/context.rb:175:in `block in evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:242:in `block in build_source'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/caching.rb:30:in `cache_hash'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:235:in `build_source'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:71:in `digest'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/asset.rb:95:in `digest_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:58:in `path_for'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:35:in `write_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:21:in `block in compile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:151:in `block in each_logical_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:139:in `block (2 levels) in each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each_entry'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:137:in `block in each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `load'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/me-myself/.rbenv/versions/1.9....]
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `sh'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `sh'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:80:in `ruby'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `ruby'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `load'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile
@Ptico

This comment has been minimized.

Show comment
Hide comment
@Ptico

Ptico Dec 21, 2011

@GEORGEG this is unrelated issue. In your case, SassTemplate succesfully registered, but sass_options is not created. Can you create a sample application wich reproduces the error?

Ptico commented Dec 21, 2011

@GEORGEG this is unrelated issue. In your case, SassTemplate succesfully registered, but sass_options is not created. Can you create a sample application wich reproduces the error?

@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Dec 21, 2011

Member

Can you guys test if this https://gist.github.com/6a13a8617aac7e3ca950 fixes your issue?.
Thanks.

Member

spastorino commented Dec 21, 2011

Can you guys test if this https://gist.github.com/6a13a8617aac7e3ca950 fixes your issue?.
Thanks.

@Psli

This comment has been minimized.

Show comment
Hide comment
@Psli

Psli Dec 21, 2011

@spastorino it seems not working ...

Psli commented Dec 21, 2011

@spastorino it seems not working ...

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 21, 2011

@Ptico In my case I have created an app that reproduces the error. https://github.com/georgeG/asset_compile_error_app
dont know whether should move this to a different issue or discuss within this context, thanks

ghost commented Dec 21, 2011

@Ptico In my case I have created an app that reproduces the error. https://github.com/georgeG/asset_compile_error_app
dont know whether should move this to a different issue or discuss within this context, thanks

@nragaz

This comment has been minimized.

Show comment
Hide comment
@nragaz

nragaz Dec 22, 2011

Contributor

That worked for me, @spastorino - thanks!

Contributor

nragaz commented Dec 22, 2011

That worked for me, @spastorino - thanks!

@joevandyk

This comment has been minimized.

Show comment
Hide comment
@joevandyk

joevandyk Dec 22, 2011

Putting sprockets before sass-rails in my Gemfile also fixed the problem.

joevandyk commented Dec 22, 2011

Putting sprockets before sass-rails in my Gemfile also fixed the problem.

@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Dec 22, 2011

Member

Test it now and let me know if everything goes well. I will release sass-rails 3.2.2 after that

Member

spastorino commented Dec 22, 2011

Test it now and let me know if everything goes well. I will release sass-rails 3.2.2 after that

@nragaz

This comment has been minimized.

Show comment
Hide comment
@nragaz

nragaz Dec 22, 2011

Contributor

Works for me @spastorino - the previous fix worked with the rake task but not, as it turned out, in development mode in the browser.

Contributor

nragaz commented Dec 22, 2011

Works for me @spastorino - the previous fix worked with the rake task but not, as it turned out, in development mode in the browser.

@Psli

This comment has been minimized.

Show comment
Hide comment
@Psli

Psli Dec 22, 2011

@spastorino That worked for me -> f8faec5

Psli commented Dec 22, 2011

@spastorino That worked for me -> f8faec5

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 22, 2011

Upgraded from rails 3.1.3 to rails 3.2.0.rc1 with sass-rails 3.2.2. Still the issue is not resolve. getting the same error. Any ideas or suggestions?

ghost commented Dec 22, 2011

Upgraded from rails 3.1.3 to rails 3.2.0.rc1 with sass-rails 3.2.2. Still the issue is not resolve. getting the same error. Any ideas or suggestions?

@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Dec 22, 2011

Member

@GEORGEG run bundle update and then paste the exact trace you're getting

Member

spastorino commented Dec 22, 2011

@GEORGEG run bundle update and then paste the exact trace you're getting

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 22, 2011

Here is the stack trace for the error after upgrading to rails 3.2.0.rc1 and running bundle update then

bundle exec rake assets:precompile RAILS_ENV='production' --trace

** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/ruby /Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
undefined method `[]' for nil:NilClass
  (in /Users/me-myself/Rails_projects/sasserror/app/assets/stylesheets/application.css)
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.2/lib/sass/rails/helpers.rb:40:in `resolver'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.2/lib/sass/rails/helpers.rb:25:in `image_url'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/funcall.rb:88:in `_perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/node.rb:40:in `perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/list.rb:69:in `block in _perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/list.rb:69:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/list.rb:69:in `_perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/node.rb:40:in `perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:216:in `visit_prop'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:236:in `visit_rule'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:47:in `visit_root'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/root_node.rb:20:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/engine.rb:300:in `_render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/engine.rb:247:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.2/lib/sass/rails/compressor.rb:8:in `compress'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/compressors.rb:74:in `compress'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/processing.rb:243:in `block in css_compressor='
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/processor.rb:29:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/processor.rb:29:in `evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/context.rb:177:in `block in evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/context.rb:174:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/context.rb:174:in `evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/bundled_asset.rb:26:in `initialize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:244:in `new'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:244:in `build_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/index.rb:89:in `block in build_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/caching.rb:19:in `cache_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/index.rb:88:in `build_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:163:in `find_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/index.rb:56:in `find_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/static_compiler.rb:20:in `block in compile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:212:in `block in each_logical_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:200:in `block (2 levels) in each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:190:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:190:in `each_entry'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:198:in `block in each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:197:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:197:in `each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:210:in `each_logical_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `load'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/me-myself/.rbenv/versions/1.9....]
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `sh'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `sh'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:80:in `ruby'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `ruby'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `load'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile

ghost commented Dec 22, 2011

Here is the stack trace for the error after upgrading to rails 3.2.0.rc1 and running bundle update then

bundle exec rake assets:precompile RAILS_ENV='production' --trace

** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/ruby /Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
undefined method `[]' for nil:NilClass
  (in /Users/me-myself/Rails_projects/sasserror/app/assets/stylesheets/application.css)
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.2/lib/sass/rails/helpers.rb:40:in `resolver'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.2/lib/sass/rails/helpers.rb:25:in `image_url'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/funcall.rb:88:in `_perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/node.rb:40:in `perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/list.rb:69:in `block in _perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/list.rb:69:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/list.rb:69:in `_perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/script/node.rb:40:in `perform'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:216:in `visit_prop'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:236:in `visit_rule'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:47:in `visit_root'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/tree/root_node.rb:20:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/engine.rb:300:in `_render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/lib/sass/engine.rb:247:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.2/lib/sass/rails/compressor.rb:8:in `compress'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/compressors.rb:74:in `compress'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/processing.rb:243:in `block in css_compressor='
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/processor.rb:29:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/processor.rb:29:in `evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/context.rb:177:in `block in evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/context.rb:174:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/context.rb:174:in `evaluate'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/bundled_asset.rb:26:in `initialize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:244:in `new'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:244:in `build_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/index.rb:89:in `block in build_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/caching.rb:19:in `cache_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/index.rb:88:in `build_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:163:in `find_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/index.rb:56:in `find_asset'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/static_compiler.rb:20:in `block in compile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:212:in `block in each_logical_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:200:in `block (2 levels) in each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:190:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:190:in `each_entry'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:198:in `block in each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:197:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:197:in `each_file'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sprockets-2.1.2/lib/sprockets/base.rb:210:in `each_logical_path'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `load'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/me-myself/.rbenv/versions/1.9....]
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:45:in `sh'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `sh'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils.rb:80:in `ruby'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `ruby'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/Users/me-myself/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top (required)>'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `load'
/Users/me-myself/.rbenv/versions/1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile
@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Dec 22, 2011

Member

@GEORGEG steps to reproduce it?

Member

spastorino commented Dec 22, 2011

@GEORGEG steps to reproduce it?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 22, 2011

here is an app that reproduces the error https://github.com/georgeG/asset_compile_error_app

ghost commented Dec 22, 2011

here is an app that reproduces the error https://github.com/georgeG/asset_compile_error_app

@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Dec 22, 2011

Member

can you try reducing the Gemfile, ideally would be nice to have just the Rails defaults to be sure that the issue is not a 3rd party gem. Thanks.

Member

spastorino commented Dec 22, 2011

can you try reducing the Gemfile, ideally would be nice to have just the Rails defaults to be sure that the issue is not a 3rd party gem. Thanks.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 23, 2011

@spastorino Even after reducing the gems the issue seems to persist. So I can rule out an external gem dependency

ghost commented Dec 23, 2011

@spastorino Even after reducing the gems the issue seems to persist. So I can rule out an external gem dependency

@Ptico

This comment has been minimized.

Show comment
Hide comment
@Ptico

Ptico Dec 23, 2011

Hi @GEORGEG
The main problem is here https://github.com/rails/sass-rails/blob/master/lib/sass/rails/compressor.rb#L8 it initializes sass engine without options[:custom], but asset_path helper requires options[:custom][:resolver].

Can anyone explain how it should work in a right way?

Ptico commented Dec 23, 2011

Hi @GEORGEG
The main problem is here https://github.com/rails/sass-rails/blob/master/lib/sass/rails/compressor.rb#L8 it initializes sass engine without options[:custom], but asset_path helper requires options[:custom][:resolver].

Can anyone explain how it should work in a right way?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 23, 2011

Thanks a lot @Ptico for drilling this. Hope will get a fix.

ghost commented Dec 23, 2011

Thanks a lot @Ptico for drilling this. Hope will get a fix.

@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Dec 27, 2011

Member

@GEORGEG your files colorbox.css and jquery-ui.css are using image-url which is a sass directive. You should change both files to .css.scss and everything should work.

Member

spastorino commented Dec 27, 2011

@GEORGEG your files colorbox.css and jquery-ui.css are using image-url which is a sass directive. You should change both files to .css.scss and everything should work.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 27, 2011

@spastorino i renamed the files with a .scss suffix. However i now get a new error

rake aborted!
/Users/me-myself/Rails_projects/sasserror/app/assets/stylesheets/colorbox.css.scss has already been required
(in /Users/me-myself/Rails_projects/sasserror/app/assets/stylesheets/colorbox.css.scss)

This seems similar to rails/rails#4151 issue.

After i applied one of the suggested fix,

group :assets do
gem 'sass-rails', git: 'https://github.com/rails/sass-rails.git', branch: '3-2-stable'

I now get another error,

rake aborted!
wrong number of arguments (3 for 2)
(in /Users/me-myself/Rails_projects/sasserror/app/assets/stylesheets/colorbox.css.scss)

ghost commented Dec 27, 2011

@spastorino i renamed the files with a .scss suffix. However i now get a new error

rake aborted!
/Users/me-myself/Rails_projects/sasserror/app/assets/stylesheets/colorbox.css.scss has already been required
(in /Users/me-myself/Rails_projects/sasserror/app/assets/stylesheets/colorbox.css.scss)

This seems similar to rails/rails#4151 issue.

After i applied one of the suggested fix,

group :assets do
gem 'sass-rails', git: 'https://github.com/rails/sass-rails.git', branch: '3-2-stable'

I now get another error,

rake aborted!
wrong number of arguments (3 for 2)
(in /Users/me-myself/Rails_projects/sasserror/app/assets/stylesheets/colorbox.css.scss)

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 27, 2011

Update:
I have now pointed rails to
gem 'rails', git: 'git://github.com/rails/rails.git', branch: '3-2-stable'

and sass-rails to
gem 'sass-rails',git: 'https://github.com/rails/sass-rails.git', branch: '3-2-stable'

and the assets for the test app have compiled cleanly this time round. (this is after renaming the files as @spastorino suggested)

I need to try this with the real application( which has more gem dependencies other than rails default) and will report any issues I come across.

ghost commented Dec 27, 2011

Update:
I have now pointed rails to
gem 'rails', git: 'git://github.com/rails/rails.git', branch: '3-2-stable'

and sass-rails to
gem 'sass-rails',git: 'https://github.com/rails/sass-rails.git', branch: '3-2-stable'

and the assets for the test app have compiled cleanly this time round. (this is after renaming the files as @spastorino suggested)

I need to try this with the real application( which has more gem dependencies other than rails default) and will report any issues I come across.

@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Dec 27, 2011

Member

@GEORGEG exactly, sorry I forgot to mention that you should point rails and sass-rails to 3-2-stable. There are some other fixes on those branches.

Member

spastorino commented Dec 27, 2011

@GEORGEG exactly, sorry I forgot to mention that you should point rails and sass-rails to 3-2-stable. There are some other fixes on those branches.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 27, 2011

Thanks a tonne Santiago and Andrey for assisting.
So far so good.
:)

ghost commented Dec 27, 2011

Thanks a tonne Santiago and Andrey for assisting.
So far so good.
:)

@jamesds

This comment has been minimized.

Show comment
Hide comment
@jamesds

jamesds Jan 14, 2012

Will the fix for this issue be merged into a 3.1 compatible branch? The most recent rails 3.1 compatible gem is 3.1.5 and this issue hasn't been fixed in it.

jamesds commented Jan 14, 2012

Will the fix for this issue be merged into a 3.1 compatible branch? The most recent rails 3.1 compatible gem is 3.1.5 and this issue hasn't been fixed in it.

@ChrisBrandhorst

This comment has been minimized.

Show comment
Hide comment
@ChrisBrandhorst

ChrisBrandhorst Jan 16, 2012

For me, the fix works for precompile and in the browser, but /public/stylesheets/compiled/application.css shows the stacktrace outputted by the NoMethodError on options[:custom]:

/usr/local/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.4/lib/sass/rails/helpers.rb:40:in `resolver'

ChrisBrandhorst commented Jan 16, 2012

For me, the fix works for precompile and in the browser, but /public/stylesheets/compiled/application.css shows the stacktrace outputted by the NoMethodError on options[:custom]:

/usr/local/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.4/lib/sass/rails/helpers.rb:40:in `resolver'

@Mange

This comment has been minimized.

Show comment
Hide comment
@Mange

Mange Feb 3, 2012

Just in case someone else finds this via Google or something, we experienced a similar error and it all boiled down to a typo in a filename.

We had file.css.css instead of file.css.scss. E.g. a missing s in the last extension. This file called image-url which caused the problem.

Look for suspicious files using ack:

$ ack --css -- -url

Mange commented Feb 3, 2012

Just in case someone else finds this via Google or something, we experienced a similar error and it all boiled down to a typo in a filename.

We had file.css.css instead of file.css.scss. E.g. a missing s in the last extension. This file called image-url which caused the problem.

Look for suspicious files using ack:

$ ack --css -- -url
@gernotkogler

This comment has been minimized.

Show comment
Hide comment
@gernotkogler

gernotkogler Feb 4, 2012

Same problem here (rails 3.2.1, sass-rails 3.2.4). The fix does not help

gernotkogler commented Feb 4, 2012

Same problem here (rails 3.2.1, sass-rails 3.2.4). The fix does not help

@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Feb 4, 2012

Member

@gernotkogler and others hitting the issue, please open a new one and provide steps to reproduce it. An app which shows the problem could be nice

Member

spastorino commented Feb 4, 2012

@gernotkogler and others hitting the issue, please open a new one and provide steps to reproduce it. An app which shows the problem could be nice

@jweslley

This comment has been minimized.

Show comment
Hide comment
@jweslley

jweslley Feb 12, 2012

Same problem here (rails 3.2.1, sass-rails 3.2.4), but when I was creating an app to reproduce it and open a new issue like suggested by @spastorino I got a new one #92 :(

jweslley commented Feb 12, 2012

Same problem here (rails 3.2.1, sass-rails 3.2.4), but when I was creating an app to reproduce it and open a new issue like suggested by @spastorino I got a new one #92 :(

@Bodacious

This comment has been minimized.

Show comment
Hide comment
@Bodacious

Bodacious Feb 26, 2012

I hit this one tonight - any updates guys?

Bodacious commented Feb 26, 2012

I hit this one tonight - any updates guys?

pacovell added a commit to donedotcom/sass-rails that referenced this issue Mar 1, 2012

@kibaekr

This comment has been minimized.

Show comment
Hide comment
@kibaekr

kibaekr May 7, 2012

I got this same error today after Bundle Updating, and the solutions provided above dont seem to be working.
It used to work, but I get this error: undefined method `difficulty' for #Mission:0x14d275d0

Seems like it's because of the upgrade. Anyone know which gem I might need to downgrade?

kibaekr commented May 7, 2012

I got this same error today after Bundle Updating, and the solutions provided above dont seem to be working.
It used to work, but I get this error: undefined method `difficulty' for #Mission:0x14d275d0

Seems like it's because of the upgrade. Anyone know which gem I might need to downgrade?

fduan pushed a commit to fduan/sass-rails that referenced this issue Sep 13, 2012

fduan pushed a commit to fduan/sass-rails that referenced this issue Sep 13, 2012

Frank Duan
make sass-rails work for rails 3.1 app without asset pipeline enabled…
… - applied the fixes for issues #81 and #84 - fixed typo
@gokulj

This comment has been minimized.

Show comment
Hide comment
@gokulj

gokulj Jan 2, 2013

Hit this problem wirh Rails 3.2.8 and sass-rails 3.2.5. There was one file with a .css extension instead of .css.scss

gokulj commented Jan 2, 2013

Hit this problem wirh Rails 3.2.8 and sass-rails 3.2.5. There was one file with a .css extension instead of .css.scss

@dylandrop

This comment has been minimized.

Show comment
Hide comment
@dylandrop

dylandrop Sep 4, 2013

The problem (I think) is that ruby-sass cannot parse image-url. You can just do a search-and-replace from image-url to url or whatever appropriate helper that is needed.

dylandrop commented Sep 4, 2013

The problem (I think) is that ruby-sass cannot parse image-url. You can just do a search-and-replace from image-url to url or whatever appropriate helper that is needed.

@drakmail

This comment has been minimized.

Show comment
Hide comment
@drakmail

drakmail Mar 9, 2014

@gokulj 👍 I'm has some issue =/

drakmail commented Mar 9, 2014

@gokulj 👍 I'm has some issue =/

garethrees pushed a commit to garethrees/sass-rails that referenced this issue Oct 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment