I am new to Ruby and just diving in. The Ruby tutorial says I should get the packaging system from here: http://rubyforge.org/frs/?group_id=126
I am on Ubuntu Linux. The page has a .tar and a .gem option for downloading. Which should I download?
Also, are gems exactly analogous to Java jars? And why do I need the gem packaging system if I can just download gems one by one as they are needed?
Ubuntu now have rubygems as a package
For Ubuntu 12:
For Ubuntu 14.04:
If on Ubuntu 14.04 try below
First, download *.tar file, unpack this file, then go to rubygems directory in your console, and type
That's it :)
If you install the full ruby application set with
sudo apt-get install ruby-full
You will get gems and much more by default. Tested on Ubuntu 16, it could also work on other version.
On Ubuntu 16.04 and Ubuntu 18.04, both
sudo apt-get install rubygems
andsudo apt-get install rubygems-integration
failed for me. Instead, I had to do this:For Ubuntu
First install ruby:
Note that :
sudo snap install ruby
will throw this error :Finally, download latest tar version of ruby gems here: https://rubygems.org/pages/download
Unzip and cd to the folder and finally type in terminal: