Reputation: 5005
ahmet@Ubuntu:~/test$ ruby hello.rb
/home/ahmet/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- watir (LoadError)
from /home/ahmet/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from hello.rb:2:in `<main>'
I have required rubygems in my .rb but still get this error
require 'rubygems'
require 'watir'
Upvotes: 0
Views: 471
Reputation: 253
The require should be either 'firewatir' or 'watir-webdriver'
require 'firewatir'
or
require 'watir-webdriver'
Upvotes: 1
Reputation: 57312
Read this: https://github.com/zeljkofilipin/watirbook/blob/master/installation/ubuntu.md
Upvotes: 1
Reputation: 37517
I encountered a similar problem with a different gem a while back on Ubuntu using RVM. I know the gem was installed, because I had just installed it. I did the following:
rvm get latest
rvm reload
gem update --system
Then for good measure I reinstalled the gem, and everything worked. Hope this helps you as well.
Upvotes: 1
Reputation: 2378
According to Watir Readme you have to install and require firewatir
. Also you may want to install watir-webdriver instead.
Upvotes: 1