I have searched for this problem and couldn't find relevant similar questions. Please bear with me if this is repetitive.
I have followed guides in RVM website to install RVM and I have installed rubies:
syed@rails:~$ rvm list
rvm rubies
ruby-1.8.7-p302 [ i386 ]
=> ruby-1.9.2-p0 [ i386 ]
As you can see I have made ruby-1.9.2 my default.
This is my gem directory:
syed@rails:~$ rvm gemdir
/home/syed/.rvm/gems/ruby-1.9.2-p0
Now, I tried to install rails and I am thrown the following error:
syed@rails:~$ gem install rails
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /home/syed/.gem/specs
I even did this without making any difference to the error:
syed@rails:~$ chown -R syed /home/syed/.rvm/
Currently, my environment looks like this:
syed@rails:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /home/syed/.rvm/gems/ruby-1.9.2-p0@rails3
- RUBY EXECUTABLE: /home/syed/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
- EXECUTABLE DIRECTORY: /home/syed/.rvm/gems/ruby-1.9.2-p0@rails3/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /home/syed/.rvm/gems/ruby-1.9.2-p0@rails3
- /home/syed/.rvm/gems/ruby-1.9.2-p0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I don't understand why it is trying to install gems to my system gem directory path?