fix localhost problem of capybara testing