0

I am trying to get Ruby and RVM working on my Ubuntu system, but I am experiencing strange behaviour. I am a new to Ruby, so I may have missed something basic.

I cloned octopress into a folder, and there is a .rvmrc file in there that contains:

rvm use 1.9.2

The thing is that when I enter the folder, the file is not taken into account. If I run:

ruby --version

I get:

ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

I tried:

./.rvmrc

and:

rvm reload

It seems to work, as I get:

Using /usr/share/ruby-rvm/gems/ruby-1.9.2-p320
Running /usr/share/ruby-rvm/hooks/after_cd
Using /usr/share/ruby-rvm/gems/ruby-1.9.2-p320

as a result. However, running ruby --version again does not change anything.

The really strange thing is that everything works fine If I connect myself to my localhost using ssh.

I installed Rake using "Installing RVM on Linux".

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
jlengrand
  • 12,152
  • 14
  • 57
  • 87

2 Answers2

1

You are probably running into issues due to recent changes in how RVM expects to be loaded (the method in that link isn't correct IIRC). Follow the steps at https://rvm.io/rvm/upgrading/. Also, use rvm get stable --auto to properly configure your bash scripts

Jim Deville
  • 10,632
  • 1
  • 37
  • 47
  • Thanks for the reply. Which command should I use? I tried rvm get stable --auto but it doesn't seem to change anything by itself :s – jlengrand Jun 05 '12 at 05:02
  • if you just installed, then rvm get stable --auto won't change anything in the rvm code, but it will modify your .bash* startup files to reflect the correct config. Try logging out and back in, and if that doesn't work, it may be worth reading through the help on rvm.io, and/or looking for help on the #rvm IRC channel – Jim Deville Jun 05 '12 at 05:24
  • Ok, Thanks for the help. I'll have a closer look at this tonight. What I really don't get is that everything works fine through ssh. When directly using commands in a terminal, I get errors for all my rake/bundle commands. There must be a logical reason for this :). – jlengrand Jun 05 '12 at 05:40
0

Finally found the solution here :

Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v

Thanks Jim for having pointed me to the documentation. I found lots of great stuff in there :).

Community
  • 1
  • 1
jlengrand
  • 12,152
  • 14
  • 57
  • 87