2014-02-12 97 views
2

今天,我們的Heroku部署開始了。如何在Heroku上安裝ffi

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

    /tmp/build_6e4275c6-8442-4a39-9175-f20505baf383/vendor/ruby-2.0.0/bin/ruby extconf.rb 
    checking for ffi.h... no 
    checking for ffi.h in /usr/local/include,/usr/include/ffi... no 
    checking for rb_thread_blocking_region()... yes 
    checking for rb_thread_call_with_gvl()... yes 
    checking for rb_thread_call_without_gvl()... yes 
    checking for ffi_prep_cif_var()... no 
    creating extconf.h 
    creating Makefile 

    make "DESTDIR=" 
    Configuring libffi 
    make -C "/tmp/build_6e4275c6-8442-4a39-9175-f20505baf383/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/libffi-x86_64-linux" 
    make[1]: Entering directory `/tmp/build_6e4275c6-8442-4a39-9175-f20505baf383/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/libffi-x86_64-linux' 

的寶石增加包括最近FFI是:

gem 'sass', github: 'nex3/sass' 
    gem 'sass-rails' 
    gem "compass", "~> 1.0.0.alpha.18" 
    gem "compass-rails", "~> 1.1.2" 
    gem 'susy', github: 'ericam/susy', branch: 'susy-next' 

有沒有人運到FFI的Heroku,以避免這種情況?

回答

8

我按照以下步驟處理相同的問題。我建議你這樣做

  1. 添加ffi到你的本地gem文件,指定它的版本爲1.9.0 gem 'ffi', '= 1.9.0'
  2. 卸載版本1.9.3從本地箱gem uninstall ffi -v 1.9.3
  3. 運行bundle update ffi
  4. 提交更改
  5. 推變化的Heroku。
+0

感謝任何線索爲什麼修復工程?你知道這些版本之間有什麼變化嗎? – Schneems