This project is archived and is in readonly mode.

#249 ✓stale

better coloration on error messages

Reported by Roger | May 23rd, 2008 @ 10:53 PM

this patch makes it so that on rails' code based error messages, the filename is shown in red, so that people can identify more easily which file they need to go and edit. I like it for helping it stand out more, but not too much. Purely aesthetic, but nice.


Comments and changes to this ticket

  • Roger

    Roger May 23rd, 2008 @ 11:01 PM

    to test this patch apply, then add a syntax error to a view, and go to that view. It should have a red filename now [dark red].

  • Roger

    Roger May 23rd, 2008 @ 11:35 PM

    This version of the patch [v2] now adds coloration for the line on which the error occurred.

  • Roger

    Roger May 23rd, 2008 @ 11:40 PM

    v3 takes out an extra line I had added in there by mistake

  • Roger

    Roger May 24th, 2008 @ 12:20 AM

    v4 combine all commits into a single commit, add better colors. This is a nice patch for being able to instantly see which line your code erred on.

  • Adam S

    Adam S May 24th, 2008 @ 01:31 PM


    Errors can definitely be improved in Rails (see mod_rails errors for an example), these changes don't go a long way, but also don't hurt.

  • Pratik

    Pratik June 17th, 2008 @ 05:24 PM

    • Assigned user set to “Pratik”
    • State changed from “new” to “incomplete”
    • Milestone cleared.

    I tried it and it was very difficult to see the red color. I think you should discuss this change in rails core mailing list. There might be other similar places where we can improve error reporting.

  • Roger

    Roger June 20th, 2008 @ 07:22 PM

    I almost wonder if it wouldn't be even more helpful to include more with the error messages. Like an inspection of the controller's local variables. My thought is to [eventually] post some prototype error pages so we can decide on a reasonable color scheme. mod_rails style might work, too. They're nice.



  • Roger

    Roger January 11th, 2009 @ 05:39 AM

    • Tag set to edge, patch

    At least with MRI, it appears possible to snapshot local variables and parameters as to what they were passed in--might make for a nicer output.

  • Prem Sichanugrist (sikachu)

    Prem Sichanugrist (sikachu) January 22nd, 2010 @ 08:52 AM

    • State changed from “incomplete” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>