How to install gems when you're not root

A number of people have had a hard time installing Typo from the .gem on hosting providers’ systems where they don’t have the ability to install things as root. So, I sat down with Jim Weirich at OSCON to talk over the best way to handle non-root installs. Apparently RubyGems has support for this, plus or minus a few bugs. Try this:

  $ export GEM_PATH=~/gems
  $ gem install -i ~/gems typo
  $ ~/gems/bin/typo install /some/path

Rubygems 0.9.0 will end up re-installing .gems that are already installed in the system gem directory, but that’s not fatal. It’s just a bit slower then it should be.

Hopefully the next rubygems release will fix this and add a “you aren’t running as root, use -i” warning.

Posted by Scott Laird Fri, 28 Jul 2006 19:50:40 GMT


Comments

  1. Scott Laird 4 days later:

    Sigh. Let’s add one more line–

      export GEM_PATH=~/gems
    
  2. Brad 4 months later:

    Came here from Google. Cheers for this.