在Windows XP上安装watir-webdriver时出现“marshal data too short`错误信息

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

我正在四处搜寻,但还没有find解决scheme。

Solutions Collecting From Web of "在Windows XP上安装watir-webdriver时出现“marshal data too short`错误信息"

jarib建议我应该删除.gem文件夹( C:\Documents and Settings\zeljko\.gem ),它解决了这个问题。

如果问题仍然存在

重新安装所有的宝石:

 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 

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