How to use Selenium RC in Rails

Hi,

I am trying to use Selenium RC in my rails application. I first
install selenium RC ruby client (>gem install selenium-client). Then
create a “selenium_test.rb” in libs folder. In the file, I create a
class “SeleniumTest”.

libs/selenium_test.rb

require “selenium-client”

class SeleniumTest
attr_reader :browser

def initialize
@browser = Selenium::Client::Driver.new
:host => “localhost”,
:port => 4444,
:browser => “*firefox”,
:url => “http://www.google.com”,
:timeout_in_second => 60
end
end

In a controller file, I create an instance of this class.

o=SeleniumTest.new

When I run rails, it returns an error:

LoadError in LoginsController#create
no such file to load – selenium-client

I tried to add the following require settings in /config/
development.rb. No helpful.

require “rubygems”
gem “selenium-client”, “>=1.2.17”
require “selenium/client”

I am new in Rails. It seems a quite simple task. I have some third-
party library and want to use in my code. In C#, I just add the
reference, then specify its namespace in the top of the file. It is
actually similar in Ruby code. But for Rails, I do not know how to
reference external lib. Could someone here help me? Really appreciate.