Skip to content
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

Could not find bundler (>= 0) #246

Closed
tcurdt opened this issue Jul 22, 2012 · 2 comments
Closed

Could not find bundler (>= 0) #246

tcurdt opened this issue Jul 22, 2012 · 2 comments

Comments

@tcurdt
Copy link

tcurdt commented Jul 22, 2012

bundler cannot find itself

# bundle -v
/usr/local/lib/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [] (Gem::LoadError)
    from /usr/local/lib/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
    from /usr/local/bin/bundle:18:in `<main>'

the environment looks like this

# gem list
*** LOCAL GEMS ***
bundler (1.1.5)

# gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.23
  - RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [i686-linux]
  - INSTALLATION DIRECTORY: /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/local/rbenv/versions/1.9.3-p194/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/rbenv/versions/1.9.3-p194/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1
     - /root/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/


# rbenv which bundle
/usr/local/rbenv/versions/1.9.3-p194/bin/bundle


# ls -la /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems
total 12
drwxr-xr-x 3 root root 4096 Jul 13 17:10 .
drwxr-xr-x 6 root root 4096 Jul 13 16:45 ..
drwxr-xr-x 6 root root 4096 Jul 13 17:10 bundler-1.1.5

Turns out it was "hashed" at another location

# type bundle
bundle is hashed (/usr/local/bin/bundle)

# type -a bundle
bundle is /usr/local/rbenv/shims/bundle
bundle is /usr/local/bin/bundle

Calling /usr/local/rbenv/shims/bundle directly works. After a re-login all is good.

But this raises the questions:

  1. why is there a /usr/local/bin/bundle
  2. can or should the version at /usr/local/bin/bundle be deleted?
@radar
Copy link
Contributor

radar commented Dec 12, 2012

My guess is that /usr/local/bin/bundle was set up prior to you install rbenv.

I don't see any actual issue here (at least one that changes to rbenv would fix), so I'm going to close this now.

@radar radar closed this as completed Dec 12, 2012
@nickpearson
Copy link

[Note: This is just informational in case anyone else lands here with the same issue.]

I just ran into this exact same issue after removing RVM and installing rbenv and ruby-build. After running exec $SHELL -l to load rbenv, which bundler correctly shows /Users/me/.rbenv/shims/bundle, but executing bundler results in the Could not find bundler (>= 0) amongst [] (Gem::LoadError) error shown above. As @tcurdt indicated, closing the terminal window and starting fresh fixes the problem.

Hopefully this helps someone else. And thanks for the excellent work on rbenv.

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

No branches or pull requests

3 participants