2

I'm trying to install the ruby-debug gem, requiring ruby-debug-base as a dependency.

gem install ruby-debug errors out with:

ERROR:  Could not find a valid gem 'ruby-debug-base' (~> 0.10.6.0) in any repository
ERROR:  Possible alternatives: ruby-debug-base

Ruby version: 2.3.1, which ruby prints:

/Users/my-name/.rvm/rubies/ruby-2.3.1/bin/ruby

have tried adding

source :rubyforge     
source 'http://gems.rubyforge.org' 

to my Gemfile, as seen in a similar question, here.

When I try installing an older version of the gem using gem install ruby-debug -v 0.10.5.rc9, I get the error:

Ruby version 2.3.1 is too new

I've tried installing just ruby-debug-base, and am met with the error:

    current directory: /Users/my-name/.rvm/gems/ruby-2.3.1/gems/linecache-1.3.1/ext/linecache
/Users/my-name/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170824-39487-dus4av.rb extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***
Roshan
  • 905
  • 9
  • 21
matthewninja
  • 360
  • 5
  • 21

1 Answers1

2

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.

Roshan
  • 905
  • 9
  • 21
  • Thanks for the input, but it didn't work. running `gem install debugger` failed with the error: /Users/my-name/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1392:in `initialize': No such file or directory @ rb_sysopen - ./231/ruby_debug.h (Errno::ENOENT) – matthewninja Aug 24 '17 at 22:52
  • well that doesn't work because the `debugger` gem isn't installed – matthewninja Aug 24 '17 at 22:57
  • seems like debugger doesn't work well with ruby 2.x, try replaced `debugger` with `byebug` . – Roshan Aug 24 '17 at 23:01
  • I was hoping that wouldn't be the case. Thanks a lot for the help; I'll use a different debugger. – matthewninja Aug 24 '17 at 23:03
  • @matthewninja refer to my updated answer. Even the maintainer of the debugger gem recommend to use byebug for ruby 2.x . – Roshan Aug 24 '17 at 23:09