sass-rails: NoMethodError on line ["32"] lib/sass/rails/helpers.rb: undefined method '[]' for nil:NilClass

I’m running bundle exec compass compile -e production --force and I’m getting

NoMethodError on line ["32"] of /Users/rmontgomery429/.rvm/gems/ruby-1.9.3-p194@usertesting-orders/gems/sass-rails-3.2.5/lib/sass/rails/helpers.rb: undefined method '[]' for nil:NilClass

That code in question is this: lib/sass/rails/helpers.rb:32

31: def resolver
32:   options[:custom][:resolver]
33: end

I added a binding.pry to the resolver method and options[:custom] returns nil.

def resolver
  binding.pry if options[:custom].nil?
  options[:custom][:resolver]
end

options.has_key? :custom returns false.

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

Apparent cause: I had “font-url” functions (asset-url instructions) in a plain CSS file. The stack trace/exception could be a little more helpful.