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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:34:04+00:00 2026-06-05T02:34:04+00:00

I keep getting the same two failures for a test trying to create a

  • 0

I keep getting the same two failures for a test trying to create a signin page.

Here is the error message: $ bundle exec rspec spec/requests/user_pages_spec.rb
FF

Failures:

1) User pages signup page
Failure/Error: before { visit signup_path }
ActionView::Template::Error:
undefined method |' for "Ruby on Rails Tutorial Sample App":String
# ./app/helpers/application_helper.rb:9:in
full_title’
# ./app/views/layouts/application.html.erb:4:in _app_views_layouts_application_html_erb__2148911516627374684_2168968760'
# ./spec/requests/user_pages_spec.rb:8:in
block (3 levels) in ‘

2) User pages signup page
Failure/Error: before { visit signup_path }
ActionView::Template::Error:
undefined method |' for "Ruby on Rails Tutorial Sample App":String
# ./app/helpers/application_helper.rb:9:in
full_title’
# ./app/views/layouts/application.html.erb:4:in _app_views_layouts_application_html_erb__2148911516627374684_2168968760'
# ./spec/requests/user_pages_spec.rb:8:in
block (3 levels) in ‘

Finished in 0.17668 seconds
2 examples, 2 failures

Failed examples:

rspec ./spec/requests/user_pages_spec.rb:10 # User pages signup page
rspec ./spec/requests/user_pages_spec.rb:11 # User pages signup page

And here is the file user_pages_spec.rb

require ‘spec_helper’

describe “User pages” do

subject { page }

describe “signup page” do
before { visit signup_path }

it { should have_selector('h1', text: 'Sign up') }
it { should have_selector('title', text: full_title('Sign up')) }

end
end

here is the file application_helper.rb:

module ApplicationHelper

  # Returns the full title on a per-page basis.
  def full_title(page_title)
    base_title = "Ruby on Rails Tutorial Sample App"
    if page_title.empty?
      base_title
    else
      "#{base_title}" | "#{page_title}"
    end
  end
end

here is the file routes.rb
SampleApp::Application.routes.draw do
get “users/new”

  root to: 'static_pages#home'

  match '/signup',  to: 'users#new'

  match '/help',    to: 'static_pages#help'
  match '/about',   to: 'static_pages#about'
  match '/contact', to: 'static_pages#contact'

I’ve been stuck on this for quite a bit so any help would be greatly appreciated!

Thanks!

  • 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-05T02:34:06+00:00Added an answer on June 5, 2026 at 2:34 am

    The rails error messages it gives you here are pretty descriptive.

    If we look at the line

    undefined method `|' for "Ruby on Rails Tutorial Sample App":String # ./app/helpers/application_helper.rb:9:in full_title
    

    It’s telling us it can’t find a method called | for the String "Ruby on Rails Tutorial Sample App" on line 9 of application_helper.rb in the full_title method definition. If we got to that line we can see

     "#{base_title}" | "#{page_title}"
    

    Which ruby interprets as “run the method | on the result of “#{base_title}” (which in this case evaluates to the String “Ruby on Rails Tutorial Sample App”) with the argument “#{page_title}”. Since Strings don’t have a ‘|’ method, it returns an “undefined method” error.

    To fix, just change the line to

     "#{base_title} | #{page_title}"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Keep getting this error after inserting a subdatasheet into a query and trying to
I keep getting the ' Object Expected ' error within my page script when
I keep getting the following error: $ ./test.py -bash: ./test.py: cannot execute binary file
I keep getting this error and i have been trying everything for about a
I'm trying to use php's mail() function but keep getting an error. I've installed
Keep getting the error Arguments are not sufficiently instantiated for the multiplication by addition
I keep getting this error saying that it cannot find my javascript function checkpw().
I keep getting an syntax error during runtime when this query is called. adoquery1.Active
I keep getting an error saying my value is not positioned on a valid
I keep getting this error from my code and I have no idea what

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.