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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:26:00+00:00 2026-06-18T03:26:00+00:00

I’ve been following along with Michael Hartl’s tutorial, although for some reason I seem

  • 0

I’ve been following along with Michael Hartl’s tutorial, although for some reason I seem to be getting this error when testing:

Failures:   

1) PagesController GET 'home' should have the right title
 Failure/Error: response.should have_selector("title",
   expected css "title" to return something
 # ./spec/controllers/pages_controller_spec.rb:18:in `block (3 levels) in <top (required)>'

Finished in 0.11535 seconds
4 examples, 1 failure

Failed examples:

rspec ./spec/controllers/pages_controller_spec.rb:16 # PagesController GET 'home' should have the right title

Randomized with seed 19403

Here are my pages_controller_spec file contents:

require 'spec_helper'



describe PagesController do


render_views

describe "GET 'home'" do
it "returns http success" do
  get 'home'
  response.should be_success
end

it "should have the right title" do
  get 'home'
  response.should have_selector("title", 
      :content => "Ruby on rails tutorial sample app | Home")
 end
 end

describe "GET 'contact'" do
it "returns http success" do
  get 'contact'
  response.should be_success
 end
end


describe "GET 'about'" do
it "returns http success" do
  get 'about'
  response.should be_success
end
 end
 end

And here are the contents of my home.html.erb file:

<!DOCTYPE>
<html>
<head>
    <title>Ruby on rails tutorial sample app | Home</title>
</head>
<body>
    <h1>Pages#home</h1>
    <p>Find me in app/views/pages/home.html.erb</p>
</body>
 </html>
  • 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-18T03:26:02+00:00Added an answer on June 18, 2026 at 3:26 am

    Yeah that happened to me too. Please just make sure that you are using that exact version of Capybara mentioned in the tutorial. i.e. 1.1.2

    I have tried many variations and alternatives and have reached the conclusion that there is still some compatibility issues in the latest Capybara.

    Hope this helps.

    Update: Nailed it. Checkout the source of the home page from your
    browser. Since application layout uses a yield inside <body>, all you
    html in home.html.erb is actually replaced inside the body(even the
    <title> part is being substituted inside <body> tag), effectively
    nullifying <head> and <title> elements. That’s why there is no view
    specific title yet. The title defined in
    /views/layout/application.html.erb is being used on your home page.

    My advice is to push on with the tutorial. In just a few steps, you will be pass the tests.

    • 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'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
This could be a duplicate question, but I have no idea what search terms

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.