Wes Gamble
2009-Apr-24 08:39 UTC
Running in non-dev envs. with script/runner shebang setup
All, 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/.
Johannes Huning
2009-Apr-24 09:12 UTC
Re: Running in non-dev envs. with script/runner shebang setup
$ script/runner -h
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.
On Apr 24, 2009, at 10:39 AM, Wes Gamble wrote:
>
> All,
>
> 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/.
>
> --~--~---------~--~----~------------~-------~--~----~
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
Wes Gamble
2009-Apr-24 14:59 UTC
Re: Running in non-dev envs. with script/runner shebang setup
That''s correct, but I can''t get it to work when the script/runner command is _in a file_, like so: import_physicians.rb: #!/usr/bin/env ./script/runner -e production If I run import_physicians.rb, this doesn''t work. W -- Posted via http://www.ruby-forum.com/.