Skip to content

Instantly share code, notes, and snippets.

@roidrage
Created November 13, 2012 20:06
Show Gist options
  • Save roidrage/4068051 to your computer and use it in GitHub Desktop.
Save roidrage/4068051 to your computer and use it in GitHub Desktop.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/travis/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
Makefile creation failed
**************************************************************************
No source for ruby-1.9.3-p327 provided with debugger-ruby_core_source gem.
**************************************************************************
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/travis/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
Gem files will remain installed in /home/travis/.rvm/gems/ruby-1.9.3-p327/gems/debugger-linecache-1.1.2 for inspection.
Results logged to /home/travis/.rvm/gems/ruby-1.9.3-p327/gems/debugger-linecache-1.1.2/ext/trace_nums/gem_make.out
An error occured while installing debugger-linecache (1.1.2), and Bundler cannot continue.
Make sure that `gem install debugger-linecache -v '1.1.2'` succeeds before bundling.
@eric-hu
Copy link

eric-hu commented Nov 13, 2012

I ran into this too. It looks like the debugger dependency is incompatible with patchlevel 327 for now, but Travis recommends excluding debugger for CI anyways.

I mailed the google group about this, but I came up with a solution. This is how I figured out how to make debugger installed for local development and not for CI.


Minimal code example follows:

---------- Gemfile ----------

group :debugging do
gem 'debugger'
end

---------- .travis.yml ----------

bundler_args: --without debugging

---------- config/application.rb ----------

if defined?(Bundler)

Don't load the debug bundler group for Travis CI

debug_group = ENV['TRAVIS'] ? %w{development} : %w{development test}

bundle_groups = {
:assets => %w{development test},
:debugging => debug_group
}

If you precompile assets before deploying to production, use this line

Bundler.require *Rails.groups(bundle_groups)
end

@ibanez270dx
Copy link

This worked for me as well as a bunch of other people from this gist: https://gist.github.com/4060260

gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p327/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment