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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:05:52+00:00 2026-05-22T01:05:52+00:00

I am following this routing tutorial for Ruby on Rails: http://guides.rubyonrails.org/routing.html It says that

  • 0

I am following this routing tutorial for Ruby on Rails:
http://guides.rubyonrails.org/routing.html

It says that when I need to create a new url, I should make a route for it. So I did that.
I would like to have a url like this http://www.domain.com/fomats/formats.html.rb so I did something like this in the routes.rb file:

  resources :formats
  get "formats/index" #display all formats

Is that correct? For my index route, I also have something like this in my route.rb file: root :to => “home#index” – should I have something like this in the formats route?

Also, how do I create the actual controller? Do I make it by hand, or does rails somehow create the stub of it for me?

Right now I get this error:

missing :action

Does that mean I am missing the controller or something else?

Thanks,
Alex

  • 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-22T01:05:52+00:00Added an answer on May 22, 2026 at 1:05 am

    As others have said, you should probably continue studying with other books or resources. These fundamental questions you are asking may become more clear the more you read.

    Here are some quickfire hints that hopefully help you.

    —

    When you declare this in the routes.rb file:

    resources :formats
    

    You automatically get the following declaration for free, so you don’t have to re-declare it:

    get "formats/index" # Don't add this to routes.rb
    

    —

    URL’s in rails look like this:

    www.domain.com/formats
    

    That URL would map to “formats#index”

    —

    To see what explicit routes have been generated, run this in your rails root directory:

    rake routes
    

    —

    To create a controller:

    rails g controller formats
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm following this tutorial (seems good) for Rails. After I run ruby script/generate scaffold
I've been experimenting with ASP.NET MVC and following this tutorial to create the basic
I'm trying to implement routing such as the following: posts/535434/This-is-a-post-title posts/tagged/tags+here // Matches {controller}/{action}/{id}
I've been following this tutorial (lesson 6) in order to build and deploy a
So I am following this guide: http://technotes.1000lines.net/?p=23 and I am going through the steps.
I am following the spring MVC tutorial and also reading this article on mvc
Following on from this question: ASP.NET MVC Routing with Default Controller I have a
I have the following link: <?php echo $this->Html->link($post['Portfolio']['title'], array('controller' => 'portfolio', 'action' => 'view',
Following this question: Good crash reporting library in c# Is there any library like
Following this example, I can list all elements into a pdf file import pyPdf

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.