Forum: Ruby on Rails runners and development/production mode

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Cb33b32bd5d675db7be148542976e510?d=identicon&s=25 Sam Joseph (Guest)
on 2006-05-31 02:13
(Received via mailing list)
I'm using a runner script to try and send batch email update, however I
get the impression that the runner is not operating in production mode
and as a result it is falling foul of the system I have in place to
block emails goinc out in development in testing modes.

Is there some way for me to force a runner to operate in a particular
mode, or even to check the mode it is operating in?

My current use of the runner is as follows:

ruby script/runner DiscussionMailer.handle_weekly_post

Many thanks in advance.

59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-05-31 05:29
(Received via mailing list)
script/runner --help
Usage: runner 'puts Person.find(1).name' [options]

     -e, --environment=name           Specifies the environment for
the runner to operate under (test/development/production).
                                      Default: development

     -h, --help                       Show this help message.

-- Tom Mornini
This topic is locked and can not be replied to.