Forum: RSpec Cucumber newbie gets Webrat::Se ssion (LoadError)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2f030c2a9e4e1e165a0cb360805951f3?d=identicon&s=25 Tom Hoen (hoenth)
on 2009-01-13 17:58
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
171ea139761951336b844e708d1547ab?d=identicon&s=25 James Byrne (byrnejb)
on 2009-01-13 18:22
Tom Hoen 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'
2f030c2a9e4e1e165a0cb360805951f3?d=identicon&s=25 Tom Hoen (hoenth)
on 2009-01-13 18:36
James Byrne 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
This topic is locked and can not be replied to.