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

  • Home
  • SEARCH
  • 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 9235055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:56:10+00:00 2026-06-18T06:56:10+00:00

When trying to access localhost:3000/static_pages/home I get the following error: SyntaxError in StaticPagesController#home /Users/user/Sites/rails_projects/sample_app/app/helpers/application_helper.rb:9:

  • 0

When trying to access localhost:3000/static_pages/home I get the following error:

SyntaxError in StaticPagesController#home

/Users/user/Sites/rails_projects/sample_app/app/helpers/application_helper.rb:9: syntax error, unexpected keyword_end, expecting $end
Rails.root: /Users/user/Sites/rails_projects/sample_app

Application Trace | Framework Trace | Full Trace
app/controllers/application_controller.rb:1:in `<top (required)>'
app/controllers/static_pages_controller.rb:1:in `<top (required)>' 

routes.rb contents:

SampleApp::Application.routes.draw do

  get "static_pages/home"

  get "static_pages/help"

  get "static_pages/about"

  get "static_pages/contact"

end

application_helper.rb contents:

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

static_pages_controller.rb contents:

class StaticPagesController < ApplicationController
  def home
  end

  def help
  end

  def about
  end

  def contact
  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-18T06:56:12+00:00Added an answer on June 18, 2026 at 6:56 am

    You’re application_helper.rb seems to be broken. You probably want something like this:

    module ApplicationHelper
    
      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
    

    Seems the module line got missing. That’s why Ruby is complaining about an additional end in the last line.

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

Sidebar

Related Questions

I changed my Document above error when trying to access the localhost. DocumentRoot /home/kunal/Development/sites
im trying to access my localhost i.e. localhost/app and trying to get back some
I am trying to access localhost on my xampp via the Chrome browser but
Could you help me with my problem? I am trying to access localhost to
I got this error when trying to access 'model' and 'CRUD' generator in gii.
I have the following stack trace when trying to access the django admin default
I am trying to access my gmail account through my localhost. However, I am
I am using XAMPP and I am trying to access phpMyAdmin through http://localhost/phpmyadmin ,
I have a question. I am trying to access varnish logs (website is localhost)
I am trying to access token from http://localhost:8090/appp/appp/getToken it returns me string with Content-Type:application/json

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.