Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

2.12.0 breaking my environment -- how do I downgrade? #540

Closed
snoblenet opened this issue Mar 14, 2014 · 32 comments
Closed

2.12.0 breaking my environment -- how do I downgrade? #540

snoblenet opened this issue Mar 14, 2014 · 32 comments

Comments

@snoblenet
Copy link

sprokets 2.12.0 is breaking my environment with the following trace:

17:01:28 web.1    | ArgumentError - wrong number of arguments (2 for 1)
17:01:28 web.1    |   (in /Users/steven/Dropbox/Testivate/app/assets/stylesheets/screen.scss):
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/sass_importer.rb:11:in `initialize'
17:01:28 web.1    |   compass-rails (1.1.6) lib/compass-rails/patches/sass_importer.rb:7:in `block in evaluate'
17:01:28 web.1    |   compass-rails (1.1.6) lib/compass-rails/patches/sass_importer.rb:7:in `evaluate'
17:01:28 web.1    |   tilt (1.4.1) lib/tilt/template.rb:103:in `render'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/context.rb:197:in `block in evaluate'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/context.rb:194:in `evaluate'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/processed_asset.rb:12:in `initialize'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:374:in `block in build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:395:in `circular_call_protection'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:373:in `build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:94:in `block in build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/caching.rb:58:in `cache_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:93:in `build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:287:in `find_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:61:in `find_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/processed_asset.rb:97:in `build_required_assets'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/processed_asset.rb:16:in `initialize'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:374:in `block in build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:395:in `circular_call_protection'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:373:in `build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:94:in `block in build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/caching.rb:58:in `cache_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:93:in `build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:287:in `find_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:61:in `find_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/bundled_asset.rb:16:in `initialize'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:377:in `build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:94:in `block in build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/caching.rb:58:in `cache_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:93:in `build_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:287:in `find_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/index.rb:61:in `find_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/environment.rb:75:in `find_asset'
17:01:28 web.1    |   sprockets (2.12.0) lib/sprockets/base.rb:295:in `[]'
17:01:28 web.1    |   sprockets-rails (2.0.1) lib/sprockets/rails/helper.rb:144:in `lookup_asset_for_path'
17:01:28 web.1    |   sprockets-rails (2.0.1) lib/sprockets/rails/helper.rb:113:in `block in stylesheet_link_tag'
17:01:28 web.1    |   sprockets-rails (2.0.1) lib/sprockets/rails/helper.rb:112:in `stylesheet_link_tag'
17:01:28 web.1    |   app/views/layouts/application.html.haml:9:in `_app_views_layouts_application_html_haml__1173510072481284944_2245090460'

How do I downgrade to 2.11.0? Putting gem "sprockets", "2.11.0" and typing bundle install or bundle update is not working. I get this error:

Resolving dependencies...
Could not find gem 'sprokets (= 2.11.0) ruby' in the gems available on this machine.

BTW, from my Gemlock file:

    compass (0.12.3)
      chunky_png (~> 1.2)
      fssm (>= 0.2.7)
      sass (= 3.2.14)
    compass-rails (1.1.6)
      compass (>= 0.12.2)
    compass-susy-plugin (0.9)
      compass (>= 0.11.1)
    susy (1.0.9)
      compass (>= 0.12.2)
      sass (>= 3.2.0)
@lephyrius
Copy link

I also see this problem...
I use jRuby if that helps.

@triptec
Copy link

triptec commented Mar 14, 2014

Same problem here...

@tombruijn
Copy link

I had the same problem with the 2.12.0 release. A downgrade however worked with this in my Gemfile: gem "sprockets", "2.11.0" and running bundle update sprockets.

It did not install 2.11.0 as it was already installed on my system. Maybe running gem install sprockets --version "2.11.0" beforehand would help if the problem is that it can't find that gem version.

@RalphAtHamburg
Copy link

Same problemm here.

I solved it by locking the sprocket gem to 2.11.0.
In the gem file:

gem 'sprockets', '2.11.0'

@karlwilbur
Copy link

I had the same problem too, but locking sprockets wasn't enough. I'm using Slim and it turned out that I needed to lock slim as well:

gem 'sprockets', '2.11.0'
gem 'slim', '2.0.0'

@ngauthier
Copy link

@snoblenet you have a typo "sprokets". Try "sprockets" :-D

@rafaelfranca
Copy link
Collaborator

Hi guys. If you are using sass-rails make sure you are using 4.0.2 and this problem will be solved.

@ngauthier
Copy link

sass-rails 4.0.2 simply downgrades sprockets:

Bundler could not find compatible versions for gem "sprockets":
  In Gemfile:
    sass-rails (~> 4.0.2) ruby depends on
      sprockets (<= 2.11.0, ~> 2.8) ruby

    sprockets (2.12.0)

It also downgrades sass to 3.2.15 (from 3.3.2)

@rafaelfranca
Copy link
Collaborator

sass 3.3 doesn't work with sass-rails unfortunately, so we had to downgrade.

@snoblenet
Copy link
Author

@ngauthier slap-forehead -- you are right -- sprockets now locked at 2.11.0 -- thanks

@sferik
Copy link
Contributor

sferik commented Mar 15, 2014

@josh Any plans to address this issue? It seems to be affecting a lot of Rails applications.

@rafaelfranca
Copy link
Collaborator

We are working on it. Meanwhile, make sure your rails applications are
using sass-rails 4.0.2

Sent using mobile Gmail
On Mar 15, 2014 2:28 PM, "Erik Michaels-Ober" notifications@github.com
wrote:

@josh https://github.com/josh Any plans to address this issue? It seems
to be affecting a lot of Rails applications.

Reply to this email directly or view it on GitHubhttps://github.com//issues/540#issuecomment-37732044
.

@vanboom
Copy link

vanboom commented Mar 17, 2014

Forcing sass-rails 4.0.2 in my Gemfile worked for me. Thanks!

@tecnobrat
Copy link

I opened #544 asking about why this is not following semver. Hopefully that will help those of you in this thread properly lock your dependencies if we know what happened here.

jaredbeck added a commit to usgo/gocongress that referenced this issue Mar 26, 2014
- [release notes][1]
- [release announcement][2]
- [deprecation of db:test:* tasks][3]
- Had to update `sass-rails` to 4.0.2 because of
an [issue with sprockets 2.12][4]

[1]: http://edgeguides.rubyonrails.org/4_1_release_notes.html
[2]: http://weblog.rubyonrails.org/2014/3/25/Rails-4-1-rc2/
[3]: rails/rails#13528
[4]: sstephenson/sprockets#540
@the-teacher
Copy link

same problem

solved with

gem 'rails', '~> 4.1.0.rc2'

group :assets do  
  gem 'uglifier', '>= 1.0.3'

  gem 'sprockets', '2.11.0' # 2.12.0 is broken
  gem 'sprockets-rails'

  gem 'coffee-rails'
end

@ericschoville
Copy link

Same problem here. Locked it at 2.11.0 and it works.

@bvogel
Copy link

bvogel commented Jul 24, 2014

@josh Would you care to explain why this issue was closed? However the issue as is (downgrading to 2.11) is resolved the underlying issue that 2.12 won't work hasn't been addressed (I'm seeing the with ruby 2.1.2, rails 4.0.5 (4.0.8 won't even resolve))

@ngauthier
Copy link

Just as an update: simply requiring rails 4.1.2 (current stable) causes sprockets to resolve to 2.11 because sass-rails >= 4.0.2 locks it at 2.11. So If you try to force sprockets to update to 2.12 sass-rails complains.

So, this would technically be an issue on sass-rails called "Update to sprockets 2.12". Right now on rails 4.1.2 there really is no issue, everything resolves fine and works fine.

@bvogel The fact that 4.0.8 will not resolve with a forced sprockets 2.12 is not an issue unless there is a third gem involved that requires sprockets 2.12 and you have a three way conflict. If 4.0.8 resolves with 2.11 then everything is fine.

@bvogel
Copy link

bvogel commented Jul 24, 2014

@ngauthier Well the situation is that If I use gem 'rails', '~> 4.0.0' then I will get a rails version of 4.0.8 and sprockets 2.12.1 - so I have to manually lock sprockets to 2.11.0

@ngauthier
Copy link

Ah ok. I would suggest filing an issue with rails then? So maybe get a patch into Rails 4.0.9 that locks sprockets down to 2.11? Since Rails depends on sprockets and sass-rails depends on sprockets I don't think sprockets is at fault since it's at the bottom of the dependency tree.

@bf4
Copy link

bf4 commented Jul 25, 2014

@ngauthier see sass-rails master

@CzechsMix
Copy link

I'm sorry it sounds like it's fixed, but when trying these solutions, I still get the error.

gem 'rails', '4.1.2'

gem 'sprockets' , '~> 2.11.0'
gem 'sass-rails', '4.0.3'

@ngauthier
Copy link

@CzechsMix please paste the output from bundle update

@CzechsMix
Copy link

@ngauthier

Invalid gemspec in [/var/lib/gems/1.9.1/specifications/ZenTest-4.10.1.gemspec]: Illformed requirement ["< 3.0, >= 1.8"]
Invalid gemspec in [/var/lib/gems/1.9.1/specifications/ZenTest-4.10.1.gemspec]: Illformed requirement ["< 3.0, >= 1.8"]
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 10.3.2
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.0
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.2
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.2
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.2
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.1.2
Using activemodel 4.1.2
Using arel 5.0.1.20140414130214
Using activerecord 4.1.2
Using mini_portile 0.6.0
Using nokogiri 1.6.3.1
Using aws-sdk 1.50.0
Using sass 3.2.19
Using bootstrap-sass 3.2.0.0
Using bundler 1.6.2
Using climate_control 0.0.3
Using cocaine 0.5.4
Using coffee-script-source 1.7.1
Using execjs 2.2.1
Using coffee-script 2.3.0
Using thor 0.19.1
Using railties 4.1.2
Using coffee-rails 4.0.1
Using faker 0.3.1
Using hike 1.2.3
Using multi_json 1.10.1
Using jbuilder 2.1.3
Using jquery-rails 3.1.1
Using paperclip 4.2.0
Using pg 0.17.1
Using protected_attributes 1.0.8
Using tilt 1.4.1
Using sprockets 2.11.0
Using sprockets-rails 2.1.3
Using rails 4.1.2
Using rails_serve_static_assets 0.0.2
Using rails_stdout_logging 0.0.3
Using rails_12factor 0.0.2
Using rdoc 4.1.1
Using sass-rails 4.0.3
Using sdoc 0.4.1
Using spring 1.1.3
Using turbolinks 2.2.2
Using uglifier 2.5.3
Using will_paginate 3.0.7
Your bundle is updated!

@ngauthier
Copy link

Can you paste the error you're getting too? I thought the error was a bundle error, sorry!

@CzechsMix
Copy link

The error happens when I push to heroku

-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
I, [2014-08-11T16:11:47.249510 #688] INFO -- : Writing /tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/public/assets/application-f55842856fc3707757ca7a282f6ca479.js
rake aborted!
NoMethodError: undefined method []' for nil:NilClass (in /tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/app/assets/stylesheets/application.css) /tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/sass_functions.rb:63:insprockets_context'
/tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/sass_functions.rb:38:in font_path' /tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/script/funcall.rb:113:in_perform'
/tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/script/node.rb:40:in perform' /tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:305:invisit_return'
/tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/tree/visitors/base.rb:37:in visit' /tmp/build_6115e63a-858e-48de-a8df-696cc127c9af/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:100:invisit'

@bvogel
Copy link

bvogel commented Aug 11, 2014

@CzechsMix this is a separate issue - you are using sprockets 2.11 and you are seeing a different issue then the OP. Your issue isn't related to 2.12.

@CzechsMix
Copy link

Oh? I'm sorry. It looked in the failure trace like sprockets was the source of the error, and this is one i found prior to downgrading to sprockets 2.11 I had the same version.

@bvogel
Copy link

bvogel commented Aug 11, 2014

Well sprockets SEEMS TO BE the source of the problem, but as it is a different error than the OP is seeing. You should create a separate issue.

@CzechsMix
Copy link

I fixed it. Looks like I just needed to precompile my assets (namely bootstrap) before pushing. Thanks!

@itsNikolay
Copy link

solved with #540 (comment)

@dmitry
Copy link

dmitry commented Oct 27, 2014

Is it possible to use >= 2.12?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests