Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are my ruby gems?

Tags:

linux

ruby

gem

Linux newbie question I guess..

How can I find out where gem installs the gems on my Ubuntu 10 system? I want to read gem sourcecode and perhaps change things up a bit.

like image 280
scrrr Avatar asked May 13 '10 14:05

scrrr


People also ask

Where are my gems installed?

When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/. gem/ruby/1.9.

Where are RubyGems located?

The main place where libraries are hosted is RubyGems.org, a public repository of gems that can be searched and installed onto your machine. You may browse and search for gems using the RubyGems website, or use the gem command. Using gem search -r , you can search RubyGems' repository.

Where are RubyGems installed Mac?

By default, binaries installed by gem will be placed into: /usr/local/lib/ruby/gems/3.1.


1 Answers

Running gem environment should give you a fair bit of information about your RubyGems installation. The field you're looking for is 'INSTALLATION DIRECTORY'.

That said, if you want to modify some gems, there may be better ways to go about it. Most gems, for example, are hosted on github.com. If you make a fork there and make any improvements, you can submit them back to the maintainer in the form of pull requests. Most developers are happy to accept patches (that's why they're on github, right?), and you get a warm fuzzy for making the world a slightly better place for everybody else using that gem.

like image 51
John Hyland Avatar answered Sep 20 '22 03:09

John Hyland