Installing Gems locally?

Has anyone had any success with installing gems themselves? Could you give me a quick runthrough of what is involved? The RubyGems manual is a bit confusing in the area, especially because I’m not sure how DH’s system is set up.


well, getting it installed is easy enough. ‘gem install [name of gem] --install-dir=/home/username/.gems’. You can change ‘.gems’ to be whatever you want. The only thing I’m stuck on is setting the GEM_HOME directory so your apps can find it. Anyone know anything about that?

Did you ever figure out how to install a gem locally? I am trying to install the gem icalendar and can’t get ruby to look for gems outside of GEM_HOME.

if you’re trying to get the gem to work in rails add this to your dispatch.fcgi file (after the first line)

ENV[‘GEM_HOME’] = “/path/to/your/gem/directory” (ie, /home/foo/.gems)

there’s a possibility it will screw up all the other gems though, i’m not 100% sure. it worked for me when i installed my own copy of rails 0.14.2.

Thanks for the info. I was able to get the external library loaded with
in dispatch.fcgi

GEM_HOME is for the system gems and my gems are in GEM_PATH. GEM_HOME probably does not need to be specified since it is already set however I discovered that if you incorrectly set GEM_HOME no dispatch.fcgi processes will ever start until you correctly set the variable.

I can’t seem to get the Rmagick gem to install. Do you think you could write a step-by-step of what you did?


Learn Photoshop -