tags:

views:

258

answers:

2

Hello, I'm trying to use ruby-debug19 with Ruby 1.9.1p376 but am getting the following error:

test.rb:2:in `require': no such file to load -- ruby-debug19 (LoadError) from test.rb:2:in `<main>'

Here's test.rb:

require 'rubygems'
require 'ruby-debug19'

Here's the output of "gem list":

*** LOCAL GEMS ***
ruby-debug19 (0.11.6)
(etc.)

So running "ruby test.rb" generates the above error.

Am I doing this wrong? I thought this was the correct way to run ruby-debug19 (by including the gem and adding "debugger" statements) and haven't been able to find any articles/posts with the same problem.

I am using RVM but the above output is all under the same version of Ruby ("ruby -v" shows 1.9.1p376 as expected, and the gem list output is specific to that version and not the OS X system-installed version 1.8.7).

+1  A: 

Try just

require 'ruby-debug'

(Despite the gem's name)

Also you don't need require 'rubygems' anymore when using Ruby 1.9.

rnicholson
rnicholson: Thanks, I probably should have mentioned that I tried that and got a different error:"gems/ruby-debug-base19-0.12.0/lib/ruby-debug-base.rb:1:in `require': no such file to load -- ruby_debug.so (LoadError)"
tk-421
Noticed you are running rvm. Have you rvm update'd it recently and rvm reloaded (or opened another shell)?
rnicholson
In the middle of all this I removed (using the "implode" option) and reinstalled rvm, and I did open new shells (closed/reopened Terminal.app) between each test just to be sure that wasn't the issue. Could using ruby-debug19 with rvm be the problem? Is it working for you/others? I did a bunch of searches but couldn't find any mention of this.
tk-421
I'm using rvm too. And the above works for me. Tried it in an irb session too. Tried re-installing the gem? Missing the .so probably means it didn't build (but still installed is odd) or something could be wrong with your GEM_PATH.
rnicholson
A: 

For bundler (rails 3):

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