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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:21:57+00:00 2026-05-17T21:21:57+00:00

Why in Rails 3 do you have to uncomment match ‘:controller(/:action(/:id(.:format)))’ (as seen in

  • 0

Why in Rails 3 do you have to uncomment match ':controller(/:action(/:id(.:format)))' (as seen in this Hello World article) to make the index method of the hello controller be called when you go to http://localhost:3000/hello? Can somebody please explain why we have to do this in Rails 3 but not Rails 2, and is this a normal thing for Rails 3 or is it some kind of hack?

  • 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-05-17T21:21:58+00:00Added an answer on May 17, 2026 at 9:21 pm

    That particular match is sort of a catch-all for any requests that haven’t already been defined.

    Ideally you should be using Resource Routing, but that matcher still exists as legacy support.

    It’s commented out by default because Rails assumes that if a user attempts to access a route that you didn’t explicitly define, it should cause a 404 error instead of a 500 error, which is what would happen if I tried to access http://localhost:3000/hello with that matcher enabled, because there’s no ‘hello’ controller.

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

Sidebar

Related Questions

I have Rails 3.1.2 app with a hierarchical relationship that looks like this: Categories
Does rails have a break statement? I'm writing a controller that has some pretty
Is this more concise way of writing this: current_user.products.where(:product_id => product.id).present? Does rails have
I have Rails 3.1.3 app and trying to plug gem redis to it. I've
I have rails app which are working perfectly in the local computer. But when
Is there a way to have rails print out a number with commas in
I'm new to rails and have volunteered to help out the local High School
I am new to rails and have developed a simple rails application on my
I'm using jQuery with rails and have the following piece of code $('#related').html(<%= render
Is it possible to have a single Ruby on Rails installations have multiple applications,

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.