Rails Engines and the “A copy of ApplicationController has been removed from the module tree but is still active!” error

April 2nd, 2009

This was a beast of an error to get around, but finally I did in a not so clean manner. I’ve been working with Rails Engines and the approach was to make all controllers in my engine path “unloadable” per the last comment in this thread:

http://dev.rubyonrails.org/ticket/6001

Not the cleanest approach, but it will work until I can actually understand the core problem and refactor my code. This should at least buy you some time so that you can focus on creating modular Rails Engines!

Dennis Baldwin on Twitter

April 2nd, 2009

My late New Year’s resolution is to start blogging again (it’s almost been a year since I posted here!). I will be consolidating a couple blogs that talk about technology and skateboarding and consolidating them into one. Looking forward to networking with other techies/skaters in the near future. In the meantime feel free to drop by and say hello on Twitter:

http://twitter.com/dbaldwin

iPhone SDK and OS Download

April 8th, 2008

I’ve been playing around with the iPhone SDK mainly for the purposes of integrating the iPhone with the Ublip GPS tracking system. If you’re interested, you can read some of the research I’ve done regarding iPhone GPS tracking. I’ll be continuing my research and sharing it in the Ublip blog. But the point of this post is to mention that just this morning my iPhone went into emergency mode where I couldn’t get it to sync with my Mac and it was completely off the network. It turns out that Apple just released a new version of the iPhone SDK and OS today. So I started downloading the 195 MB file about two hours ago. Apparently I have 5 hours to go. Needless to say, Apple’s servers are getting hammered right now. The image below about says it all. I feel like I’m on dial-up again!

iphone_os_download.gif

Ruby on Rails Console Logging

January 23rd, 2008

If you’ve developed in Rails for a decent amount of time then you’ve most likely needed to use the interactive console: ruby script/console. This has saved me within our production application on many occasions. As you probably know, when using the console in production mode, logging is disabled. Sometimes it’s useful to see the queries generated by ActiveRecord, which brings me to my scenario from yesterday. I badly needed to see what query was being gererated by one of my model methods and stumbled across this snippet of code:

ActiveRecord::Base.logger = Logger.new(STDOUT)

Be sure to restart your console before running this command and when you execute a statement like User.find(1) you’ll be presented with some handy debug info.

Tufts JoeyTracker Launches

January 22nd, 2008

Just a quick post to announce the launch of the JoeyTracker at Tufts University. We worked a couple of Tufts students to help them bring the project to life and allow them to track their campus bus (aka “The Joey”) online. Read this article posted by the Tufts Daily if you’re interested in more details.