Me sitting inside a box on stage before seeing Penn & Teller in Las
Vegas.
Category: me me me
Vegas view #1
14 feet to smoke
Let us ride to Camelot!
Date night
I’ve been trying to get ZenSpider autotest and Windows to play nice for a while. First, I had the problem where autotest would only run once and not stick around waiting for updates to my code. That was fixed by Luke Pearce. He commented on a previous post with his fix and I can confirm that it works. Thanx Luke!
I encountered another problem now. When I ran my autotest but tried to shut it down by hitting Control-C twice in a row, the tests would just reset and run again. Double Control-C is supposed to interrupt the process and allow me to shut it down. This it did not do.
I had a situation today where, when running some functional tests, the error backtrace being displayed was not helpful at ALL. I was defining a layout for a controller as a symbol instead of a string like I should have been using. You use a string when you are just saying “Use this layout” and you use a symbol when you have a method to call that responds with the layout to use. The error I was getting was …
NoMethodError: undefined method `admin' for #<Admin::RegistrationsController>
but what was the first line that came up in the backtrace?
app/controllers/admin/registrations_controller.rb:18:in `show'
This was giving me fits. There’s no call to ‘admin’ in the ‘show’ method. I knew there had to be something else so I searched for how to see more of the backtrace.
The BacktraceCleaner introduced in Rails 2.3.2 cleans out backtrace lines coming from the Rails framework (Railties, etc). This is usually what you want. However, I was sure that my error was coming from somewhere in the framework. Turns out it’s really simple to turn off the backtrace cleaner. Add this line in a ‘setup’ method in your test_helper.rb file.
Rails.backtrace_cleaner.remove_silencers!
Very simple, very easy. My name is Chef Tell. 🙂
Cathy and I have, off and on, talked about going to a gun range to see what it’s like. I’ve shot a rifle before but only once. It was skeet shooting and to say I wasn’t anywhere near the target is an understatement. I’m much better at the Wii Sports target shooting game.
I bet if gun range owners got a few of these for targets, I’d be able to hit ’em. 🙂