You may want to add HTTP authentication to your Ruby on Rails site, add following to your application controller file,
before_filter :authenticate
protected
def authenticate
authenticate_or_request_with_http_basic do |username, password|
username == "test" && password == "test"
end
end
After adding these lines, application will ask for username and password.