Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8961567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:55:25+00:00 2026-06-15T15:55:25+00:00

Working on a new Rails 3.2.9 app with rspec and capybara. I have the

  • 0

Working on a new Rails 3.2.9 app with rspec and capybara.

I have the following in the Gemfile:

gem 'rspec-rails'
gem 'capybara'

and the following in spec/spec_helper.rb:

require 'rspec/rails'
require 'capybara/rspec'

and in spec/requests/asdf_spec.rb:

require 'spec_helper'
describe 'Asdf' do
  describe "GET /asdfs" do
    it "should list asdfs" do
      visit asdfs_path
    end
  end
end

This test is failing:

Failure/Error: visit asdfs_path
NoMethodError:
 undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_2::Nested_1:0x007fa7b68961a0>
# ./spec/requests/asdfs_spec.rb:19:in `block (4 levels) in <top (required)>'

So it looks like Capybara isn’t getting loaded. Ack, why not? I feel like I’ve done this exact same thing a dozen times before… probably blanking on something stupid.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:55:27+00:00Added an answer on June 15, 2026 at 3:55 pm

    So it was a capybara version 2 change. I found this:

    http://alindeman.github.com/2012/11/11/rspec-rails-and-capybara-2.0-what-you-need-to-know.html

    which explains:

    Upon upgrading to capybara 2.0, capybara will not be available by
    default
    in RSpec request specs. Instead, a new type of spec–the
    feature spec–has been created for use with capybara.

    To upgrade to capybara 2.0, you’ll need to do a few things:

    • Upgrade rspec-rails to 2.12.0 or greater
    • Move any tests that use capybara from spec/requests to spec/features. Capybara
      tests use the visit method and usually assert against page.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm thinking to use devise gem for a new Rails app I'm working on.
Relatively new to rails, I'm working on a simple rails app for a few
I am working on a new rails 3.2 company management app which relies heavily
I am relatively new to rails and have been working my way through the
Rails and all my gem files + homebrew installs have been working fine up
I'm working on unit tests for my Rails app and have run into the
I have multiple users working on a rails app in my Ubuntu machine with
I am new to rails and am working on updating a simple rails app.
I'm looking to use the latest Twitter gem for a Rails app I'm working
I'm new to rails and working on a rails app and I'm stuck pondering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.