Rails 3, Authlogic and cron task

2011-04-27 Thread Darren Bereska
I'm running a Rails 3 app using Authlogic 2.1.6. I've added a cron task that will not execute. It errors out with this: $ heroku rake cron (in /app) start sending reminder emails rake aborted! uninitialized constant Object::Event /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'

Re: Rails 3, Authlogic and cron task

2011-04-27 Thread Jeff Schmitz
Confused how Authlogic, usually found in a controller, could be a part of this. Event.send_reminders is not using authentication, is it? On Tue, Apr 26, 2011 at 10:33 PM, Darren Bereska dbere...@gmail.com wrote: I'm running a Rails 3 app using Authlogic 2.1.6. I've added a cron task that will

Re: Rails 3, Authlogic and cron task

2011-04-27 Thread Daz
After more searching, I have finally come across this: http://stackoverflow.com/questions/4300240/rails-3-rake-task-cant-find-model-in-production - which provided the hint that the problem is actually due to having the production environment configured to be thread safe. Since the cron would work

Re: Rails 3, Authlogic and cron task

2011-04-27 Thread Jeff Schmitz
The link you provided was about eager loading, not thread safety. The only way I can make it jive with your earlier message is that the require of Authlogic from Event is failing maybe you can run with --trace? On Wed, Apr 27, 2011 at 10:17 AM, Daz dbere...@gmail.com wrote: After more

Re: Rails 3, Authlogic and cron task

2011-04-27 Thread Daz
there's a comment to one of the answers that mentions thread safety. changing the environments\production.rb file config.threadsafe! to config.threadsafe! unless $rails_rake_task appears to have fixed my problem. Thx for your replies. On Apr 27, 11:10 am, Jeff Schmitz