Window Maximize using Selenium webdriver v2.6.0

I’m trying to maximize the window but with no success

require “selenium-webdriver”
driver = Selenium::WebDriver.for :chrome
driver.navigate.to “http://www.google.es
driver.window_maximize

driver.execute_script(“window.resizeTo(screen.width,screen.height)”)

require “selenium-webdriver”

$driver = Selenium::WebDriver.for :chrome
$driver.manage.window.maximize

Above worked for me with selenium webdriver ver 2.53.0