Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

rvm installed bundler-1.0.0.rc.5 doesn't play nice with rails rc2 #195

Open
strangemonad opened this Issue · 0 comments

1 participant

@strangemonad

Sorry, yet another 1.9.2 + rvm issue :(

The problem:

  • install the new rvm 1.0.0
    -> this includes bundler 1.0.0.rc.5 as a gem in @global (though I can't gem uninstall it or gem update it).

  • other than that you have minimal gems installed at this point but it doesn't matter for the repro

  • cd to some rails project (with or without a Gemfile.lock or .bundle/ directory)

  • bundle install

This leads to the following cryptic error:
/Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:235:in resolve': undefined methodname' for nil:NilClass (NoMethodError)
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:344:in block in resolve_requirement'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:343:in
catch'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:343:in resolve_requirement'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:295:in
block in resolve'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:294:in reverse_each'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:294:in
resolve'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:162:in start'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:131:in
block in resolve'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:130:in catch'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:130:in
resolve'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:153:in resolve'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:93:in
specs'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:88:in resolve_remotely!'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/installer.rb:35:in
run'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/installer.rb:8:in install'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/cli.rb:185:in
install'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/vendor/thor/task.rb:22:in run'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/vendor/thor/invocation.rb:118:in
invoke_task'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/vendor/thor.rb:246:in dispatch'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/lib/bundler/vendor/thor/base.rb:389:in
start'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.0.rc.5/bin/bundle:13:in <top (required)>'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/bin/bundle:19:in
load'
from /Users/smorel/.rvm/gems/ruby-1.9.2-p0@global/bin/bundle:19:in `

'

So info about variable state at that point:
parent => rails (>= 3.0.0.rc2, runtime)
existing => [#]
existing.required_by => []
existing.required_by.last => nil

Simple hacky patch - change the throw to be:
throw parent.name, existing.respond_to?(:required_by) && existing.required_by.last && existing.required_by.last

Now that at least gives a slightly less cryptic error:
$ bundle install
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (>= 3.0.0.rc2) depends on
bundler (>= 1.0.0.rc.6)

In snapshot (Gemfile.lock):
bundler (1.0.0.rc.5)

Would be even nicer to notice that we're at the root of the requirements tree and print something even nicer like:

"The dependency rails 3.0.0.rc2 requires a newer version of bundler (>=1.0.0.rc.6). You must manually update your version of bundler"

Sorry, just started playing with ruby about 1 week ago so I don't know enough about bundler yet to figure out how to make such a fix.

now to figure out how to get rvm to let me update bundler :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.