watir - installation

笑着哭i 提交于 2019-12-03 13:34:54

I'm not sure what happened then, but in case someone else runs into this problem here is what i did to get it working. Install the watir-classic (as suggested), install ffi, uninstall ffi, install ffi again. For some reason i had 2 variations of ffi (might be due to originally installing Ruby 64 bit?), but I also uninstalled 64 bit Ruby and installed 32 bit to get this all working. – breezy katt Feb 26 at 13:47

I'm assuming you're talking about using Watir on a Windows machine. From my experience installing Ruby in the correct way is the most difficult part.

First of all, install everything as if you're on a 32 bit system. The 64 bit installation often brings unwanted issues.

That said, the ffi gem can also cause issues, so you'll have to uninstall it, and re-install with specific tags:

gem uninstall ffi
gem install ffi --platform ruby

Finally, the error that is showing LoadError: cannot load such file -- watir-classic simply means that what you're doing is trying to make use of a certain gem that is not there. In this case watir-classic, so the following should fix that:

gem install watir-classic

A complete guide on installing Watir on Windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!