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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:07:39+00:00 2026-06-05T14:07:39+00:00

I am following the code and what the pages say specifically, and the only

  • 0

I am following the code and what the pages say specifically, and the only thing I’m missing is the rspec gem for Ruby on Rails, as I was unable to get it (gives this error for rspec installation: “E: Unable to locate package rspec” so any help with that would be greatly appreciated) due to the inability to locate the package.

This is my entire pages_controller_spec.rb file, and the error displayed when the rails server tried to connect to the page is displayed in the title (if it’s unable to be seen here it is again: “undefined method `describe’ for PagesController:Class“).

Note: I have also tried the code without “require ‘spec_helper'” and it still will not operate.

class PagesController < ApplicationController
  def home
  end

  def contact
  end

  def about
  end

  require 'spec_helper'

describe PagesController do
  render_views

  describe "GET 'home'" do
     it "should be successful" 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 "should be successful" do
    get 'contact'
    response.should be_success
     end

     it "should have the right title" do
    get 'contact'
    response.should have_selector("title",
            :content => "Ruby on Rails Tutorial Sample App | Contact")
    end
  end

  describe "GET 'about'" do
     it "should be successful" do
    get 'about'
    response.should be_success
     end

     it "should have the right title" do
    get 'about'
    response.should have_selector("title",
            :content => "Ruby on Rails Tutorial Sample App | About")
    end
  end
end
end
  • 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-05T14:07:41+00:00Added an answer on June 5, 2026 at 2:07 pm

    you need additional end before spec helper require simply you are in the controller class and he is trying to call describe as method on controller. add it and it will be fine.

    so it should be like this:

    class PagesController < ApplicationController
      def home
      end
    
      def contact
      end
    
      def about
      end
    end
    

    and rest of file.

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

Sidebar

Related Questions

With the following code I get all the pages I admin on Facebook using
Let's say I put the following code somewhere in a Master page in my
I have the following code which redirect pages depends on $path. ... $path =
We're on Rails 3.0.6. Will the following code persist across page loads and users
I am unable to get the background picture to show in my pages. I
Let's say that I got the following code in a page: elit ac <a
Let's say I have the following code: protected void ReservationForm() { double x =
Let's say I have the following code on my view page (in asp.net mvc
I have the following code on my page. http://jsfiddle.net/SO_AMK/r7ZDm/ As you see it's a
Hi I found the following code from this page JQuery UI DatePicker using 2

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.