title: Ruby on mac not installing gem showing permission denied
body: <p>I am trying to install a ruby gem in My Machine using xcode where I call a shell script.  </p>
  
  <p>cd  "/Users/Desktop/gemfolder"</p>
  
  <p>gem install somegem.gem</p>
  
  <p>I am getting an error like this:</p>
  
  <pre><code>While executing gem ... (Errno::EACCES)
      Permission denied - /Library/Ruby/Gems/1.8
  </code></pre>
  
  <p>Any workaround for it I am a newbie to ruby so don't know what to do anyhelp will highly appreciated.</p>