rhc set-env给出NoMethodError

时间:2016-04-09 20:37:30

标签: openshift

尝试使用rhc设置或列出环境变量时,会显示此错误。我尝试重新安装gem,但这并没有解决错误。

*****@DESKTOP-RMLK74E ~> rhc set-env CREDENTIALS-FILE=~/app-root/data/credentials.json
/home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/helpers.rb:580:in `exe?': undefined method `split' for nil:NilClass (NoMethodError)
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/git_helpers.rb:37:in `block in discover_git_executable'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/git_helpers.rb:36:in `select'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/git_helpers.rb:36:in `discover_git_executable'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/git_helpers.rb:15:in `has_git?'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/git_helpers.rb:85:in `git_config_get'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/context_helper.rb:138:in `from_local_git'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/commands.rb:311:in `block in fill_arguments'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/commands.rb:302:in `each'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/commands.rb:302:in `fill_arguments'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/commands.rb:281:in `block (3 levels) in to_commander'
    from /home/*****/.gem/ruby/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /home/*****/.gem/ruby/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /home/*****/.gem/ruby/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
    from /home/*****/.gem/ruby/gems/commander-4.2.1/lib/commander/runner.rb:419:in `run_active_command'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/command_runner.rb:72:in `run!'
    from /home/*****/.gem/ruby/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/lib/rhc/cli.rb:37:in `start'
    from /home/*****/.gem/ruby/gems/rhc-1.38.4/bin/rhc:20:in `<top (required)>'
    from /home/*****/bin/rhc:23:in `load'
    from /home/*****/bin/rhc:23:in `<main>'

1 个答案:

答案 0 :(得分:0)

使用Ruby版本1.9.3解决了这个问题。希望RedHat最终发布2.2+兼容版本。

相关问题