Back button in iOS not working? (Ruby)

Hello!
I have a problem with ‘go back’ in iOS (in Ruby)
In Android this code works but on iOS - unfortunately not:

@driver = Appium::Driver.new(caps)
… some operations, to go to one screen in application
@driver.back

Error is:

Back button is null and can’t be tapped.

My Appium version:
appium_console 1.0.3
appium_lib 6.0.0
Appium GUI 1.3.6

Working on simulator of iPhone5, SDK 8.1

You could try this back helper method for iOS.

How to use this method? When I call it:

def myMethod
back_click
end

then I have “undefinied variable or method”.

When I copy-paste this method, then “wait” method is undefinied.

I have:

Gemfile:

gem ‘appium_console’
gem ‘appium_lib’, ‘~> 6.0.0’

I can only use methods from driver, for example:

@driver.execute_script
@driver.find_element

etc.

Sorry for that easy questions, I’m really new into Ruby and Appium.

OK I know solution:

I forgot about:

Appium.promote_appium_methods Object

Now everything is working! Thank you!