You are not logged in.

#1 2014-06-05 00:00:47

heimer16
Member
Registered: 2012-03-15
Posts: 20

Ruby Gem Install Permissions Error for default --user-install

I'm getting a permissions error when trying to install ruby gems in the user .gem folder.  According to the wiki, it should be installing in the user dir by default.  However, when running gem install x as a regular user,  I just get a permissions error:

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/lib/ruby/gems/2.1.0 directory.

My /etc/gemrc file is:

gem: --user-install

I completely removed ruby and any dependent packages, reinstalled ruby and run gem install, and it still gives the permissions error.
and I've added "`ruby -e 'puts Gem.user_dir'`/bin:$PATH" so my path includes the local .gem directory, but this shouldn't affect gem installation

any idea on why it would still be trying to install to /usr/lib?

Offline

#2 2014-06-05 00:53:44

ids1024
Member
From: California
Registered: 2013-08-16
Posts: 243
Website

Re: Ruby Gem Install Permissions Error for default --user-install

What happens when you run

gem install --user-install GEMNAME

Last edited by ids1024 (2014-06-05 02:43:40)


"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/

https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024

Offline

#3 2014-06-05 03:54:42

heimer16
Member
Registered: 2012-03-15
Posts: 20

Re: Ruby Gem Install Permissions Error for default --user-install

ids1024 wrote:

What happens when you run

gem install --user-install GEMNAME

Installs fine using --user-install

...so also following the wiki, I had

gem: --no-document

in my ~/.gemrc file, assuming it would be combined with /etc/gemrc, but I guess it overrides it. 
either removing ~/.gemrc or adding --user-install to the gem: line in ~/.gemrc solves the issue

Offline

Board footer

Powered by FluxBB