title: Problems installing Nokogiri
body: <p>I'm following <a href="http://ruby.railstutorial.org/" rel="nofollow noreferrer">this tutorial</a> and I've come to where I need to install these gems:</p>
  
  <pre><code>gem 'rails', '3.0.3'
  
  gem 'sqlite3-ruby', :require =&gt; 'sqlite3'
  
  group :development do
    gem 'rspec-rails', '2.0.1'
  end
  
  group :test do
    gem 'rspec', '2.0.1' 
    gem 'webrat', '0.7.1'
  end
  </code></pre>
  
  <p>Then I do a:</p>
  
  <pre><code>bundle install
  </code></pre>
  
  <p>But terminal gives me this:</p>
  
  <pre><code>Fetching source index for http://rubygems.org/
  Using rake (0.8.7) 
  Using abstract (1.0.0) 
  Using activesupport (3.0.3) 
  Using builder (2.1.2) 
  Using i18n (0.5.0) 
  Using activemodel (3.0.3) 
  Using erubis (2.6.6) 
  Using rack (1.2.2) 
  Using rack-mount (0.6.14) 
  Using rack-test (0.5.7) 
  Using tzinfo (0.3.26) 
  Using actionpack (3.0.3) 
  Using mime-types (1.16) 
  Using polyglot (0.3.1) 
  Using treetop (1.4.9) 
  Using mail (2.2.16) 
  Using actionmailer (3.0.3) 
  Using arel (2.0.9) 
  Using activerecord (3.0.3) 
  Using activeresource (3.0.3) 
  Using bundler (1.0.12) 
  Using diff-lcs (1.1.2) 
  Installing nokogiri (1.4.4) /Library/Ruby/Site/1.8/rubygems/installer.rb:574:in `initialize': Permission denied - /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.4/.autotest (Errno::EACCES)
  from /Library/Ruby/Site/1.8/rubygems/installer.rb:574:in `open'
  </code></pre>
  
  <p>I've done a bunch of research on this and I've found some people who had the same problems:
  <a href="http://taleswithrails.com/2011/01/error-gemfile-could-not-find-gem-webrat/" rel="nofollow noreferrer">http://taleswithrails.com/2011/01/error-gemfile-could-not-find-gem-webrat/</a></p>
  
  <p>And I've read the installation guide: <a href="http://nokogiri.org/tutorials/installing_nokogiri.html" rel="nofollow noreferrer">http://nokogiri.org/tutorials/installing_nokogiri.html</a></p>
  
  <p>But I can't get:</p>
  
  <pre><code>sudo port ...
  </code></pre>
  
  <p>or </p>
  
  <pre><code>sudo apt-get ...
  </code></pre>
  
  <p>To work. They return with "command not found". So I think I have two issues here...</p>
  
  <p>1) Nokogiri is not installing properly and I'm not sure why. I also don't know what "flavor" of machine I'm running (in other words, which of the Nokogiri installation instructions pertains to my setup).</p>
  
  <p>2) Those commands don't work on my system (OSX 10.6) and I'm not sure why. I've read up on Macports and libxml2 but it's a little unclear to me what it is and what I need to do (or if it's even applicable to me). I did try installing macports, but I don't have Xcode, which is required. But I'm not a "mac developer". Is this my only option?</p>