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).
Try just
require 'ruby-debug'
(Despite the gem's name)
Also you don't need require 'rubygems'
anymore when using Ruby 1.9.
For ruby 1.9.3 and Rails 3.2 with pow:
In your Gemfile
:
group :development do
gem 'debugger'
end
And at the bottom of config/environments/development.rb
:
require 'debugger'
Debugger.start_remote
Debugger.settings[:autoeval] = true
Then connect to the debugger in your terminal using:
rdebug -c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With