2

I'm try to add a debugger to my rails 3.1.1 application which uses ruby 1.9.2. I have added the following to my gemfile:

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

and I get the following error:

/.rvm/gems/ruby-1.9.2-p290@rails31/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:55:in `block (2 levels) in initialize': uninitialized constant Debugger::LocalInterface::Readline (NameError)

by the way i have the following:

$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
$ rails -v
Rails 3.1.1
$ rvm -v
rvm 1.8.6 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
GTDev
  • 5,488
  • 9
  • 49
  • 84

2 Answers2

1

What made is work for me is:

sudo gem install ruby-debug19
gem install linecache19
gem install ruby-debug-base19
bundle update
rails server -u
standup75
  • 4,734
  • 6
  • 28
  • 49
0

Did you install all the prerequisites listed in rvm notes before you installed Ruby? I'm not positive, but I think readline is a dependency for MRI on Linux.

You may also follow these instructions from the RVM site:

If you have an error when compiling pertaining to readline, you may need to attempt installing with the procedure defined below.

NOTE: Before you follow the procedure below please be sure to verify that you have installed any dependencies for the Ruby you are installing listed by the 'rvm notes' command. If you have not yet done that do so then run 'rvm remove X ; rvm install X' where X is the Ruby that you are concerned with.

$ rvm pkg install readline
$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-readline-dir=$rvm_path/usr
Michelle Tilley
  • 157,729
  • 40
  • 374
  • 311
  • Thanks for the quick response the error changed to: `You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'` `Exiting` – GTDev Oct 18 '11 at 05:25
  • Just to double-check, now that you can install the gem, have you run a `bundle install` on your project? – Michelle Tilley Oct 18 '11 at 05:37
  • yep it didn't seem to change anything – GTDev Oct 18 '11 at 08:57