Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Ruby 1.9.1 on Ubuntu?

I wonder about installing the latest version of Ruby on Ubuntu 9.04. Now I can run through the ./configure and make stuff fine, but what I wonder about: how to avoid conflicts with the packaging system? For example if some other package I install depends on Ruby, wouldn't the package manager install the (outdated) Ruby package and in the worst case overwrite my files?

So I think I need some way to tell Ubuntu that Ruby is in fact already installed?

like image 574
Björn Avatar asked Jul 10 '09 13:07

Björn


People also ask

How do I install a specific version of Ruby?

Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.

How do I update Ruby to latest version in Ubuntu?

Run the command rvm install 2.7. 1 . Alternatively, you can run rvm install ruby which will install the latest stable version (this will install v2. 7.0).


2 Answers

Save yourself the headache and use RVM (Ruby Version Manager)

Keep in mind, Rails 3 works best with Ruby 1.9.2. Ruby 1.9.2 fixes up quite a few bugs in 1.9.1 and is preferable to running 1.9.1.

With RVM installing 1.9.2 is a breeze.

like image 53
Sam Saffron Avatar answered Sep 29 '22 05:09

Sam Saffron


sudo apt-get install ruby1.9.1-full 

(http://www.ruby-lang.org/en/downloads/)

like image 30
Ian Vaughan Avatar answered Sep 29 '22 06:09

Ian Vaughan