Brandon Keene's blog



Brandon KeeneBrandon Keene
Standup 11/13/2008: ActiveScaffold and Object Mothers
edit Posted by Brandon Keene on Friday November 14, 2008 at 01:58AM

Interesting Things

  • ActiveScaffold was surprisingly easy to use for admin interfaces. One possible gotcha is that you have to manually configure namespaced RESTful routes (e.g. map.resources :tasks, :active_scaffold => true).

Ask for Help

"What are your current favorite Object Mother implementations or patterns?"

There are several approaches:

"Does anyone know how to disable caching in Safari? Caching can often break JSUnit between test runs"

Go to Develop -> Disable Caches and you get a fresh non-caching Safari.

Brandon KeeneBrandon Keene
Standup 11/10/2008: Memory profiling tools for Ruby
edit Posted by Brandon Keene on Thursday November 13, 2008 at 01:16AM

Interesting Things

Ask for Help

"We're having an issue with a long running Ruby process consuming too much memory and failing. What tools are available for finding and patching Ruby memory leaks?"

Several tools were suggested:

  • Valgrind - Considered very powerful but difficult to use. "It will do what you want if you can figure out how to properly ask it to do so."
  • BleakHouse - Ruby specific leak detection. It's available as a gem called "bleak_house"
  • Leaks - This is native to OSX. The Google Web Toolkit uses this for leak detection.
  • DTrace - Also a native OSX tool. There was a RailsConf presentation on Everyday DTrace on OSX.

"Rake will often silently 'fail' when running RSpec. It will not blow up but rather silently quits in the middle of the suite. This seems to happen intermittently, usually on the first run of our test suite. If we run the suite again, it works."

It was suggested that this might be a Rake version issue since there have been other test suite problems with Rake 0.8.3. Though, this particular type of problem was not identical to previous Rake versioning issues and may be something altogether different.

Keep reading for a more detailed description of this weird RSpec + Rake issue.