Require 'classtree' and require 'methodsig' causing LoadError under Ruby 1.9.3p429
ojak opened this issue · 2 comments
Calling require 'debugger'
in my Sinatra app causes the following 2 errors/warnings to be printed into the console. They don't seem to affect the execution of the debugger, but they trigger on every page load (polluting the log):
Exception `LoadError' at .../debugger-1.6.0/lib/ruby-debug/commands/method.rb:4 - cannot load such file -- methodsig
Exception `LoadError' at ...debugger-1.6.0/lib/ruby-debug/commands/variables.rb:178 - cannot load such file -- classtree
Debugger is being included using bundler with the following line: gem 'debugger'
Steps to reproduce (on OSX 10.8):
Install ruby 1.9.3p429
rvm install ruby-1.9.3-p429
rvm gemset create tmp
gem install bundler
Create a new directory with a Gemfile
containing:
source 'https://rubygems.org'
gem 'sinatra' # 1.4.3
gem 'thin' # 1.5.1
gem 'debugger' # 1.6.0
Create a quick Sinatra app in a file named server.rb
:
### Load bundler gems
require 'bundler'
Bundler.require(:default)
# Config server
set :server, :thin
set :port, 3100
# Require debugger
require 'debugger'
get '/' do
debugger
return 'Hello'
end
Run the app with debugger mode turned on:
ruby -d server.rb
You'll see the following LoadError's from the debugger stack:
Exception `LoadError' at /Users/oj/.rvm/gems/ruby-1.9.3-p429@tmp/gems/debugger-1.6.0/lib/ruby-debug/commands/method.rb:4 - cannot load such file -- methodsig
Exception `LoadError' at /Users/oj/.rvm/gems/ruby-1.9.3-p429@tmp/gems/debugger-1.6.0/lib/ruby-debug/commands/variables.rb:178 - cannot load such file -- classtree
Thanks for reporting your issue! This is one of my 9 active issues. Use that link to check how soon your issue will be answered. Don't forget to check your issue against this project's CONTRIBUTING.md. Cheers.
When you call ruby with -d you're supposed to see debugging messages. debugger is attempting to detect if those libraries are present and gracefully rescuing that failed require.
I'm closing but I can reopen if you can report specific functionality that is being impacted