ubuntu 11.10 上的瓦提尔
我刚刚将我的系统从 ubuntu 11.04 更新到 11.10 并且......惊喜! 现在,如果我尝试使用 watir,
require 'rubygems'
require 'watir-webdriver'
我是否收到此错误
require 'watir-webdriver'
Invalid gemspec in [/var/lib/gems/1.8/specifications/json_pure-1.6.1.gemspec]:
invalid date format in specification: "2011-09-18 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/watir-webdriver-0.3.5.gemspec]:
invalid date format in specification: "2011-10-05 00:00:00.000000000Z"
LoadError: no such file to load -- watir-webdriver
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):3
from /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb:22
如何使其再次工作?
I've just updated my system from ubuntu 11.04 to 11.10 and...surprise!
Now if I try to use watir, doing
require 'rubygems'
require 'watir-webdriver'
I obtain this error
require 'watir-webdriver'
Invalid gemspec in [/var/lib/gems/1.8/specifications/json_pure-1.6.1.gemspec]:
invalid date format in specification: "2011-09-18 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/watir-webdriver-0.3.5.gemspec]:
invalid date format in specification: "2011-10-05 00:00:00.000000000Z"
LoadError: no such file to load -- watir-webdriver
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):3
from /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb:22
How to make it work again?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我所知道的关于在 Linux 上运行 Watir 的所有信息都在这里:
https://github。 com/zeljkofilipin/watirbook/blob/master/installation/ubuntu.md
您检查过 Ubuntu 更新是否破坏了您的 Ruby 安装吗?也许它卸载了 watir-webdriver gem 或其他东西。
gem list watir
能得到什么?All I know about running Watir on Linux is here:
https://github.com/zeljkofilipin/watirbook/blob/master/installation/ubuntu.md
Did you check if Ubuntu update broke your Ruby installation? Maybe it uninstalled watir-webdriver gem or something.
What do you get for
gem list watir
?您的 ruby 版本有问题。安装 RVM,并让它安装新的 ruby:
Your version of ruby has problems. Install RVM, and get it to install a fresh ruby:
我遇到了同样的问题,可以通过调整 jason 规范文件来修复它:
/var/lib/gems/1.8/specifications/json_pure-1.6.1.gemspec
在日期格式行中,我删除了看起来像这样的所有内容“00:00:00.000000000Z”
并只保留简单的日期格式。
再次安装 watir 后(参见 watir 安装网页)
一切正常:
sudo apt-get install rubygems
gem install watir --no-rdoc --no-ri
I have had the same problem and could fix it by adjusting the jason spec file:
/var/lib/gems/1.8/specifications/json_pure-1.6.1.gemspec
In the date format line I removed everything which looked like this "00:00:00.000000000Z"
and kept just the plain date format.
After again installing watir (see watir installation web page)
everything worked properly:
sudo apt-get install rubygems
gem install watir --no-rdoc --no-ri
我在 json gem 中看到了这个问题(现在我已经升级到 11.10 其他 gem)。我之前看到的 json gem 的修复方法是进入 gem 文件并在错误中列出,然后删除找到的“00:00:00.000000000Z”字符串。
我已经在收到此错误的每个宝石上使用了它(只有几个,但我不记得到底是哪一个)。宝石似乎工作得很好。自从删除该字符串后,我没有注意到任何问题。
I've seen this issue with the json gem (and now that I've upgraded to 11.10 other gems). The fix I'd previously seen for the json gem was to go into the gem file and listed in the error and remove the "00:00:00.000000000Z" string wherever you found it.
I've used it on every gem I've received this error on (which was only a couple but I don't remember which exactly). The the gems seem to work just fine. I haven't noticed any problems since removing that string.