Alexander Kleinhans
Alexander Kleinhans

Reputation: 6248

bundler disappeared with ruby (solved, but what happened?)

For the record, I already fixed my problem, but I'm trying to figure out what happened so it doesn't happen again.

I had been using Ruby earlier today and hadn't had problems. All of a sudden, I cant run anything.

In the past, I'd forget tobundle install and doing that that would make work out, but this time, I didn't even get that message. Instead I got this:

[ERROR] cannot load such file -- bundler/setup

And on trying to bundle install, I'd have this error:

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'bundler' (>= 0) among 16 total gem(s) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
    from /usr/bin/bundle:22:in `<main>'

So bundler is not there? Where did it go?

I ended up having to do gem install bundler per this post. Then did bundle update and now everything works fine.

What may have happened?

Upvotes: 0

Views: 650

Answers (1)

Amir Raminfar
Amir Raminfar

Reputation: 34149

Do you use RVM (or something similar)? It sounds like you were using a bundler from system or somewhere else in your path. I have seen that error when this happens.

Installing bundler for the current ruby should fix the problem -- which is what you did.

Upvotes: 1

Related Questions