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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:43:57+00:00 2026-05-27T00:43:57+00:00

I am learning Ruby on Rails and I have a dumb question about the

  • 0

I am learning Ruby on Rails and I have a dumb question about the link_to function.

I set up a controller called “home” and I’ve created “index” as an action .

I’ve set up devise. However, when I browse to some links like sign_in, sign_up, etc. I get this error:

Routing Error
No route matches {:controller=>"devise/home"}

I’ve narrowed it down to:

<%= link_to "Home", { :controller => "home", :action => "index" }, :class => "navlink" %>

This works for my actions for home but not for my devise actions.

What am I missing here?

  • 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-27T00:43:57+00:00Added an answer on May 27, 2026 at 12:43 am

    Devise creates a set of helper functions for you that generate the correct paths. Run rake routes from the command line to see them. You’ll get output similar to the following (assuming your Devise model is called User).

                  new_user_session GET    /users/sign_in(.:format)                      {:controller=>"devise/sessions", :action=>"new"}
                      user_session POST   /users/sign_in(.:format)                      {:controller=>"devise/sessions", :action=>"create"}
              destroy_user_session GET    /users/sign_out(.:format)                     {:controller=>"devise/sessions", :action=>"destroy"}
                     user_password POST   /users/password(.:format)                     {:controller=>"devise/passwords", :action=>"create"}
                 new_user_password GET    /users/password/new(.:format)                 {:controller=>"devise/passwords", :action=>"new"}
                edit_user_password GET    /users/password/edit(.:format)                {:controller=>"devise/passwords", :action=>"edit"}
                     user_password PUT    /users/password(.:format)                     {:controller=>"devise/passwords", :action=>"update"}
                 user_registration POST   /users(.:format)                              {:controller=>"devise/registrations", :action=>"create"}
             new_user_registration GET    /users/sign_up(.:format)                      {:controller=>"devise/registrations", :action=>"new"}
            edit_user_registration GET    /users/edit(.:format)                         {:controller=>"devise/registrations", :action=>"edit"}
                 user_registration PUT    /users(.:format)                              {:controller=>"devise/registrations", :action=>"update"}
                 user_registration DELETE /users(.:format)                              {:controller=>"devise/registrations", :action=>"destroy"}
    

    Appending _path to the first part of each line gives you the name of the helper function you need to call.

    For example, the following would give you a link to the login page:

    <%= link_to "Login", new_user_session_path %>
    

    Remember if the request is a DELETE rather than a GET (such as the logout link) you’ll need to specify this as part of the call to link_to.

    <%= link_to "Logout", destroy_user_session_path, :method => :delete %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a book called Learning Ruby and under the section for rails is
I am learning and have already set up a Ruby on Rails environment based
I'm just learning ruby on rails and I have a table of user roles
Hi I'm currently learning Ruby On Rails and I have a little mistake. I
I have just started learning ruby on rails. I have a doubt wrt routing.
I have just started learning Ruby on Rails. I happened to look for prevention
After learning power of Rails framework, I have started learning ruby. In Ruby, I
I'm just learning Ruby on Rails (no prior Ruby experience) I have these models
I'm learning Ruby on Rails with the AWDR book and have had to be
I have just started out learning rails and ruby, so please bear with me

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.