How to update ruby ​​on linux (ubuntu)?

I'm new to ruby ​​and linux, so I'm sure this is trivial, but I don't know yet. I currently have ruby ​​1.8.7 installed and I want to upgrade it to ruby ​​1.9. How can i do this?

+41
linux ruby installation ubuntu
Sep 10 '09 at 3:57
source share
9 answers
sudo apt-get install ruby1.9 

gotta do the trick.

You can find which libraries are available for installation through

 apt-cache search <your search term> 

So, I just did apt-cache search ruby | grep 9 apt-cache search ruby | grep 9 to find it.

You will probably have to invoke the new Ruby as ruby1.9 , because Ubuntu will probably default to 1.8 if you just type ruby .

+51
Sep 10 '09 at 4:02
source share

There really is no reason to remove ruby1-8 if someone else does not know better. Run the commands below to install 1.9, and then bind ruby ​​to point to the new version.

 sudo apt-get install ruby1-9 rubygems1-9 sudo ln -sf /usr/bin/ruby1-9 /usr/bin/ruby 
+36
Sep 10 '09 at 4:05
source share

On Ubuntu 12.04 (Precise Pangolin), I got this working with the following command:

 sudo apt-get install ruby1.9.1 sudo apt-get install ruby1.9.3 
+16
Jun 09 '12 at 23:14
source share

Now Ruby is now v2.0. Programs like Jekyll (and I'm sure many others) require this. I just ran:

sudo apt-get install ruby2.0

check version

 ruby --version 

Hope that helps

+10
Jan 03 '15 at 5:11
source share

The author of this article claims that it would be better to avoid installing Ruby from the local package manager, but to use RVM .

You can easily switch between different versions of Ruby:

 rvm use 1.9.3 

and etc.

+8
Apr 30 '12 at 7:24
source share

the above is not bad, but its difference from 11.10

 sudo apt-get install ruby1.9 rubygems1.9 

which will install ruby ​​1.9

when linking you just use ls /usr/bin | grep ruby ls /usr/bin | grep ruby it should output ruby1.9.1

and then you sudo ln -sf /usr/bin/ruby1.9.1 /usr/bin/ruby and you will go racing.

+4
Apr 19 2018-12-12T00:
source share

First, which version of ubuntu you are using, it may be easiest to upgrade to one that has it.

Then enable backports (system menu, administrator, software sources) and search in synaptic mode.

Finally, find the ppa for it.

+1
Sep 10 '09 at 4:03
source share

If you look like me using ubuntu 10.10 & amp; can't find the latest version which is now

  • ruby1.9.3

here you can get it http://www.ubuntuupdates.org/package/brightbox_ruby_ng_experimental/maverick/main/base/ruby1.9.3

or upload the file *. deb :)

& remember that it will not change your old version of ruby

+1
Jul 09 2018-12-12T00:
source share

Typically, software versions are associated with the version of your operating system. Therefore, if you use gutsy, you will either have to upgrade to the new version of jaunty jackalope, which has ruby ​​1.9, or add controls for jaunty to the /etc/apt/sources.list file. Once you do this, you can start the synaptic package manager and you should see it there.

0
Sep 10 '09 at 4:07
source share



All Articles