Question

This started today with our Heroku deployments.

   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'

The gems added recently including ffi are:

  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'

Has anyone shipped ffi to Heroku to avoid this?

Was it helpful?

Solution

I followed the following steps to deal with the same issue. I would suggest doing the same

  1. Add ffi to your local gemfile, specifying its version to be 1.9.0, e.g. gem 'ffi', '= 1.9.0'
  2. Uninstall version 1.9.3 from your local box gem uninstall ffi -v 1.9.3
  3. Run bundle update ffi
  4. Commit the changes
  5. Push the changes to heroku.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top