开发者

Installing and running Capybara on Rails 3 (uninitialized constant Object::Rack (NameError))

I'm trying to follow the instructions here to install Capybara. But each time I try to run the integration test, I get:

/Users/rambo/.rvm/gems/ruby-1.9.2-p180/bundler/gems/capybara-6641fddcfc33/lib/capybara/rails.rb:4:in `<top (required)>': uninitialized constant Object::Rack (NameError)
    from /Users/rambo/Code/ror/witsvale_app/test/integration_test_helper.rb:1:in `require'
    from /Users/rambo/Code/ror/witsvale_app/test/integration_test_helper.rb:1:in `<top 开发者_Python百科(required)>'
    from test/integration/capy_test.rb:1:in `require'
    from test/integration/capy_test.rb:1:in `<top (required)>'
    from /Users/rambo/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'

The line that is causing the problem is require capybara/rails.

Any ideas will be greatly appreciated.


I feel like a dum dum.

Anyway, I've solved it. Turns out I was missing 'test_helper.rb' in the 'test' folder. After including that, it works!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜