2014-02-12 141 views
1

我尝试部署我的应用程序的Heroku的捆绑过程中失败,但我收到以下错误:部署到Heroku的宝石

Installing mini_portile (0.5.2) 
    Installing ntlm-http (0.1.1) 
    Installing webrobots (0.1.1) 
    Installing naturalsorter (0.2.2) 
    Using pg (0.17.0) 
    Using bundler (1.5.2) 
    Using raindrops (0.12.0) 

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

    /tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/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 
    /tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/libffi/configure: 

line 7774: conftest.c: No such file or directory /tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/libffi/configure: line 1698: conftest.i: No such file or directory sed: can't read conftest.c: No such file or directory /tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/libffi/configure: line 7774: conftest.c: No such file or directory /tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/libffi/configure: line 1698: conftest.i: No such file or directory sed: can't read conftest.c: No such file or directory configure: error: in /tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/libffi-x86_64-linux': configure: error: C preprocessor "gcc -E" fails sanity check See config.log' for more details make: * ["/tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a] Error 1

Gem files will remain installed in /tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3 

for inspection. Results logged to /tmp/build_4fb17050-b89d-47de-afc2-a6442ad2c755/vendor/bundle/ruby/2.0.0/gems/ffi-1.9.3/ext/ffi_c/gem_make.out Installing kgio (2.9.1) Installing rdiscount (2.1.7) Installing sass (3.3.0.rc.3) An error occurred while installing ffi (1.9.3), and Bundler cannot continue. Make sure that gem install ffi -v '1.9.3' succeeds before bundling. ! ! Failed to install gems via Bundler. !

! Push rejected, failed to compile Ruby app

任何想法,我能做些什么?

+0

您的本地机器是Windows机器吗? – Vidya

+0

不,我正在使用Mac – rctneil

+0

好人。推送* Gemfile *和* Gemfile.lock *? – Vidya

回答

1

我们已经遇到了同样的问题:How to install ffi on Heroku

我们跟踪它到指南针试图在Heroku上安装不兼容的可执行文件(FFI),并且它不安装。这很愚蠢,因为我们不需要在Heroku上安装FFI,因为它只是一种开发模式依赖。

罗盘需要捆绑它的依赖关系,而不是在生产服务器上安装不必要的gem/executables(使用add_development_dependency),或者Heroku需要允许它安装在/ tmp目录中。

遗憾的是,我们已经恢复了我们的代码不使用罗盘的测试版,我们还没有解决这个问题,我们正在考虑切换到波旁,不具有不必要的生产依赖。

+0

谢谢你。我设法在我的Gemfile中晃动了一些东西,并最终设法让它在Heroku上正确地绑定我的宝石。谢谢! – rctneil

+0

解决方案是什么? –

+0

我也想知道你是如何解决它的。请分享您的解决方案。 – RantriX