使用Ruby 1.9.3和Rubygems 1.8.15安装webrat



我想将webrat与Cucumber结合使用,为web应用程序编写验收测试。当我尝试安装webrat gem时,我会收到以下错误。我曾尝试删除C:\Ruby193\lib\rubb\gems\1.9.1\cache*和一个gem update --system,但没有成功。

我正在尝试在Windows7环境中在Ruby上安装gem。据我所见,问题与此有关:"在C:\Ruby193/lib/rube/gems/1.9.1/cache/webrat-0.7.3.gem中找不到元数据"

非常感谢您的帮助,谢谢!

gem install webrat --debug
Exception `NameError' at C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::InstallCommand
Exception `Errno::EWOULDBLOCK' at C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read would block
Exception `Errno::EWOULDBLOCK' at C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read would block
Exception `NoMethodError' at C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1483 - undefined method `to_ary' for #<Gem::Specification name=webrat version=0.7.3>
Exception `NoMethodError' at C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1483 - undefined method `to_ary' for #<Gem::Specification name=webrat version=0.7.3>
Exception `Errno::EEXIST' at C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:247 - File exists - C:/Ruby193/lib/ruby/gems/1.9.1
Exception `Gem::Package::FormatError' at C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:122 - no metadata found in C:/Ruby193/lib/ruby/gems/1.9.1/cache/webrat-0.7.3.gem
Exception `Gem::InstallError' at C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:121 - invalid gem format for C:/Ruby193/lib/ruby/gems/1.9.1/cache/webrat-0.7.3.gem
ERROR:  Error installing webrat:
        invalid gem format for C:/Ruby193/lib/ruby/gems/1.9.1/cache/webrat-0.7.3.gem

看起来更新到Rubygems 1.8.17就解决了这个问题。OP使用CCD_ 2。

最新更新