I'm trying to update Ruby on my Ubuntu system. What should I do after installing Ruby 1.9.1? Since ruby -v gives 1.8.7 I'm assuming there are probably some configuration changes I need to do. But I have no idea what. I'm very new at Linux as well.
on 2011-06-05 02:22
on 2011-06-05 02:43
try "ruby1.9.1 -v" and to run code under 1.9.1 - "ruby1.9.1 foo.rb" 1.8.7 is still your system default ruby. there may well be other ways, but i have used both rvm and update-alternatives to switch between multiple versions of ruby. if you've installed both versions from the ubuntu repository, update-alternatives should work well for you... http://www.veebsbraindump.com/2010/08/supporting-multiple-ruby-versions-on-ubuntu-10-04-lucid/ - j
on 2011-06-06 21:38
From the command line, type $ which ruby /usr/bin/ruby (on my machine) Go to the directory specified and type $ ls ruby* You'll probably see 'ruby1.8', 'ruby1.9.1' and 'ruby' plain side by side in the directory. The last one, 'ruby', is most likely a link to ruby1.8. Try to delete the link and remake it, pointing to ruby1.9.1 instead.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.