Can't Install Ruby-Debug-Base19X Gem

Unable to find a valid gem for ruby-debug-base

Put the gem 'debugger' in Gemfile or install it just for development.

group :development do
gem 'debugger'
end

Only 1.9.2 and 1.9.3 are supported. For 2.X rubies, consider using
byebug.

Even the maintainer of the debugger gem makes this recommendation. Look here.

error in install ruby-debug-base on ruby 2.0.0p247

for ruby > 1.8.x you have to use another gem apparently (byebug), ref:
How to use the debugger with Ruby 2.0?

ruby-debug won't install / build native extensions

I have had the same issue (on 1.9.1 and 1.9.2). Even trying to install 0.11.23 triggered the error. I found that it was necessary to:

  • Uninstall the gem (all versions for me):

    gem uninstall ruby-debug-base19

  • Delete the 0.11.24 directory (in my case: ~/.rvm/gems/ruby-1.9.2-p0/gems/ruby-debug-base19-0.11.24/)

  • install 0.11.23 explicitly:

    gem install ruby-debug-base19 --version=0.11.23

This is where I got most of the solution: http://rails.brentsowers.com/2010_08_01_archive.html

Additionally, if you use Bundler:

I had problems until I upgraded to latest Bundler (1.0.2 => 1.0.7) as it insisted on installing ruby-debug-base19 v 0.11.24).

In your Gemfile, make sure you've pinned the version of ruby-debug-base19:

gem "ruby-debug-base19", "0.11.23", :require => nil

how do I install ruby-debug in ruby 1.9.3 / Rails 3.2.1

Thanks to @Marc Talbot's comment in the OP, I found a working recipe.

download linecache19 and ruby-debug-base19 from RubyForge:

% curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
% curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem

compile the two gems

% gem install linecache19-0.5.13.gem
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.13
1 gem installed
...
% gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$SANDBOX/packages/ruby-1.9.3-p0
Building native extensions. This could take a while...
Successfully installed ruby-debug-base19-0.11.26
1 gem installed
...

update your Gemfile

# file: Gemfile
...
group :development do
gem 'linecache19', '0.5.13'
gem 'ruby-debug-base19', '0.11.26'
gem 'ruby-debug19', :require => 'ruby-debug'
end

bundle install and test the debugger

% bundle install
Fetching source index for http://rubygems.org/
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
% irb
irb(main):001:0> require 'ruby-debug'
=> true
irb(main):002:0> debugger
$SANDBOX/usr/lib/ruby/1.9.1/irb/context.rb:166
@last_value = value
(rdb:1) p 'hooray'
"hooray"

Hopefully this will help others.



Related Topics



Leave a reply



Submit