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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:57:38+00:00 2026-06-12T00:57:38+00:00

ok … sort of have been dithering on posting this question but here goes:

  • 0

ok … sort of have been dithering on posting this question but here goes:

it’s actually lot like this question.

my spec tests fail too … but i’m not too concerned about that b/c it just involves the title for all pages… (which i can easily fix)

what i’m really wondering about are the routes issue.

after following all of hartl’s directions in section 5.3.2 rail routes, this is what i get:

No route matches [GET] "/static_pages/about"
No route matches [GET] "/static_pages/home"
No route matches [GET] "/static_pages/help"
No route matches [GET] "/static_pages/contact"

config/routes.rb settings

SampleApp::Application.routes.draw do
   root to: 'static_pages#home'
   match '/help',    to: 'static_pages#help'
   match '/about',   to: 'static_pages#about'
   match '/contact', to: 'static_pages#contact' 

I can fix three of the pages above by prefixing the ‘/help,’ ‘/about,’ and ‘/contact’ with ‘static_pages’ …

it still doesn’t solve the home page problem.

adding this to spec_helper.rb didn’t help (from the link)

config.include Rails.application.routes.url_helpers

what am i missing here, and what other information do i need to add to make the question clearer?

tests are done by this statement: bundle exec rspec spec/requests/static_pages_spec.rb

here is the terminal out after running the statement

Failures:

1) Static pages About page should have the h1 'About Us'
 Failure/Error: visit '/static_pages/about'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/about"
 # ./spec/requests/static_pages_spec.rb:46:in `block (3 levels) in <top (required)>'

 2) Static pages About page should not have a custom page title
 Failure/Error: visit '/static_pages/about'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/about"
 # ./spec/requests/static_pages_spec.rb:57:in `block (3 levels) in <top (required)>'

 3) Static pages About page should have the base title
 Failure/Error: visit '/static_pages/about'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/about"
 # ./spec/requests/static_pages_spec.rb:51:in `block (3 levels) in <top (required)>'

 4) Static pages Home page should have the h1 'Sample App'
 Failure/Error: visit '/static_pages/home'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/home"
 # ./spec/requests/static_pages_spec.rb:8:in `block (3 levels) in <top (required)>'

 5) Static pages Home page should not have a custom page title
 Failure/Error: visit '/static_pages/home'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/home"
 # ./spec/requests/static_pages_spec.rb:19:in `block (3 levels) in <top (required)>'

 6) Static pages Home page should have the base title
 Failure/Error: visit '/static_pages/home'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/home"
 # ./spec/requests/static_pages_spec.rb:13:in `block (3 levels) in <top (required)>'

 7) Static pages Help page should have the h1 'Help'
 Failure/Error: visit '/static_pages/help'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/help"
 # ./spec/requests/static_pages_spec.rb:27:in `block (3 levels) in <top (required)>'

 8) Static pages Help page should not have a custom page title
 Failure/Error: visit '/static_pages/help'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/help"
 # ./spec/requests/static_pages_spec.rb:38:in `block (3 levels) in <top (required)>'

 9) Static pages Help page should have the base title
 Failure/Error: visit '/static_pages/help'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/help"
 # ./spec/requests/static_pages_spec.rb:32:in `block (3 levels) in <top (required)>'

 10) Static pages Contact page should have the h1 'Contact'
 Failure/Error: visit '/static_pages/contact'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/contact"
 # ./spec/requests/static_pages_spec.rb:65:in `block (3 levels) in <top (required)>'

 11) Static pages Contact page should have the title 'Contact'
 Failure/Error: visit '/static_pages/contact'
 ActionController::RoutingError:
   No route matches [GET] "/static_pages/contact"
 # ./spec/requests/static_pages_spec.rb:70:in `block (3 levels) in <top (required)>'

 Finished in 0.14305 seconds
 11 examples, 11 failures

 Failed examples:

 rspec ./spec/requests/static_pages_spec.rb:45 # Static pages About page should have the h1 'About Us'
 rspec ./spec/requests/static_pages_spec.rb:56 # Static pages About page should not have a custom page title
 rspec ./spec/requests/static_pages_spec.rb:50 # Static pages About page should have the base title
 rspec ./spec/requests/static_pages_spec.rb:7 # Static pages Home page should have the h1 'Sample App'
 rspec ./spec/requests/static_pages_spec.rb:18 # Static pages Home page should not have a custom page title
 rspec ./spec/requests/static_pages_spec.rb:12 # Static pages Home page should have the base title
 rspec ./spec/requests/static_pages_spec.rb:26 # Static pages Help page should have the h1 'Help'
 rspec ./spec/requests/static_pages_spec.rb:37 # Static pages Help page should not have a custom page title
 rspec ./spec/requests/static_pages_spec.rb:31 # Static pages Help page should have the base title
 rspec ./spec/requests/static_pages_spec.rb:64 # Static pages Contact page should have the h1 'Contact'
  rspec ./spec/requests/static_pages_spec.rb:69 # Static pages Contact page should have the title 'Contact'
  • 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-12T00:57:39+00:00Added an answer on June 12, 2026 at 12:57 am

    Although you have a root mapping, which routes ‘/’ requests to StaticPagesController home action, you have no mapping for the route static_pages/home. To add it:

       match 'static_pages/home',    to: 'static_pages#home'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
I have this xml <entry id=1008 section=articles> <excerpt><p>&#8230; in Richtung „Aus für Tierversuche. Kosmetik-Fertigprodukte
I have been making a wordpress template. i got stuck at some place... the
Why does the Android system throw this Exception? 05-18 12:33:44.169 W/System.err( 8230): java.io.IOException: Is
An Arabic name shall be sent via SOAP. The name is encoded like this:
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
CGI.escapeHTML is pretty bad, but CGI.unescapeHTML is completely borked. For example: require 'cgi' CGI.unescapeHTML('&#8230;')
so I did $subject = 'sakdlfjsalfdjslfad <a href=something/8230>lol is that true?</a> lalalala'; $subject =
what about this one: I want to format the currentTime displayed by a videoPlayer
I want to run this <!-- This will remove the tag --> <xsl:template name=remove-html>

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.