views:

82

answers:

1

How would one install rubygems on a usb stick so that it would work like it would normally, but all files go on the stick? I have no experience at all with rubygems and have no idea of its inner workings, so please, go easy on me! Thanks in advance, ell.

Edit: Basically, so it is entirely portable!

+1  A: 

Set the $GEM_HOME environment variable to the path where you mounted your usb stick and mine away!

Although for it to be portable you'd have to set $GEM_HOME env-variable on other "host" machines as well.

Eimantas
Note: To do this, add the line `export $GEM_HOME=/usb/stick/gem/installation` to `~/.profile` or `~/.bash_profile`, and start a new shell.
Adrian
@Adrian: Just `export GEM_HOME=…` though (no `$` when setting/exporting variables).
Chris Johnsen