We have used Capybara with Chrome driver and we had the same issue. When we launch the url, Chrome window was sent to background. To overcome this issue, we have used the following code and it works like magic!!
@window = @session.current_window
@session.visit url
@session.switch_to_window(@window)