ubuntu 11.10 上的瓦提尔

发布于 2024-12-10 06:33:55 字数 832 浏览 2 评论 0原文

我刚刚将我的系统从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

ゃ人海孤独症 2024-12-17 06:33:55

我所知道的关于在 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?

少年亿悲伤 2024-12-17 06:33:55

您的 ruby​​ 版本有问题。安装 RVM,并让它安装新的 ruby​​:

 1. bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
 2. echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
 3. source .bash_profile 
 4. rvm install 1.9.2
 5. rvm use 1.9.2

Your version of ruby has problems. Install RVM, and get it to install a fresh ruby:

 1. bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
 2. echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
 3. source .bash_profile 
 4. rvm install 1.9.2
 5. rvm use 1.9.2
木格 2024-12-17 06:33:55

我遇到了同样的问题,可以通过调整 jason 规范文件来修复它:
/var/lib/gems/1.8/specifications/json_pure-1.6.1.gemspec

在日期格式行中,我删除了看起来像这样的所有内容“00:00:00.000000000Z”
并只保留简单的日期格式。

再次安装 watir 后(参见 watir 安装网页)
一切正常:

sudo apt-get install ruby​​gems
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

早茶月光 2024-12-17 06:33:55

我在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文