typing monkeyketurn wrote
on February 9th, 2008 at 02:30 pm
Previous Entry Add to Memories Share Next Entry

tomato curry [company lunch]

I've been working with Ruby on a semi-regular basis for a while now, and there's something that's still bothering me. Well, to be honest, there are a number of things, but one of them in particular seems like it should be solvable.

Here's the last few frames of a typical Ruby on Rails traceback:

And here are the last few frames of a typical Nevow traceback in Python:

It's not just the web environment either, you can make similar comparisons between ipython and irb.

Is there any help to be had? Or should I tell my office manager to get one of those inflatable punching bags to smash the next time someone sends me one of these stupid crippled ruby tracebacks?


(Leave a comment)
From:demonbane
Date:2008-02-09 11:12 pm (UTC)
(Link)
I know that it's possible to customize the view that Rails uses for showing the trace, but I don't know where exactly it's located. Though displaying error in the context of the code should really be handled by your IDE/editor. The Rails mode that I use for Emacs will do essentially the same thing that you show in your Nevow example above, except that I can just start typing and modifying code right then and there.
(Reply) (Thread)
From:keturn
Date:2008-02-09 11:22 pm (UTC)
(Link)
I'm not always running rails through emacs. The tracebacks I read may not be from an instance I'm running at all, they may be passed on by another developer. If they only pass line numbers and not source excerpts, it's impossible for my emacs to figure out if their line numbers correspond to my line numbers. (Yes, bug reports should always have accompanying versions, but even so, one of us may have added a few lines of debugging information or something which would change the line count.)

And none of that lets you see what values were passed in to the method that crashed.
(Reply) (Parent) (Thread)
From:(Anonymous)
Date:2008-02-10 07:35 am (UTC)
(Link)
it's a sad world, with rails in twisted feed
(Reply) (Thread)
From:keturn
Date:2008-02-10 05:24 pm (UTC)
(Link)
Just pretend I used Arrow or EventMachine as an example instead of Rails. ;)
(Reply) (Parent) (Thread)

(Leave a comment)