Linux permission for Gems
I have Rubymine 2.02 set up on fedora When Installing gems I get the following message: You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory.
I know this is a permissions problem but I am not sure if I need to run: chown rubmine or what I need to do to set the corrct permissions
Do any other linux users have an easy fix?
Tom
Please sign in to leave a comment.
Hi Tom,
Since rubygems 1.3.6 —user-install is no longer the default. To turn it back again you need to open ~/.gemrc and write:
install: --user-install
I have rails up in 1.86 but I recently added rvm to my Fedora 12 setup and Rubymine recognizes 1.87 and 1.92 but I get this message installing rails probably back to my permissions issues rails (3.0.0): While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /home/tmb/.rvm/gems/ruby-1.9.2-head directory Tom Brooke
Have you installed RVM system-wide or only for yourself?
Please attach output for these commands : rvm use 1.8.7 and rvm info
Good Question I don't see anything about ownership Here's the stuff rvm use 1.8.7 info: Using ruby 1.8.7 p302 [tmb@localhost ~]$ rvm info ruby-1.8.7-p302: system: uname: "Linux localhost.localdomain 2.6.32.11-102.fc12.i686 #1 SMP Tue Apr 13 16:09:22 UTC 2010 i686 i686 i386 GNU/Linux" zsh: "not installed" bash: "GNU bash, version 4.0.35(1)-release (i386-redhat-linux-gnu)" rvm: version: "rvm 1.0.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]" ruby: interpreter: "ruby" version: "1.8.7" date: "2010-08-16" platform: "i686-linux" patchlevel: "2010-08-16 patchlevel 302" full_version: "ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]" homes: gem: "/home/tmb/.rvm/gems/ruby-1.8.7-p302" ruby: "/home/tmb/.rvm/rubies/ruby-1.8.7-p302" binaries: ruby: "/home/tmb/.rvm/rubies/ruby-1.8.7-p302/bin/ruby" irb: "/home/tmb/.rvm/rubies/ruby-1.8.7-p302/bin/irb" gem: "/home/tmb/.rvm/rubies/ruby-1.8.7-p302/bin/gem" rake: "/usr/bin/rake" environment: PATH: "/home/tmb/.rvm/gems/ruby-1.8.7-p302/bin:/home/tmb/.rvm/gems/ruby-1.8.7-p302@global/bin:/home/tmb/.rvm/rubies/ruby-1.8.7-p302/bin:/home/tmb/.rvm/bin:/opt/jdk.1.0_21/:/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/tmb/bin" GEM_HOME: "/home/tmb/.rvm/gems/ruby-1.8.7-p302" GEM_PATH: "/home/tmb/.rvm/gems/ruby-1.8.7-p302:/home/tmb/.rvm/gems/ruby-1.8.7-p302@global" BUNDLE_PATH: "/home/tmb/.rvm/gems/ruby-1.8.7-p302" MY_RUBY_HOME: "/home/tmb/.rvm/rubies/ruby-1.8.7-p302" IRBRC: "/home/tmb/.rvm/rubies/ruby-1.8.7-p302/.irbrc" RUBYOPT: "rubygems" gemset: "" [tmb@localhost ~]$
Probably gemset or ruby was installed with sudo. You don't need to do it as a superuser, it's better to run rvm as a current user. Please try running: sudo chown -R <yourusername> ~/.rvm to fix your permissions on .rvm folder.
Got Rails 3
Thank You
Could Rubymine check the permissions of that folder (~/.gemrc) and report an error if it is not writable and show you a message on how to fix it? I too was frustrated by not being able to install gems from within Rubymine.
Hello Scott,
It sounds reasonable, please submit a feature request - http://youtrack.jetbrains.net/issues/RUBY