尝试运行脚本/控制台时获取“无效选项:-Ku(OptionParser :: InvalidOption)”

时间:2011-10-05 14:44:16

标签: ruby-on-rails ruby rvm bundler

尝试在我们的生产箱上运行script/console时出现以下错误:

/data/site/shared/bundle/ruby/1.9.1/gems/rails-2.3.11/lib/commands/console.rb:11:in `block in <top (required)>': invalid option: -Ku (OptionParser::InvalidOption)
    from /data/site/shared/bundle/ruby/1.9.1/gems/rails-2.3.11/lib/commands/console.rb:6:in `new'
    from /data/site/shared/bundle/ruby/1.9.1/gems/rails-2.3.11/lib/commands/console.rb:6:in `<top (required)>'
    from script/console:3:in `require'
    from script/console:3:in `<main>'

从输出中可以看出,我们使用的是Rails 2.3.11。我们的Ruby版本是1.9.2(p180)。

当我们尝试运行script/delayed_job start时会发生同样的事情:

/data/site/shared/bundle/ruby/1.9.1/gems/delayed_job-2.0.7/lib/delayed/command.rb:51:in `initialize': invalid option: -Ku (OptionParser::InvalidOption)
    from script/delayed_job:5:in `new'
    from script/delayed_job:5:in `<main>'

关于为什么会发生这种情况的任何想法?

感谢。

1 个答案:

答案 0 :(得分:0)

更新到Ruby 1.9.2-p290解决了这个问题。