KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This command is my problem: /usr/local/bin/ruby **script/runner** --environment=production app/jobs/**my_job.rb** -t my_arg `my_job.rb` is my script, which handles command line arguments. In this case it is `-t my_arg`. my_job.rb also takes `--environment=production' as its argument, which should be script/runner's argument. I guess this can be solved using some parentheses, but no have an idea. If the solution doesn't touch (or depends on) Rails or Linux's global environment, it would be much better. /usr/local/lib/ruby/1.8/optparse.rb:1450:in `complete': invalid option: --environment=production (OptionParser::InvalidOption) from /usr/local/lib/ruby/1.8/optparse.rb:1448:in `catch' from /usr/local/lib/ruby/1.8/optparse.rb:1448:in `complete' from /usr/local/lib/ruby/1.8/optparse.rb:1261:in `parse_in_order' from /usr/local/lib/ruby/1.8/optparse.rb:1254:in `catch' from /usr/local/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order' from /usr/local/lib/ruby/1.8/optparse.rb:1248:in `order!' from /usr/local/lib/ruby/1.8/optparse.rb:1339:in `permute!' from /usr/local/lib/ruby/1.8/optparse.rb:1360:in `parse!' from app/jobs/2new_error_log_rt_report.rb:12:in `execute' from app/jobs/2new_error_log_rt_report.rb:102 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `eval' from /home/www/maldive/admin/releases/20120914030956/vendor/rails/railties/lib/commands/runner.rb:46 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from script/runner:3
Tags (comma-separated)
Save Edits
Cancel