title: Permission denied error with RVM
body: <p>I have searched for this problem and couldn't find relevant similar questions. Please bear with me if this is repetitive.</p>
  
  <p>I have followed guides in <a href="http://rvm.beginrescueend.com/rvm/install/" rel="noreferrer">RVM</a> website to install RVM and I have installed rubies:</p>
  
  <pre><code>syed@rails:~$ rvm list
  
  rvm rubies
  
     ruby-1.8.7-p302 [ i386 ]
  =&gt; ruby-1.9.2-p0 [ i386 ]
  </code></pre>
  
  <p>As you can see I have made ruby-1.9.2 my default. </p>
  
  <p>This is my gem directory:</p>
  
  <pre><code>syed@rails:~$ rvm gemdir
  /home/syed/.rvm/gems/ruby-1.9.2-p0
  </code></pre>
  
  <p>Now, I tried to install rails and I am thrown the following error:</p>
  
  <pre><code>syed@rails:~$ gem install rails
  ERROR:  While executing gem ... (Errno::EACCES)
      Permission denied - /home/syed/.gem/specs
  </code></pre>
  
  <p>I even did this without making any difference to the error: </p>
  
  <pre><code>syed@rails:~$ chown -R syed /home/syed/.rvm/
  </code></pre>
  
  <p>Currently, my environment looks like this:</p>
  
  <pre><code>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 =&gt; true
       - :verbose =&gt; true
       - :benchmark =&gt; false
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
    - REMOTE SOURCES:
       - http://rubygems.org/
  </code></pre>
  
  <p>I don't understand why it is trying to install gems to my system gem directory path?</p>