I found out what the problem is - My Ignorance about Capybara. I thought capybara would use the following port mentioned in my env.rb (as selenium was using and tests were running fine).
Capybara.app_host = "http://localhost:3000" I did n't know Capybara starts the app in a new server instance on a different port. Also it uses a test database instead of the app database. Database was the problem in my case. It didn't have enough data to show the page html and so naturally capybara was n't able to find the selector. Sorry for misleading you guys earlier(This is my first week on ruby stack). Thanks again Sofie & Philip. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

