Linux - troubleshooting gem install

suggest change

gem install nokogiri, from the Gems example, can fail when the account cannot write the install directory. There is more than one way to fix that.

Solution a:

sudo installs the gem for every user. Use it only for a gem that every account should have. Most accounts should not use sudo for gems.

$> sudo gem install nokogiri

Solution b:

--user-install installs gems into your user gem directory (usually ~/.gem):

$> gem install nokogiri --user-install

Solution c:

Set GEM_HOME and GEM_PATH so gem install writes gems to a directory you choose. A common choice:

$> nano ~/.bashrc
export GEM_HOME=$HOME/.gem
export GEM_PATH=$HOME/.gem

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents