2

Setting up rbenv on a Digital Ocean droplet and installing bundler, I can't get rbenv to add bundler to the shims or be able to run rbenv exec bundle install

Versions:

Ubuntu 14.04
rbenv 0.4.0-98-g13a474c
deploy$ gem -v
2.2.2
deploy$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
deploy$ rbenv version
2.1.2 (set by /home/deploy/.rbenv/version)

I did this:

deploy@myip:~$ sudo gem install bundler
Fetching: bundler-1.6.3.gem (100%)
Successfully installed bundler-1.6.3
1 gem installed
deploy@myip:~$ which bundler
/usr/local/bin/bundler
deploy@myip:~$ rbenv rehash
deploy@myip:~$ ls .rbenv/shims
erb  gem  irb  rake  rdoc  ri  ruby  testrb

I'm expecting to see bundler in shims after rbenv rehash. I'm also expecting rbenv exec bundle install --binstubs to run now without an error. Right now it gives me a no command error:

deploy@myip:~/.rbenv/shims$ rbenv exec bundle install --binstubs
rbenv: bundle: command not found

I have a suspicion that the issue is something about my RubyGems configuration, but can't see anything wrong with it. It looks like its doing the install and executables in rbenv.

RubyGems Environment:

  - RUBYGEMS VERSION: 2.2.2
  - RUBY VERSION: 2.1.2 (2014-05-08 patchlevel 95) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0
  - RUBY EXECUTABLE: /home/deploy/.rbenv/versions/2.1.2/bin/ruby
  - EXECUTABLE DIRECTORY: /home/deploy/.rbenv/versions/2.1.2/bin
  - SPEC CACHE DIRECTORY: /home/deploy/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0
     - /home/deploy/.gem/ruby/2.1.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/deploy/.rbenv/versions/2.1.2/bin
     - /home/deploy/.rbenv/libexec
     - /home/deploy/.rbenv/plugins/ruby-build/bin
     - /home/deploy/.rbenv/plugins/ruby-build/bin
     - /home/deploy/.rbenv/shims
     - /home/deploy/.rbenv/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/games
     - /usr/local/games

Ideas? Thoughts? Stuff for me to try? I'm very stuck...

Josh
  • 655
  • 5
  • 17

0 Answers0