Mohammad Sadiq Shaikh
Mohammad Sadiq Shaikh

Reputation: 3200

Ruby Debugger installation Error

I am getting the following Error While installing ruby debugger

In gemfile i added

 gem 'ruby-debug19', :require => 'ruby-debug'

and run

 bundle install

Installing linecache19 (0.5.12) with native extensions
   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
   /usr/local/bin/ruby extconf.rb
   checking for vm_core.h... no
   checking for vm_core.h... no
   *** 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/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

What is the reason for the error

how to install thre debugger..???

Upvotes: 1

Views: 742

Answers (3)

msdq
msdq

Reputation: 143

You have to first set the path of DevKit in your environmental variable

Then run

gem install linecache19
gem install ruby-debug-base19
gem install ruby-debug-ide

through command prompt

May this work

Upvotes: 2

ronalchn
ronalchn

Reputation: 12335

"On Ubuntu, the native compilation step downloads the ruby 1.9.2 source and tries to unpack it into a directory that your current user probably does not have write access to." - Darren (Reference: http://isitruby19.com/linecache19)

In this case, try sudo bundle install.


If the problem is that it cannot resolve the vm_core.h file dependency, you can run the installs with specific versions and the path to the ruby source:

sudo -E gem install linecache19 -v=0.5.11 -- --with-ruby-include=path_to/ruby-1.9.1-p378/
sudo -E gem install ruby-debug-base19 -v=0.11.23 -- --with-ruby-include=path_to/ruby-1.9.1-p378/
sudo -E gem install ruby-debug-ide -v=0.4.9 -- --with-ruby-include=path_to/ruby-1.9.1-p378/

Reference: http://isitruby19.com/linecache19

Note, replace path_to/ruby-1.9.1-p378/, with the path to where you installed ruby.

To find out where you installed ruby, try running:

which ruby

Upvotes: 1

Abram
Abram

Reputation: 41844

From the RVM website:

If you have trouble installing ruby-debug19 try installing with the following command:

$ rvm reinstall 1.9.3 --patch debug --force-autoconf
$ gem install ruby-debug19 -- --with-ruby-include="${MY_RUBY_HOME/rubies/src}"

Upvotes: 1

Related Questions