Hey Dhanush, you can follow the below shown code snippet to run a test on Remote Webdriver using Ruby Selenium:
require "selenium-webdriver"
username = 'abc%40domain.com'
authkey = 'yourauthkey'
# Defining capabilities of the test session, like browser, OS etc
capability = Selenium::WebDriver::Remote::Capabilities.new
capability["name"] = "Dummy Example"
capability["build"] = "1.0"
capability["browser_api_name"] = "Chrome"
capability["os_api_name"] = "Windows10"
driver = Selenium::WebDriver.for(:remote, :url =>; "http://#{username}:#{authkey}@hub.edureka.co:80/wd/hub", :desired_capabilities =>; capability)
puts "Loading URL"
driver.navigate.to("https://www.edureka.co")
puts "Clicking Login"
element = driver.find_element(class: 'login')
element.click
driver.quit