I got this error, for all gem that I try to install:
ERROR: While executing gem … (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.9.1 directory.
obs. I'm running on Ubuntu 14.
rubyruby-on-railsrubygems
I got this error, for all gem that I try to install:
ERROR: While executing gem … (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.9.1 directory.
obs. I'm running on Ubuntu 14.
Best Answer
According the question I see a few steps in order to allow writing to
/var/lib/gems
:Create
gems
(if not any) group, and add yourself to the group:When reenter to the session:
Allow write for a
gems
group to/var/lib/gems/
, and set thesetgid
bits:Try installing gems into
/var/lib/gems/
.NOTE: I strongly advice you to control rubies and gems via rbenv/rvm keeping them in a local home folder. Please refer to the answer to know how to properly setup your project.