"gem install" broken?

software development


Using ssh I can’t get RubyGems to install applications either from local or remote. This snip says it all:

[soto]$ gem install rmagick
Attempting local installation of 'rmagick’
Local gem file not found: rmagick*.gem
Attempting remote installation of 'rmagick’
ERROR: While executing gem … (Errno::EACCES)
Permission denied - /usr/lib/ruby/gems/1.8/cache/rmagick-1.10.1.gem



You can’t install gems into a public, shared directory. If you could, you could do things that would break other users who are hosted on the same machine as you.

I suggest the following:

  1. do a gem list --local, and realize that rmagick along with many other things are already installed for you.

  2. Add the following lines to your .bash_profile on your shell account:

export GEM_HOME=$HOME/.gems
export GEM_PATH=/usr/lib/ruby/gems/1.8:$GEM_HOME

  1. Install gems as you wish.


Is there anything else I would need to set.

I’m trying to install xhtmldiff which seems to work as I get a ~/.gems directory with gems/xhtmldiff-1.0.0 if I do this…

gem install -i ~/.gems xhtmldiff

but when I rake I get this error:
Could not find RubyGem xhtmldiff (> 0.0.0)