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 6709875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:56:02+00:00 2026-05-26T07:56:02+00:00

I’m following through the Learn Rails by Example book, and I’m trying to run

  • 0

I’m following through the “Learn Rails by Example” book, and I’m trying to run the tests. For some reason I can’t get rspec to work properly.

If I run the rspec spec/ command as he instructs, I get the following error:

$ rspec spec/
/home/desktop/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.21/lib/bundler/runtime.rb:31:in `block in setup': 
You have already activated rspec-core 2.7.1, but your Gemfile requires rspec-core 2.6.4. 
Using bundle exec may solve this. (Gem::LoadError)

The odd thing is my Gemfile doesn’t specify version–

group :development do
  gem 'rspec-rails'
end

group :test do
  gem 'rspec'
  gem 'webrat'
end

If I follow the advice from the error message and use bundle exec rspec spec/ then the first two tests pass– but the new “about” page we built in the tutorial fails with the following error, even though as far as I can tell the page I’d built (and controller actions etc.) are exactly as they should be:

Failures:

  1) PagesController GET 'about' should be successful
     Failure/Error: response.should_be_success
     NoMethodError:
       undefined method `should_be_success' for #<ActionController::TestResponse:0x00000003539438>
     # ./spec/controllers/pages_controller_spec.rb:23:in `block (3 levels) in <top (required)>'

Finished in 0.10861 seconds
3 examples, 1 failure

Failed examples:

rspec ./spec/controllers/pages_controller_spec.rb:21 # PagesController GET 'about' should be successful

I’m a pretty experienced programmer but I’ve run into endless issues with conflicting gem versions and a hundred different ways to accomplish all the different tasks using Rails (eg. “use RVM”, “Don’t use RVM”, “install gems using sudo”, “don’t install gems using sudo” etc.)

My dev machine is running ubuntu linux.

Thanks for any help– please explain if you would what I’m doing wrong in Ruby noob language!

  • 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-05-26T07:56:02+00:00Added an answer on May 26, 2026 at 7:56 am

    Running bundle exec is correct, and is needed because you have a newer version of that gem installed that gets loaded instead of the one specified in your Gemfile.lock. Using bundle exec overrides the load path, causing only the gems specified in your Gemfile.lock to be loaded. (You may find it handy to alias bundle exec to something shorter.)

    The answer to the second problem is right in the error messages:

    undefined method `should_be_success'
    

    it should be should be_success.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to loop through a bunch of documents I have to put
I have just tried to save a simple *.rtf file with some websites and
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.