在Windows XP上安装watir-webdriver时,“marshal data too short”错误消息

时间:2011-03-23 18:09:39

标签: windows windows-xp installation watir watir-webdriver

我在VMware Fusion虚拟机(3.1.2 332101)中安装了Windows XP(Professional,Version 2002,Service Pack 3)。 (主机是MacBook Pro,Mac OS 10.6.7。)XP安装有512 MB RAM并且已完全更新,但我在版本6处离开了Internet Explorer。

我已经安装了Ruby和RubyGems:

C:\Documents and Settings\zeljko>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.6.2
  - RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/Ruby187/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: C:/Ruby187/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby187/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - C:/Ruby187/lib/ruby/gems/1.8
     - C:/Documents and Settings/zeljko/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

当我尝试安装watir-webdriver gem时,收到此错误消息:

C:\Documents and Settings\zeljko>gem install watir-webdriver
ERROR:  While executing gem ... (ArgumentError)
    marshal data too short

我正在四处寻找,但还没有找到解决方案。

3 个答案:

答案 0 :(得分:12)

jarib建议我删除.gem文件夹(C:\Documents and Settings\zeljko\.gem)并解决问题。

答案 1 :(得分:0)

如果问题仍然存在

重新安装所有宝石:

sudo gem list | cut -d" " -f1 > gem_list.txt

cat gem_list.txt | xargs sudo gem uninstall -aIx

cat gem_list.txt | xargs sudo gem instal

答案 2 :(得分:-2)

删除目录中隐藏的.gem文件夹..