使用 Ruby 1.9.3 和 Rubygems 1.8.15 安装 webrat
我想将 webrat 与 Cucumber 结合使用来为 Web 应用程序编写验收测试。当我尝试安装 webrat gem 时,出现以下错误。我尝试删除 C:\Ruby193\lib\ruby\gems\1.9.1\cache* 和 gem update --system
但没有任何运气。
我正在尝试在 Windows7 环境中在 Ruby 上安装 gem。据我所知,问题与此相关:“在 C:/Ruby193/lib/ruby/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
I want to use webrat in combination with Cucumber for writing acceptance tests for a web application. When I try to install the webrat gem I get the error stated below. I have tried to delete C:\Ruby193\lib\ruby\gems\1.9.1\cache* and a gem update --system
without any luck.
I am trying to install the gem on Ruby in a Windows7 environment. As far as I can see the problem is related to this: "no metadata found in C:/Ruby193/lib/ruby/gems/1.9.1/cache/webrat-0.7.3.gem"
Any help is much appreciated, thank you!
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来更新到 Rubygems 1.8.17 可以解决这个问题。 OP使用了
update_rubygems
。Looks as though updating to Rubygems 1.8.17 takes care of the issue. OP used
update_rubygems
.