[Locomotive-users] Re: 1.2.x + locomotive breaks my app!
Pirkka Hartikainen
pirkka at gmail.com
Fri Aug 31 13:17:14 GMT 2007
Just in case anyone runs into the same hard-to-debug problem, it seems
that data stored in session was the culprit. Some of my model classes
were not required in the environment.rb, and this caused ActiveRecord
objects stored in the session to lose all their specific functionality
(they only had the methods of ActiveRecord, and none of their "own"
methods).
So, my the exact fix to my error outlined below was to add
require 'building'
require 'planet_building'
to the config/environment.rb. Mysteriously, the production server
never gave this error.
Pirkka
On 15/08/2007, Pirkka Hartikainen <pirkka at gmail.com> wrote:
> I have a 10k+ line application that works ok on the production
> server's Rails 1.2.3, but breaks when I use a Locomotive Bundle that
> is newer than September 2006.
>
> Mysteriously, the first page load after a restart works fine, but the
> second one and any further requests give this error:
>
> >> Association named 'building' was not found; perhaps you misspelled it?
>
> The problem is similar to this one:
>
> http://one.textdrive.com/pipermail/locomotive-users/2007-March/001138.html
>
> except that I do not get anything weird in the Mongrel log on the
> first request, and the fix outlined in the reply does not work (why
> would anyone use include statement outside of a class, anyway?).
>
> Any help would be greatly appreciated, I've spent couple of days
> trying to figure this out!
>
> Best Regards,
> Pirkka
>
More information about the Locomotive-users
mailing list