preload_app = true causing - ActiveModel::MissingAttributeError: missing attribute: some_attr

Lawrence Pit lawrence.pit at gmail.com
Sun Jan 20 21:39:43 UTC 2013


Hi,

>> after_fork do |server, worker|
>>  defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
>> end

Not sure it would make a difference, but I always use this in the after_fork:

   defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.reconnect!



Cheers,
Lawrence


More information about the mongrel-unicorn mailing list