Forum: Ruby on Rails Locomotive and ruby-debug

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
magic_hat (Guest)
on 2007-07-08 04:15
(Received via mailing list)
Anyone had success getting ruby-debug to work with Locomotive? I've
got the ruby-debug gem installed, and require 'ruby-debug' in my
config file, but when I try to call the debugger from within a rails
method, the app just blows right by it and nothing appears in the
console.

Any help with this would be appreciated.
Steve R. (Guest)
on 2007-07-08 07:52
(Received via mailing list)
If Locomotive is still using lighttpd, it won't work. The best way to
do it AFAIK is just:

rdebug script/server

or if you have the debugger started in your code, just use:

script/server
Jim Gagne (Guest)
on 2007-07-08 10:28
(Received via mailing list)
The EASIEST thing is to load the Footnotes plugin. Search for it at

http://agilewebdevelopment.com/plugins

Then load it using the standard plugin method. From your project
directory:

script/plugin install
http://macromates.com/svn/Bundles/trunk/Bundles/Ra...

Footnotes gives you extra goodness if you're using TextMate -- which
you should anyway if you're trying to learn or develop in RoR on a
Mac. I'm PRETTY sure it works without TextMate.

What it does is automatically place ruby-debug like information on the
bottom of each rendered page. Here's what it looks like on my machine:

Edit: Controller | View | Layout | Stylesheets | Javascripts
Show: Session | Cookies | Params | Log | General Debug
(TextMate Footnotes)

Click on the link to show whatever and there you are! (The first line,
Edit: won't work without TextMate.) All this automatically turns off
when you move to Production mode.

---Jim Gagne---
magic_hat (Guest)
on 2007-07-09 08:43
(Received via mailing list)
Locomotive now runs on Mongrel, so this shouldn't be a problem.
Footnotes looks cool, but I need to be able to stop execution at a
particular point and examine/change variables. I need
a...uh...breakpointer.

Anyone who knows how to get ruby-debug working w/ Locomotive, please
speak up! I'm getting desperate here.
Steve R. (Guest)
on 2007-07-09 09:51
(Received via mailing list)
Why is locomotive essential? Can't you start your app under webrick
or mongrel for debugging? If you do that, it's straightforward: Just
require 'ruby-debug' and just before where you want to stop, call the
debugger method.
This topic is locked and can not be replied to.