Use custom server url to instantiate appium with ruby libs

I am trying to use the custom server_url and appium does not seem to honor the value I pass for the same, it always inits with the localhost

desired_caps = {
caps: {
platformName: ‘Android’,
platformVersion: @version,
deviceName: ‘Test_Accel’,
appPackage: @bundle,
appActivity: @activity
appium_lib: { server_url: @server_url }
$appiumDriver =

Am i passing the correct parameters?

It should work. If you debug with pry, what is custom url being set to?