Forum: Ruby on Rails Tracing the calls and classes

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Anton A. (Guest)
on 2007-02-24 00:47
(Received via mailing list)
Is there any way, short of lot of log statements, to trace the execution
rails code?  Th reason I'm asking has to do with name space, inheritance
over-riding functions.

I'm preprocessing text before handing it to Redcloth so I have

     @text_to_render = @text.to_s )


class MyRender

  def render(...)

Not I know what


refers to :-)
but what is and isn't over-ridden?
If I use any of the depreciated Rails 'render_' family that eventually
'render()' will this over-ride them?  Will it only NOT over-ride them if
invoke it with a MyRender class object

        @text_to_render.render( :action => ....
                        render( :action => ...

Or, to ask it another way. How can I override the Rails render and do a

       def render( @args )
     ... do my stuff ...
     optionally call the Rails 'render'
           ... do more of my stuff

It is not wealth one asks for, but just enough to preserve one's
dignity, to
work unhampered, to be generous, frank and independent.
    W. Somerset Maugham, 'Of Human Bondage', 1915
Meech (Guest)
on 2007-02-24 01:00
(Received via mailing list)
You can use ruby-debug...

Gem install ruby-debug

rdebug script\server

Anton A. (Guest)
on 2007-02-24 01:40
(Received via mailing list)
Oh wow!

Yes, this makes it very clear what code is executed in the controller
what code is executed  in the view

Which begs the question - where's the best place for code?
Obviously there the app/controller and app/model but how should one
app/helpers and /lib ??

Meech said the following on 02/23/2007 05:59 PM:
> You can use ruby-debug...
> Gem install ruby-debug
> rdebug script\server
> help
Five exclamation marks, the sure sign of an insane mind.
-- Terry Pratchett _Reaper Man_
Ben M. (Guest)
on 2007-02-25 03:32
(Received via mailing list)
Meech wrote:
> You can use ruby-debug...
> Gem install ruby-debug
> rdebug script\server
> help

If I do this in my project directory, I get this output:

rdebug script/server
./script/server:2: require File.dirname(__FILE__) + '/../config/boot'
(rdb:1) help
ruby-debug help v.0.7.5
Available commands:
backtrace break catch cont delete display down eval exit finish frame
irb list method next p pp quit reload restart save script set step
tmate trace undisplay up var where


So, rdebug is running. But I don't get any response on localhost:3000.
I'm running mongrel if that makes a difference. A regular invocation of
script/server gives me:

=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no
** Rails signals registered.  HUP => reload (without restart).  It might
not work well.
** Mongrel available at
** Use CTRL-C to stop.

Would really like to check out ruby-debug, but I'm kind of stumped on

This topic is locked and can not be replied to.