Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RVM bundle not found

Tags:

ruby

rvm

I just installed rvm and then the bundler gem.

➜  ~  ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.0]
➜  ~  gem list|grep bundler
bundler (1.0.12)

But when I try to run the bundle command then I got the following error:

➜  ~  which bundle
bundle not found

The interesting thing is that it works if I prepend "rvm ruby"

➜  ~  rvm ruby bundle

Still, I don't think like I should prepend rvm ruby before any command. Is this behavior correct?

EDIT: apparently the problem is that the default configuration is not remembered between shells.

If I type "rvm 1.8.7 --default" then it works, but as soon as I open a new shell it doesn't.

like image 561
Oscar Del Ben Avatar asked Apr 14 '11 08:04

Oscar Del Ben


2 Answers

Run $ rvm use 1.8.7 and you should be good. The reason for this is that rvm will use the system ruby/gems unless you specify otherwise. You can verify this by running which ruby and checking the path.

You can set the default ruby with rvm as well, like so: $ rvm --default use 1.8.7.

like image 132
coreyward Avatar answered Oct 15 '22 14:10

coreyward


My problem was that I had .rvm/bin on my path on .zshrc, which was causing all kind of troubles

like image 5
Oscar Del Ben Avatar answered Oct 15 '22 14:10

Oscar Del Ben