tags:

views:

68

answers:

1

Hello, 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.

+2  A: 

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.

John Hyland
Great answer! @scrr, you should also consider monkey-patching as a bit less hackish way to alter behaviour of other people's code.
Mladen Jablanović
Also: If you want info about specific gems, `gem list -d` will tell you about each one individually (ending up with multiple installations is not as crazy as it seems, in my experience).
bnaul
ah,, excellent. thanks for the quick answers. now to read some sourcecode.. :)
scrrr