undefined method `visit’ for # (NoMethodError)

Problem
When using Cucumber and Webrat in a ruby on rails 3 application you see the error: undefined method `visit' for # (NoMethodError) and your scenario fails.

Solution
Replace the line:
config.mode = :rails
with the line:
config.mode = :rack
in the Webrat.configure block, in your
app/features/support/env.rb
file.