Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I install gems with apt-get on Ubuntu?

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?

like image 440
Genadinik Avatar asked Apr 20 '11 20:04

Genadinik


People also ask

Where are RubyGems installed Ubuntu?

gem/ruby/1.9. 1 . The commands provided by the gems you installed will end up in ~/. gem/ruby/1.9.

Does Ubuntu come with Ruby?

Not by default. Nothing in the default install uses it, so it's not installed.

How do I install gem packages?

With the --local ( -l ) option, you would perform a local search through your installed gems. To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs.


1 Answers

Ubuntu now have rubygems as a package

For Ubuntu 12:

sudo apt-get install rubygems 

For Ubuntu 14.04:

sudo apt-get install rubygems-integration 
like image 143
Yada Avatar answered Sep 28 '22 09:09

Yada