Forum: Ruby on Rails [ANN] Textmate Backtracer 1.0

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.
D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 Duane Johnson (Guest)
on 2006-02-11 23:21
(Received via mailing list)
Originally posted at http://blog.inquirylabs.com/2006/02/11/textmate-
backtracer-10/

== Announcing Version 1.0 ==
The backtracer has been around for a while now, and seems to have
done its job well enough to deserve a 1.0 mark.

== What Is It? ==
Whenever a Rails exception occurs, it spits out a backtrace full of
filenames and line numbers. Iâ??ve often thought, â??Wouldnâ??t it be nice
if I could just click on one of those and it would take me to the
problem?�  The textmate_backtracer plugin will make each of the
backtrace lines clickable in your browser.

== One Improvement ==
This release includes a small improvement from Geoff Grosenbach that
limits the loading of this plugin to development mode only.  Geoff
notes that this "simplifies the backtrace when running tests". Thanks
Geoff.

== Download Version 1.0 ==
http://inquirylabs.com/downloads/textmate_backtracer-1.0.tgz

== Installation ==
Download the tgz file to [your rails app]/vendor/plugins

$ cd [your rails app]/vendor/plugins
$ tar -xzvf textmate_backtracer-1.0.tgz


Enjoy!



Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2006-02-11 23:35
(Received via mailing list)
I imagine more people will be reading the list than the blog, so
here's my comment/question:

I just installed it and it's not working for me, there aren't any
links. I tried the old version just to see if it works, same problem.

I don't have anything overriding how I handle Exceptions. Any clue as
to what the problem might be?

Oh, also I'm getting "Rendering
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/rescues/layout.rhtml
(500 Internal Error)". Could that be the problem? I get that error
during an exception even without the plugin installed though.

Pat
00e3a96684ab390a350b0271e98741d3?d=identicon&s=25 Nshbrown Nshbrown (nshb)
on 2006-02-12 00:55
(Received via mailing list)
*#&@ that's cool.

Makes me want a Mac even more ;)

-nb

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Nathaniel S. H. Brown                           http://nshb.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B155fd1e7432c77594588c79f49d2168?d=identicon&s=25 Dima Exe (dima)
on 2006-02-12 03:59
Howto setup "Textmate Backtracer" on Windows+Emacs :)

1. Place info you .emacs file:

   (require 'gnuserv)
   (setq gnuserv-frame (selected-frame))
   (gnuserv-start)

   2. Create into you emacs bin directory txmt.js and place into it:

   var wsh = WScript.CreateObject("WScript.Shell");
   url = WScript.Arguments(0);
   if (url) {
     var req = /file:\/\/([^&]+).*&line=([0-9]+)/;
     var file = req.exec(url);
     if (file[1] && file[2]) {
       wsh.Run("<path_to_emacs_bin_directory>/gnuclientw.exe +" +
file[2] + " " + file[1]);
     }
   }

   3. Create registry key structure
   HKEY_CLASSES_ROOT
   -- *txmt*
   ---- (Default) = "URL:TXMT Protocol"
   ---- URL Protocol = ""
   ---- *shell*
   ------ *open*
   -------- *command*
   ---------- (Default) = "cscript /H:WScript /nologo
<path_to_emacs_bin_direcory>\txmt.js %1"
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-02-12 07:02
(Received via mailing list)
On Feb 11, 2006, at 2:34 PM, Pat Maddox wrote:

> I just installed it and it's not working for me, there aren't any
> links. I tried the old version just to see if it works, same problem.
>
> I don't have anything overriding how I handle Exceptions. Any clue as
> to what the problem might be?

Did you restart everything after installing?

--
-- Tom Mornini
D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 Duane Johnson (Guest)
on 2006-02-13 22:48
(Received via mailing list)
On Feb 11, 2006, at 3:34 PM, Pat Maddox wrote:

> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
> action_controller/templates/rescues/layout.rhtml
> (500 Internal Error)". Could that be the problem? I get that error
> during an exception even without the plugin installed though.
>
> Pat
>
Sorry, Pat.  I'm really not sure what's going on there.  I wish I
could help more.


Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
6805b35d0a8ea3ede0a7da2d4cf5ae77?d=identicon&s=25 Jonathan Weiss (Guest)
on 2006-02-16 19:33
(Received via mailing list)
> == One Improvement ==
> This release includes a small improvement from Geoff Grosenbach that
> limits the loading of this plugin to development mode only.  Geoff notes
> that this "simplifies the backtrace when running tests". Thanks Geoff.
>

What do you think of this further restriction in init.rb:

# enable only on Macs in development mode
begin
   if (ENV['RAILS_ENV'] == 'development') && (`uname`.chomp == "Darwin")
     require 'textmate_backtracer'
   end
end


Jonathan
A2b2f4ee23989dc68529baef9cbddcd6?d=identicon&s=25 Julian 'Julik' Tarkhanov (Guest)
on 2006-02-16 19:39
(Received via mailing list)
On 12-feb-2006, at 3:59, dima exe wrote:

>    3. Create registry key structure
>    HKEY_CLASSES_ROOT
>    -- *txmt*
>    ---- (Default) = "URL:TXMT Protocol"
>    ---- URL Protocol = ""
>    ---- *shell*
>    ------ *open*
>    -------- *command*
>    ---------- (Default) = "cscript /H:WScript /nologo
> <path_to_emacs_bin_direcory>\txmt.js %1"

That kind of stuff makes me hold my breath, really.

--
Julian 'Julik' Tarkhanov
me at julik.nl
D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 Duane Johnson (Guest)
on 2006-02-16 19:51
(Received via mailing list)
On Feb 16, 2006, at 11:31 AM, Jonathan Weiss wrote:

> begin
>   if (ENV['RAILS_ENV'] == 'development') && (`uname`.chomp ==
> "Darwin")
>     require 'textmate_backtracer'
>   end
> end
>
>
> Jonathan
>

Cool idea, Jonathan.  Up until your suggestion, I've had to add the
backtracer manually to each of my team projects, being careful not to
add it to subversion lest other (non-mac, non-textmate) users should
suffer unduely.  This would be a "smart" way to sneak it in to
version control... :)

If no one has any objections, I'll add that in.

I wonder if there's any way to check for TextMate on Rails boot-up?

Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
2b2c2a705ed12f8fb327c7b4c56456c6?d=identicon&s=25 Sean Hussey (seanhussey)
on 2006-02-18 20:09
(Received via mailing list)
Sheesh, I hadn't even considered that.  Yes, please do add it in.
This topic is locked and can not be replied to.