Reputation: 987
I get to work with a new project and it's based on ruby 1.8.7, I'm using rvm to manage my ruby versions and I have installed 1.8.7 and 1.9.2.
The thing is when I do:
rvm use 1.8.7
and try to run:
bundle install
I get:
ERROR: Gem bundler is not installed, run `gem install bundler` first.
I've installed bundler 5 times and even after that it says it's not installed. What can cause this? Bundle even shows up at my gem list.
update from comments:
The ouput of the which ruby && which gem is:
/home/username/.rvm/rubies/ruby-1.8.7-p371/bin/ruby
/home/username/.rvm/bin/gem
Output of "env | grep -iE 'ruby|rvm|gem' | sort":
GEM_HOME=/home/username/.rvm/gems/ruby-1.8.7-p371@global
GEM_PATH=/home/username/.rvm/gems/ruby-1.8.7-p371@global
IRBRC=/home/username/.rvm/rubies/ruby-1.8.7-p371/.irbrc
MY_RUBY_HOME=/home/username/.rvm/rubies/ruby-1.8.7-p371
PATH=/home/username/.rvm/gems/ruby-1.8.7-p371@global/bin:/home/username/.rvm/rubies/ruby-1.8.7-p371/bin:/home/username/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
RUBY_VERSION=ruby-1.8.7-p371
rvm_bin_path=/home/username/.rvm/bin
rvm_delete_flag=0
rvm_path=/home/username/.rvm
rvm_prefix=/home/username
rvm_ruby_string=ruby-1.8.7-p371
rvm_sticky_flag=1
rvm_use_flag=1
rvm_version=1.17.7 (stable)
Unistalled and installed 1.8.7 via RVM ran:
rvm install 1.8.7 --verify-downloads 1
and it worked.
Upvotes: 2
Views: 4968
Reputation: 17553
rvm install ruby-1.9.2-p320
use this and remember close all terminal and in edit-> profile preferences--> title and command -->> check (Run command as login shell)
Upvotes: 1
Reputation: 17323
It looks like you're probably running the wrong version of gem
. In my RVM setup, using the shell command overrides recommended with RVM (source "$HOME/.rvm/scripts/rvm"
in your .bashrc
or .zshrc
or another suitable startup file), gem
is normally a shell function. It does some RVM magic under the covers and then runs the real gem
command. In my case, both ruby
and gem
run out of the same version directory:
/home/jim/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
/home/jim/.rvm/rubies/ruby-1.9.3-p327/bin/gem
Make sure you're sourcing the RVM startup script.
Your PATH
looks ok. Make sure you have a /home/username/.rvm/rubies/ruby-1.8.7-p371/bin/gem
command. If not, you may have to reinstall ruby-1.8.7.
Running rvm current
will show which Ruby version and gemset are being used. Make sure there's a gem
in the path that matches the Ruby version.
Upvotes: 4