big teddy
  • Feb
    12
    Rails 2.3.0 update Gotcha

    So I’m working on a Rails app that’s been going swimmingly until last night.

    Messing around on my Mac laptop I ran

    gem update

    This ended up killing about 3 hours of my night and 20 minutes this morning when I finally figured out what happened.

    The symptom was that I kept loading my main page and getting an error that my ApplicationController was missing.

    uninitialized constant ApplicationController

    This was strange because I still had my application.rb file, I could include the file in my controllers with “require application.rb” and get things to work, but this obviously wasn’t right.

    I correctly thought I’d somehow hosed my gems which I spent about 2 hours mucking with last night. I realized I had Rails 2.3.0 which was new but couldn’t figure out what the heck was going on. Finally this morning I created a new rails skeleton to see if that would run out of the box. On doing so I realized that “application.rb” was now “application_controller.rb” in the skeleton app. A sensible change, but that meant I needed to rename my application.rb file to application_controller.rb. to get my rails app to work.

    doh!

    Leave a Reply