2014-07-11 3 views
1

Je suis novice en ruby ​​on rails et je suis actuellement en train de suivre un livre intitulé "The Ruby on Rails Tutorial" de Michael Hartl.Problème Installation de la dépendance ruby ​​ffi gem

L'installation de l'une des dépendances de la gemme pose un problème et je n'ai aucune idée de ce que cela pourrait être. Voici mon fichier petit bijou

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 

Voici l'erreur que je reçois:

*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/[email protected]_rails_4_0146 CHAPTER 3. MOSTLY STATIC PAGES/gems/ffi-1.0.11 for inspection. 
Results logged to /Users/karl/.rvm/gems/[email protected]_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. 

J'ai essayé d'installer ffi avec sa version 1.0.11 et je me suis ceci:

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/[email protected]_rails_4_0146 CHAPTER 3. MOSTLY STATIC PAGES/gems/ffi-1.0.11 for inspection. 
Results logged to /Users/karl/.rvm/gems/[email protected]_rails_4_0146 CHAPTER 3. MOSTLY STATIC PAGES/gems/ffi-1.0.11/ext/ffi_c/gem_make.out 

Est-ce une erreur C de quelque sorte? Pas vraiment sûr de savoir comment résoudre ce problème. Toute aide serait appréciée. Merci

Répondre

1

Essayez brew install libffi ou d'installer la version précédente de la gemme. Voir this question