-2

When I do bundle install in a rails app I get: Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0

> rvm install 2.0.0

Already installed ruby-2.0.0-p247.

> which ruby

/home/myuser/.rvm/bin/ruby

Previously I had included the following in ~/.bashrc:

PATH=$HOME/.rvm/bin:$PATH

> which -a ruby

/home/hector/.rvm/bin/ruby

/usr/bin/ruby

I'm on Ubuntu 12.10. What I'm doing wrong? Thanks!

Marek Lipka
  • 50,622
  • 7
  • 87
  • 91
HectorPerez
  • 744
  • 6
  • 11

3 Answers3

1

install rvm

http://rvm.io/rvm/install

make a default ruby to load:

$ rvm --default use ruby-2.0.0-p247

or just switch to a desired one:

rvm use ruby-2.0.0-p247

use the one installed on your system:

rvm use system

for rvm is not a function see here: rvm installation not working: "RVM is not a function"

the first line of the accepted answer might help you fast: you are not using an login shell

Community
  • 1
  • 1
rmagnum2002
  • 11,341
  • 8
  • 49
  • 86
0

You need to tell rvm which version of ruby to use.

rvm use 2.0.0
Ryhnn
  • 456
  • 1
  • 5
  • 16
  • I tried but I got: RVM is not a function, selecting rubies with 'rvm use ...' will not work. You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin/bash --login` as the command. Please visit https://rvm.io/integration/gnome-terminal/ for a example. – HectorPerez Aug 01 '13 at 12:10
  • @user2140139 did you follow these instructions? – Marek Lipka Aug 01 '13 at 12:11
  • I've run into that /bin/bash --login issue with rvm before. I can't seem to recall how I got around it though... – Ryhnn Aug 01 '13 at 12:20
0

Check with this also

Just type '/bin/bash --login' in your terminal (after restarting your terminal), then type the comand 'rvm use 2.0.0' (for e.g.) and it will start using the same version.

Just execute the command 'ruby -v' to confirm that the RVM is using the updated version of Ruby.

Debadatt
  • 5,935
  • 4
  • 27
  • 40