I've run into a problem when using script/runner with a gem that uses
optparse (namely, twibot). If I use:
script/runner -e production my_script.rb
, the twibot end blows up because it doesn't recognize the "-e"
option, which stays in ARGV after script/runner has used it.
Of course this can be easily solved using "RAILS_ENV=production"
instead of "-e production", but I think letting runner pass down the "-
e" to the script being run is inconsistent, since it does delete
code_or_file from ARGV (line 34).
Is this behavior intentional, or can I write a patch to fix it?