2014-07-11 2 views
1

저는 레일즈에서 루비를 처음 접했고 현재 Michael Hartl의 "The Ruby on Rails Tutorial"라는 책을 읽었습니다.문제 ruby ​​ffi gem 의존성 설치

보석 의존성 중 하나를 설치하는 데 문제가 있으며 그게 무엇인지 모릅니다. 여기 내 보석 파일 여기

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 

내가 점점 오전 오류입니다 :

*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. 

그래서 나는 그것이 버전 1.0.11의와 FFI를 설치하려고 않았다와 나는이있어 :

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 

어떤 종류의 C 오류입니까? 이 문제를 해결하는 방법을 잘 모르겠습니다. 어떤 도움을 주시면 감사하겠습니다. 감사합니다

답변

1

시도 brew install libffi, 또는 이전 버전의 gem을 설치하십시오. this question

보기