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
NoMethodError undefined method `[]' for "image":Sass::Script::Value::String #279
Comments
Okay, I had to force downgrade sprockets to latest 2.x (2.12.4) and downgrade sprockets-rails to 2.3.2. Despite the fact that sprockets-rails 2.3.3 and 2.3.2 both say they should work with sprockets [">= 2.8", "< 4.0"] -- that was the only combination I could get that would actually compile my Sass.
Downgrading both, my Sass compiles again. I have no idea if this is a bug in sprockets, sprockets-rails, both, neither, whatever. This is super confusing. I don't like having to lock to older versions of sprockets and sprockets-rails in my Gemfile. Any ideas? This is pretty confusing. |
Can you please provide a sample application that reproduces the error? |
Oh boy, it's a LOT of SCSS from a couple gems, including bootstrap-sass, an engine gem, and local scss. I'll see if I can isolate it somehow. |
I am also facing this problem. I am using the following: Ruby: 2.2.2 My project is actually an upgrade from Rails 3 and Ruby 1.9. |
Okay, I never completely got to the bottom of this and created an isolated reproduction. However, it appears to be working for me without this error now, with latest versions of sprockets and sprockets-rails allowed by Rails 4.2.4 -- sprockets 3.4.0, and sprockets-rails 2.3.3 -- I think those are the same versions I was using when I had the problem I originally reported here though. One thing I did change: I still had some lines in my scss that used the old two-argument asset-url, eg: I thought this two argument from was deprecated but still allowed? However, the two argument from was sometimes, unpredictably giving me errors "Wrong number of arguments, 2 for 1", and other times working -- I can't explain it. It seemed to even depend on the Rails environment in use (I have a 'staging' environment i created myself, whose environments/staging.rb is just a copy of production.rb, but which has different database.yml and other config). I don't know if that could have also been responsible for this error, but since I fixed the two-arg asset-url's to one... I don't seem to have seen it. Hopefully it will stay that way. If it comes back, I'll add another comment. |
The solutions provided by @jrochkind works for me as well. I downgraded sprockets to 2.12.4 and sprockets-rails to 2.3.2. |
Shout-out to @jrochkind, who is, as usual, cutting a path through my current difficulties approximately 1 year into the future. rails/sprockets-rails#279 (comment)
Do you guys still have this issue? Downgrading sprockets did not work for me. |
Ok - in my case It was me having a scss file that still used |
I am suffering from the same problem for upgrade from Rails 3.2 to Rails 4.2. Ruby : 2.3.1. The following gems: gem 'sprockets', '3.4'
gem 'sprockets-rails', '2.3.3' does not resolve the problem. |
From the time you commented, probably you resolved. But, to future guys, I think this can be your problem. This resolved to me, when upgrading my app from 3.2 to 4.2 too: http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#sass-rails
|
I am getting this one. I haven't yet figured out where it's coming from in the source SCSS.
But the last linse in the stacktrace are:
Anyone have any idea what's going on, or suggestions for how I might debug this further? I'm not sure where to go from here -- or even how to figure out what line in source SASS is triggering this.
The text was updated successfully, but these errors were encountered: