rhc set-env 给出 NoMethodError

rhc set-env gives NoMethodError

当尝试使用 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>'

使用 Ruby 版本 1.9.3 修复了该问题。希望RedHat最终能出一个2.2+的兼容版本。