I have gone through the post of capybara + click on alert box but nothing seems to be work. Following is my scenario:
Scenario: When I click update
For WebKit:
page.accept_confirm { click_button "Upgrade" }
For Selenium:
page.driver.browser.switch_to.alert.accept