I'm trying to get started with ruby and Watir-webdriver for some test automation.
sudo apt-get install ruby rubygems
sudo gem install watir-webdriver
Whenever I gem install I'm getting these errors like :
[/usr/lib/ruby/gems/1.8/specifications/selenium-webdriver-2.13.0.gemspec] isn't a Gem::Specification (NilClass instead).
ERROR: While executing gem ... (NoMethodError)
undefined method `spec' for nil:NilClass
The problem was due to corrupted downloads being stored in the cache, so that even after gem uninstall and reinstall, the error persisted. To force re-download, I emptied the cache directories which are found by checking under GEM PATHS in the output of the command gem env.
You should try using Ruby 1.9.x
The easiest way is to use RVM:
sudo apt-get install git
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
rvm install 1.9.2
rvm use 1.9.2
gem install watir-webdriver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With