I'm running bundle exec compass compile -e production --force and I'm getting
bundle exec compass compile -e production --force
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
I added a binding.pry to the resolver method and options[:custom] returns nil.
binding.pry if options[:custom].nil?
options.has_key? :custom returns false.
This could be related to Issue 98 #98
Ok. On a hunch, I enabled the asset pipeline. Now it seems to work. I think this is because the Resolver is not correctly enabled without it. It appears that the template_handler is not used at all without the asset pipeline being enabled. but it could also be something janky in compass... I'm not sure. Stil digging.
I found a simple workaround
We got the same error because we had image-url in a plain .css file. Renaming to .css.scss did the trick.
Thought I'd let you know.
lib/sass/rails/helpers.rb:L32 does not exist anymore, this functionality appears to have been farmed out to sprockets/sass_functions. Can this issue be closed?
The problem itself may still be around but the error signature will have moved to another place.
Closing here, because does not exist anymore. Feel free to re-open if persists.
I don't understand. This is broken in Rails 3.2.13. Are you dropping support for Rails 3.2?
Confirming for SR 3.2.6 in Rails 3.2.14. It seems that loading a plain CSS with a font is the problem in my reproduction.
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.
Just another data point, I hit this issue and have spent far too long trying to figure out that I accidentally put a sass helper function into a plan CSS file.
Exactly my case from 2 months ago!
fix building on F18
addressing several problems.
compass compile is dissabled because of
apipie is disabled because it tries to connect somewhere and fails to connect
This bit me the other day while I was trying to deploy to a staging env. I just tried to reproduce it with the latest rails (4.1.4) and sass-rails but I'm unable to repro it now. If anyone could provide me with a failing test app, I could spend time improving the exception message. Cheers.
Just tried to reproduce on a rails 3.2.15 / sass-rails 3.2.3 and a rails 4.1.1 / sass-rails 4.0.3 app and neither break but I am not using the exact code that was killing my app last time.
@wiggly Yeah, same problem here. Oh well! I'll keep an eye to see if it comes up again.
I got this error trying to precompile assets in Rails 3 (with sass-rails-3.2.6) using Uglifier 2. Since Uglifier 2 is declared as backwards-incompatible, I guess it might simply be that these versions of these libs are incompatible. Rails 3 can't use a later version of sass-rails.