Scenario: User sees the admin login page
Given There exists an admin login page
When I visit the admin login page
Then she should see the "login , Password" fields
And she should see links to "Forgot Password? , Do not have an account?"

And my web steps

Given /^There exists an admin login page$/ do
Capybara.default_host = "admin.local"
Capybara.app_host = "http://admin.local:9887" if Capybara.current_driver == :selenium
end
When /^I visit the admin login page$/ do
visit ('/')
end
Then /^she should see the "([^"]*)" fields$/ do |fields|
fields.split(/,/).each do |field|
page.should have_xpath("//*[@id='user_session_#{field.downcase.strip}']")
end
end
Then /^she should see links to "([^"]*)"$/ do |links|
links.split(/,/).each do |link_name|
page.should have_content(link_name.strip)
end
end

I have my admin console mapped as a sub domain as shown in the web steps.

The problem that I am facing is when i run this scenario using cucumber-f pretty all the steps pass and the overall scenario looks good.

But when i do rake features or rake cucumber:all I get this below error ( I am posting the error with trace)