2

I just migrated from Windows to Ubuntu, and I am trying to install Ruby 1.9.2 on Ubuntu.

I first installed RVM, and it worked fine.

I ran RVM install 1.9.2 and everything seemed to work fine: it downloaded, configured, compiled and installed everything. At the end, I had the #complete message ... so I thought everything ran fine...

But when I type ruby -v , I get a message

You can get Ruby in the following packages: * Ruby 1.9.1 * Ruby 1.8

I then tried sudo apt-get ruby1.9.2, and I had a message saying that 1.9.2 would be replaced by 1.9.1

I did RVM install 1.8.7, everything seems to work fine, but I have at the end the same problem: Ruby is not recognized...

Typing which ruby does nothing (no answer, no error message).

I am a bit desesperate here, any idea to help me ?

Many thanks in advance !

Olivier

citraL
  • 1,146
  • 1
  • 10
  • 25
  • are you forgetting to `rvm use 1.9.2` ? – nickgrim Dec 02 '11 at 12:14
  • typing this gives me: `Using /usr/share/ruby-rvm/gems/ruby-1.9.2-p180` ... but again, running ruby -v afterwards and still the same answer, asking me to install it from one of the packages... – citraL Dec 02 '11 at 13:21
  • Did you run the install script using sudo ('multi-user installation')? – Luke Girvin Dec 02 '11 at 13:26
  • PATH:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/share otherwise, no I ran the installation of RVM using the GUI of Ubuntu ("logithèque" in French) and Ruby using `RVM install 1.9.2` – citraL Dec 02 '11 at 14:17
  • 1
    @Olivier Martin - I'd suggest removing ruby-rvm and reinstalling using the 'single-user installation' method described here: http://beginrescueend.com/rvm/install/ – Luke Girvin Dec 02 '11 at 14:27
  • 1
    OK, I will do that Luke. Thanks .. by the way, if I type `rvm list`, I received as answer: rvm rubies, then the two version I installed (1.8.7 and 1.9.2), with an arrow that points to 1.9.2 (that I set as default) ... so, strange to have "ruby -v' not working.. – citraL Dec 02 '11 at 14:32
  • http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac look at step 7 on. – Kassym Dorsel Dec 02 '11 at 16:36

2 Answers2

0

It looks like you are using "apt-get broken" RVM, follow this answer for instructions how to fix: Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v

And here is good tutorial for RVM: http://screencasts.org/episodes/how-to-use-rvm

Community
  • 1
  • 1
mpapis
  • 52,729
  • 14
  • 121
  • 158
0

Used rails on VM running Ubuntu 11.10 but after shutdown says "rails is not installed"

Follow the example I provided at the bottom, it works great.

First:

$ sudo apt-get remove rvm

then...

Copy and paste this into a shell.

bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

have fun.

I have had terrible luck with the packaged version of rvm, just install from source via above.

Community
  • 1
  • 1
lukecampbell
  • 14,728
  • 4
  • 34
  • 32