I have a script that runs script/runner via the shebang mechanism at the
top o the file, like so:
#!/usr/bin/env ./script/runner
This works fine in development, how would I get it to run in
non-development environments?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
Usage: script/runner [options] ('Some.ruby(code)' or a filename)
-e, --environment=name Specifies the environment for
the runner to operate under (test/development/production).
Default: development
-h, --help Show this help message.
[..]
The -e option is probably what you are looking for.
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
import_physicians.rb:
#!/usr/bin/env ./script/runner -e production
If I run import_physicians.rb, this doesn't work.
W
RAILS_ENV=production lib/import_physicians.rb
works fine.