Installing Gems locally?

software development

#1

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.

Thanks,
Tom


#2

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?


#3

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.
-chris


#4

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.


#5

Thanks for the info. I was able to get the external library loaded with
ENV[‘GEM_HOME’]=’/usr/lib/ruby/gems/1.8’
ENV[‘GEM_PATH’]=’/home/ckh/gems’
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.
-chris


#6

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?

thanks

Learn Photoshop - www.photoshopLAB.com