使用ruby gems时出错

时间:2012-07-05 06:28:46

标签: ruby rubygems

我最近使用gem安装了基于ruby的工具,当我尝试运行这些工具时,我收到以下错误。我该如何解决?

 Invalid gemspec in [/var/lib/gems/1.8/specifications/commander-4.1.2.gemspec]: invalid date format in specification: "2012-02-17 00:00:00.000000000Z"
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require': no such file to load -- commander/user_interaction (LoadError)
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
        from /var/lib/gems/1.8/gems/rhc-0.93.19/lib/rhc/helpers.rb:1
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
        from /var/lib/gems/1.8/gems/rhc-0.93.19/lib/rhc-rest.rb:11
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
        from /var/lib/gems/1.8/gems/rhc-0.93.19/lib/rhc-common.rb:12
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
        from /var/lib/gems/1.8/gems/rhc-0.93.19/bin/rhc:7
        from /usr/local/bin/rhc:19:in `load'
        from /usr/local/bin/rhc:19

我根据下面的答案安装了指挥官,当我尝试现在运行时它会给我以下错误 -

Invalid gemspec in [/var/lib/gems/1.8/specifications/commander-4.1.2.gemspec]: invalid date format in specification: "2012-02-17 00:00:00.000000000Z"
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require': no such file to load -- commander/user_interaction (LoadError)
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
    from /var/lib/gems/1.8/gems/rhc-0.93.19/lib/rhc/helpers.rb:1
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
    from /var/lib/gems/1.8/gems/rhc-0.93.19/lib/rhc-rest.rb:11
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
    from /var/lib/gems/1.8/gems/rhc-0.93.19/lib/rhc-common.rb:12
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:53:in `require'
    from /var/lib/gems/1.8/gems/rhc-0.93.19/bin/rhc:7
    from /usr/local/bin/rhc:19:in `load'
    from /usr/local/bin/rhc:19

1 个答案:

答案 0 :(得分:0)

我猜,你正在使用commander gem。请按

安装
gem install commander

版本是4.1.1