Skip to content

Installing Ruby Gems as a non-root user

Information from How to install gems when you’re not root as recorded in Google’s cache (site appears to be down from here, perhaps permanently).

Set the GEM_PATH environment variable:

export GEM_PATH=~/gems

When installing gems, use the “-i” flag:

gem install -i $GEM_PATH some_random_gem

You may wish to add ~/gems/bin to your shell’s path.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*