title: Issue Installing ruby ffi gem dependency
body: <p>I am new to ruby on rails and I am currently following a book called "The Ruby on Rails Tutorial" by Michael Hartl. </p>
  
  <p>There is a problem with installing one of the gem dependencies and I have no idea what it could be. Here is my gem file</p>
  
  <pre><code>source 'https://rubygems.org'
  ruby '2.0.0'
  #ruby-gemset=railstutorial_rails_4_0146 CHAPTER 3. MOSTLY STATIC PAGES
  gem 'rails', '4.0.5'
  group :development, :test do
  gem 'sqlite3', '1.3.8'
  gem 'rspec-rails', '2.13.1'
  gem 'guard-rspec', '2.5.0'
  gem 'spork-rails', '4.0.0'
  gem 'guard-spork', '1.5.0'
  gem 'childprocess', '0.3.3'
  end
  group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
  #Uncomment this line on OS X.
  gem 'growl', '1.0.3'
  # Uncomment these lines on Linux.
  # gem 'libnotify', '0.8.0'
  # Uncomment these lines on Windows.
  # gem 'rb-notifu', '0.0.4'
  # gem 'wdm', '0.1.0'
  end
  gem 'sass-rails', '4.0.1'
  gem 'uglifier', '2.1.1'
  gem 'coffee-rails', '4.0.1'
  gem 'jquery-rails', '3.0.4'
  gem 'turbolinks', '1.1.1'
  gem 'jbuilder', '1.0.2'
  group :doc do
  gem 'sdoc', '0.3.20', require: false
  end
  group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
  end
  </code></pre>
  
  <p>Here is the error I am getting:</p>
  
  <pre><code>*Karls-MacBook-Pro:sample_app karl$ bundle install
  Fetching gem metadata from https://rubygems.org/.........
  Fetching additional metadata from https://rubygems.org/..
  Resolving dependencies...
  Using rake 10.3.2
  Using i18n 0.6.11
  Using minitest 4.7.5
  Using multi_json 1.10.1
  Using thread_safe 0.3.4
  Using tzinfo 0.3.40
  Using activesupport 4.0.5
  Using builder 3.1.4
  Using erubis 2.7.0
  Using rack 1.5.2
  Using rack-test 0.6.2
  Using actionpack 4.0.5
  Using mime-types 1.25.1
  Using polyglot 0.3.5
  Using treetop 1.4.15
  Using mail 2.5.4
  Using actionmailer 4.0.5
  Using activemodel 4.0.5
  Using activerecord-deprecated_finders 1.0.3
  Using arel 4.0.2
  Using activerecord 4.0.5
  Using bundler 1.6.2
  Using mini_portile 0.6.0
  Using nokogiri 1.6.2.1
  Using xpath 2.0.0
  Using capybara 2.1.0
  Using timers 1.1.0
  Using celluloid 0.15.2
  Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
      /Users/karl/.rvm/rubies/ruby-2.0.0-p481/bin/ruby extconf.rb 
  /Users/karl/.rvm/rubies/ruby-2.0.0-p481/bin/ruby: invalid switch in RUBYOPT: -C (RuntimeError)
  Gem files will remain installed in /Users/karl/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0146 CHAPTER 3. MOSTLY STATIC PAGES/gems/ffi-1.0.11 for inspection.
  Results logged to /Users/karl/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0146 CHAPTER 3. MOSTLY STATIC PAGES/gems/ffi-1.0.11/ext/ffi_c/gem_make.out
  An error occurred while installing ffi (1.0.11), and Bundler cannot continue.
  Make sure that `gem install ffi -v '1.0.11'` succeeds before bundling.
  </code></pre>
  
  <p>So I did try to install ffi with it's version 1.0.11 and I got this:</p>
  
  <pre><code>Karls-MacBook-Pro:sample_app karl$ gem install ffi -v 1.0.11
  Building native extensions.  This could take a while...
  ERROR:  Error installing ffi:
      ERROR: Failed to build gem native extension.
  
      /Users/karl/.rvm/rubies/ruby-2.0.0-p481/bin/ruby extconf.rb
  /Users/karl/.rvm/rubies/ruby-2.0.0-p481/bin/ruby: invalid switch in RUBYOPT: -C (RuntimeError)
  
  
  Gem files will remain installed in /Users/karl/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0146 CHAPTER 3. MOSTLY STATIC PAGES/gems/ffi-1.0.11 for inspection.
  Results logged to /Users/karl/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0146 CHAPTER 3. MOSTLY STATIC PAGES/gems/ffi-1.0.11/ext/ffi_c/gem_make.out
  </code></pre>
  
  <p>Is this a C error of some sort? Not really sure how to fix this. Any help would be appreciated. Thank you</p>