[Rails] RailsCron 0.2 questions

Gerret Apelt
Sat, 28 Jan 2006 09:08:12 -0000

Hi all, I''ve set up RailsCron to send email reminders on a daily
basis. My dev environment is Rails trunk on Debian Sarge, lighttpd
running as a regular user.

I''m having two issues:

1) When I run "rake cron_start", I get

rake aborted!
undefined method `blank?'' for "":String

The "blank?" method is provided by Rails, so I''m guessing its
not
available in Rake''s context for some reason. In looking for the cause,
I used Rails1.0 (via gem) instead of the svn rails trunk. Now I don''t
get the error, and the RailsCron background job starts just fine. I
can''t figure why --
$RAILS_TRUNK/activesupport/lib/active_support/core_ext/blank.rb does
define String#blank?

2) in $RAILS_CRON/tasks/startup.rake, system calls to ruby are
prefixed with "sudo -u #{ENV[''USER'']}". On my
deployment host I won''t
be a sudoer. For now I''ve simply removed the "sudo" portion
of each
command, and it seems to work. Am I inadvertently breaking something?
Why the ''sudo''?

3) When a rails_cron process is started, "ps" doesn''t list it
for me.
"ps a" does. Should I expect simply "ps" to work (as its
written in
startup.rake) ?

cheers
Gerret