Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gems folder is root only #69

Open
ghost opened this issue Mar 12, 2013 · 3 comments
Open

Gems folder is root only #69

ghost opened this issue Mar 12, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 12, 2013

I'm using this :

include 'rvm' 

rvm::system_user { vagrant: }

rvm_system_ruby { 'ruby-2.0.0':
  ensure => 'present',
  default_use => true,
}

After, I do "gem install bundler" and I get

ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /usr/local/rvm/gems/ruby-2.0.0-p0/cache/bundler-1.3.2.gem

[vagrant@localhost ~]$ ls -al /usr/local/rvm/gems/ruby-2.0.0-p0/
total 28
drwxrwsr-x 7 root rvm  4096 Mar  7 12:45 .
drwxrwsr-x 6 root rvm  4096 Mar 12 11:15 ..
drwxr-xr-x 2 root root 4096 Mar  7 12:44 build_info
drwxr-xr-x 2 root root 4096 Mar  7 12:44 cache
drwxrwsr-x 3 root rvm  4096 Mar  7 12:45 doc
drwxr-xr-x 5 root root 4096 Mar  7 12:44 gems
drwxr-xr-x 3 root root 4096 Mar  7 12:44 specifications

I'm using Vagrant and CentOS 6.3

@jaimeschettini
Copy link

I have the same issue. What is the right way of solving it?

@ghost
Copy link
Author

ghost commented Apr 4, 2013

I chatted with maintainers on the rvm irc channel and the only way to fix this, since rvm is installed by root, is the change the permissions after installing your rubies.

exec { 'fix_rvm_permissions':
  command => '/bin/chmod -R 775 /usr/local/rvm ; /bin/chown -R :rvm /usr/local/rvm',
  require => Rvm_gem["${ruby_version}/rails"]
}

@arruda
Copy link

arruda commented Aug 23, 2013

oh lord =/
well... at least it works right...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants