Cucumber newbie gets Webrat::Se ssion (LoadError)


#1

Just trying to get cucumber/webrat going and so after following the
installation process here
http://wiki.github.com/aslakhellesoy/cucumber/ruby-on-rails i wrote a
quick feature and when I rake features, I get the following in the
console:

c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/acti
ve_support/dependencies.rb:262:in load_missing_constant': Expected c:/projects/ classroomparent/vendor/plugins/webrat/lib/webrat/session.rb to define Webrat::Se ssion (LoadError) Failed to load features/support/env.rb from c:/InstantRails-2.0-win/ruby/lib/ru by/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:468:in
const_missing’
from
c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/aslakhellesoy-w
ebrat-0.3.2.2/lib/webrat/rails.rb:7

I have the following related gems installed:
aslakhellesoy-webrat (0.3.2.2)
cucumber (0.1.14)
webrat (0.3.4)

Any advice you can give would be greatly appreciated.

Tom


#2

Tom H. wrote:

Any advice you can give would be greatly appreciated.

Tom

What are the contents of features/support/env.rb? Do you have something
like this in there?

If webrat is a gem then uncomment this

require ‘webrat’ if !defined?(Webrat)

If webrat is a plugin then uncomment this

#require ‘webrat/rails’


#3

James B. wrote:

What are the contents of features/support/env.rb? Do you have something
like this in there?

If webrat is a gem then uncomment this

require ‘webrat’ if !defined?(Webrat)

If webrat is a plugin then uncomment this

#require ‘webrat/rails’

Though there isn’t the comment, I do have the line:
require ‘webrat/rails’

I changed it to the other require statement and now I get

0 scenarios.

So I am getting closer. Thanks for your help.

Tom