Sign up ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

SeleniumRubyWindowsTest.rb:1:in `require': no such file to load -- selenium (Loa dError) from SeleniumRubyWindowsTest.rb:1

I followed the steps from this blog -

This blog is a little dated, so I am assuming it has to do with that. Anyone have any ideas on what I may be doing wrong?

Code as requested (this is copy/pasted from

require "selenium"
require "test/unit"

class SeleniumRubyWindowsTest < Test::Unit::TestCase
  def setup
    @verification_errors = []
    if $selenium
      @selenium = $selenium
      @selenium ="localhost", 4444, "*chrome", "", 10000);

  def teardown
    @selenium.stop unless $selenium
    assert_equal [], @verification_errors

  def test_SeleniumRubyWindowsTest "/"
    assert_equal "Yahoo!", @selenium.get_title
    @selenium.type "p_13838465-p", "Selenium RC" "search-submit"
    @selenium.wait_for_page_to_load "30000"
    assert_equal "Selenium RC - Yahoo! Search Results", @selenium.get_title
share|improve this question
what file are you referencing at line 1 ? Is it there ? Can you include your code ? – Phil Kirkham Aug 8 '12 at 15:15
what happens if you open up irb and type "require 'selenium' " ? – Phil Kirkham Aug 8 '12 at 20:34
irb(main):001:0> require "selenium" LoadError: cannot load such file -- selenium from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:‌​36:in require' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:‌​36:in require' from (irb):1 from C:/RailsInstaller/Ruby1.9.3/bin/irb:12:in `<main>' does this mean I have a bad install? – Letstestthisfast Aug 8 '12 at 22:58
seems so - what happens if you do 'gem uninstall Selenium' ? – Phil Kirkham Aug 8 '12 at 23:48
if that works, do 'gem install Selenium' – Phil Kirkham Aug 8 '12 at 23:49

1 Answer 1

up vote 2 down vote accepted

Seems my suggestion of doing a gem uninstall and then an install worked

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.