iOS device/UI rotation

Hi,

I am using appium with ruby script. I am able to rotate the device by adding a property in capabilities. Is there a command to rotate the device in run time. I tried this command, http://appium.io/docs/en/commands/session/orientation/set-orientation/, but didn’t work for me.I am getting “appium undefined method `rotation=’” error message. I imported following libs.

require ‘rubygems’
require ‘appium_lib’