Installing Ruby 1.9.1 on Ubuntu? Installing Ruby 1.9.1 on Ubuntu? ruby ruby

Installing Ruby 1.9.1 on Ubuntu?


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.


After running

sudo apt-get install ruby1.9.1-full

It's solution is to run the following command:

sudo update-alternatives --config ruby

Then you will get this output:

   There are 2 choices for the alternative ruby (providing /usr/bin/ruby).     Selection    Path                Priority   Status   ------------------------------------------------------------   * 0            /usr/bin/ruby1.8     50        auto mode     1            /usr/bin/ruby1.8     50        manual mode     2            /usr/bin/ruby1.9.1   10        manual mode   Press enter to keep the current choice[*], or type selection number: 2   update-alternatives: using /usr/bin/ruby1.9.1 to provide /usr/bin/ruby (ruby) in    manual mode.   $ ruby --version   ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

Credit for this solution goes to person who answered https://askubuntu.com/questions/91693/how-do-you-uninstall-ruby-1-8-7-and-install-ruby-1-9-2 . Currently the ruby1.9.1 package is actually ruby 1.9.2.