Take the 2-minute tour ×

I'm new to Ruby/Rails, so forgive me if this is a trivial question. Whenever I run bundle install, it installs everything in vendor/bundle/ruby/1.8 instead of vendor/bundle/ruby/1.9.1, which is the version of Ruby I am using. When I run ruby -v, I get the correct 1.9.1 version, but bundle install insists on 1.8 for some reason, and this is causing many errors with basic Rails functionality.

How do I instruct bundle to work with 1.9.1 (and preferably remove any trace of Ruby 1.8)?


EDIT: I've done everything this answer says, and I get no trace of 1.8

EDIT AGAIN: Well, it's working somehow. Perhaps restarting Bash fixed it. In any case, is there a general solution to forcing bundle install to use a particular version of Ruby, lest this happens again or to someone else?

share|improve this question
Depends on your system. What are you using? –  Reactormonk Dec 13 '11 at 0:38
@Tass Mac OS X 1.7.2 –  redgem Dec 13 '11 at 0:40
add comment

2 Answers

Bundle works with gems. Check that the gem command uses the correct version ruby as well : on Ubuntu Linux I had to symlink /usr/bin/gem to /usr/bin/gem1.9.1

(The only difference between /usr/bin/gem1.8 and /usr/bin/gem1.9.1 was the first line defining the ruby version to use: #!/usr/bin/ruby1.9.1 )

share|improve this answer
add comment

For me the problem seemed to be that I had accidentally configured chef to install bundler with the system ruby gem version which put bundler in a system path:


This bundle version used /usr/bin/gem (as noted in the comment above) which forced version 1.8

Really I wanted it installed in the .rbenv shims location for my user.

To fix the problem I uninstalled bundler while logged in as root which removed it from /usr/local/bin.

I had already installed bundler with gem in my desired ruby version for the user, so now when I call which bundle I see:


and now when I run bundle install the bundle is associated with the current ruby version.

share|improve this answer
add comment

Your Answer


