17

I am trying to bundle install but it is showing the above error or debugger..Please find the detailed error from the terminal

Installing debugger-linecache (1.1.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/local/ruby/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.2-p0 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=/usr/local/ruby/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 /usr/local/ruby/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.1 for inspection.
Results logged to /usr/local/ruby/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.1/ext/trace_nums/gem_make.out 

An error occured while installing debugger-linecache (1.1.1), and Bundler cannot continue.
Make sure that `gem install debugger-linecache -v '1.1.1'` succeeds before bundling.

If i type ruby-v in the terminal I get ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

If I do gem install debugger-linecache I still get the same error. How this can be solved. Please help??

Simon
  • 1,716
  • 1
  • 21
  • 37
rubyist
  • 3,074
  • 8
  • 37
  • 69
  • 1
    I faced a similar kind of issue. Can you comment out gem debugger and then run bundle install, after it succeeds, uncomment and then run bundle install again. It should run fine – Manjunath Manoharan Oct 28 '12 at 11:15
  • I tried it.. When I uncommented it, it succeeded. After that when I uncomment gem debugger and run bundle install again it is showing error as "Errno::EACCES: Permission denied - /usr/local/ruby/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.2/.travis.yml 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. " – rubyist Oct 28 '12 at 11:22
  • I gave sudo -i and then bundle install but still the same error result as above – rubyist Oct 28 '12 at 11:23
  • gem 'ruby-debug19', :require => 'ruby-debug'. Put this instead of gem debugger – Manjunath Manoharan Oct 28 '12 at 11:26
  • I tried that. But got the error as "Installing linecache19 (0.5.12) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension" – rubyist Oct 28 '12 at 11:33
  • This is my Gemfile.:- source 'https://rubygems.org' gem 'rails', '3.2.0' gem 'sqlite3' gem 'json' gem 'devise' gem 'cancan' gem 'jquery-rails' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3' end gem 'ruby-debug19', :require => 'ruby-debug' – rubyist Oct 28 '12 at 11:34

4 Answers4

35

I had a very similar error, but on ruby 1.9.3. Running:

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

Got it working for me. Credit to this answer.

Community
  • 1
  • 1
Alex Ghiculescu
  • 7,522
  • 3
  • 25
  • 41
  • 4
    For rbenv users: `gem install debugger-linecache -v '1.1.2' --with-ruby-include=~/.rbenv/sources/xxx/xxx` You may need to reinstall your ruby using `rbenv install x.x.x --keep` to keep a copy of the source locally. https://github.com/sstephenson/ruby-build#keeping-the-build-directory-after-installation – Jeffrey K May 06 '13 at 16:32
  • 1
    For rbenv on mac os & zsh: gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=~/.rbenv/sources/xxx/xxx – Valentin V Jul 20 '13 at 08:41
11

I solved similiar problem (upgrading Ruby 1.9.3 to 2.0) with simple

bundle update debugger

which as a result installed gem version 1.6.0

Mike Szyndel
  • 10,461
  • 10
  • 47
  • 63
8

Same fix, a bit more up to date

# check ruby version with rvm info
gem install debugger-linecache -v '1.1.2' \
-- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p448
Benjamin Crouzier
  • 40,265
  • 44
  • 171
  • 236
0

On Ubuntu 13.04 if that matters.

I had to: gem install debugger-ruby_core_source -v 1.1.2

then: gem install debugger

Then my bundle completed fine.

Thanks to this comment on the issue.

d3vkit
  • 1,942
  • 1
  • 24
  • 36