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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:12:04+00:00 2026-06-14T03:12:04+00:00

I have this route profile GET /contacts/:id(.:format) {:controller=>my_devise/contacts, :action=>profile} This is my controllers/application_controller.rb class

  • 0

I have this route

profile GET /contacts/:id(.:format) {:controller=>"my_devise/contacts", :action=>"profile"}

This is my controllers/application_controller.rb

class ApplicationController < ActionController::Base
  protect_from_forgery

  before_filter :get_current_user

    def get_current_user
        @current_user = current_user
    end

end

If i have this link in my view/layouts/application.html.erb file <%= link_to "Profile", profile_path(@current_user) %> on the url http://localhost:3000/contacts/1, i have no errors, but if i try to hit the url http://localhost:3000/contacts, I get the error below

Routing Error

No route matches {:controller=>"my_devise/contacts", :action=>"profile"}

If i remove the link in my application.html.erb file and hit http://localhost:3000/contacts, the error goes away.

Why would that link cause this error?

EDIT

Full routes file

$ rake routes
          users_sign_out GET    /users/sign_out(.:format)      {:controller=>"devise/sessions", :action=>"destroy"}
           users_sign_in GET    /users/sign_in(.:format)       {:controller=>"my_devise/sessions", :action=>"new"}
                    home GET    /home(.:format)                {:action=>"index", :controller=>"my_devise/sessions"}
                contacts GET    /contacts(.:format)            {:action=>"list", :controller=>"my_devise/contacts"}
                 profile GET    /contacts/:id(.:format)        {:controller=>"my_devise/contacts", :action=>"profile"}
            edit_profile GET    /contacts/:id/edit(.:format)   {:controller=>"my_devise/contacts", :action=>"edit"}
                         POST   /contacts/:id/edit(.:format)   {:controller=>"my_devise/contacts", :action=>"update_user"}
                    more GET    /more/:id(.:format)            {:controller=>"my_devise/contacts", :action=>"more"}
                         POST   /home(.:format)                {:action=>"create_new_user", :controller=>"my_devise/sessions"}
           users_sign_up GET    /users/sign_up(.:format)       {:controller=>"my_devise/registrations", :action=>"new"}
                         POST   /users/sign_up(.:format)       {:controller=>"my_devise/registrations", :action=>"new"}
        new_user_session GET    /users/sign_in(.:format)       {:action=>"new", :controller=>"devise/sessions"}
            user_session POST   /users/sign_in(.:format)       {:action=>"create", :controller=>"devise/sessions"}
    destroy_user_session DELETE /users/sign_out(.:format)      {:action=>"destroy", :controller=>"devise/sessions"}
           user_password POST   /users/password(.:format)      {:action=>"create", :controller=>"devise/passwords"}
       new_user_password GET    /users/password/new(.:format)  {:action=>"new", :controller=>"devise/passwords"}
      edit_user_password GET    /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"}
                         PUT    /users/password(.:format)      {:action=>"update", :controller=>"devise/passwords"}
cancel_user_registration GET    /users/cancel(.:format)        {:action=>"cancel", :controller=>"devise/registrations"}
       user_registration POST   /users(.:format)               {:action=>"create", :controller=>"devise/registrations"}
   new_user_registration GET    /users/sign_up(.:format)       {:action=>"new", :controller=>"devise/registrations"}
  edit_user_registration GET    /users/edit(.:format)          {:action=>"edit", :controller=>"devise/registrations"}
                         PUT    /users(.:format)               {:action=>"update", :controller=>"devise/registrations"}
                         DELETE /users(.:format)               {:action=>"destroy", :controller=>"devise/registrations"}
        new_user_session GET    /users/sign_in(.:format)       {:action=>"new", :controller=>"my_devise/sessions"}
                         POST   /users/sign_in(.:format)       {:action=>"create", :controller=>"my_devise/sessions"}
    destroy_user_session DELETE /users/sign_out(.:format)      {:action=>"destroy", :controller=>"my_devise/sessions"}
                         POST   /users/password(.:format)      {:action=>"create", :controller=>"devise/passwords"}
                         GET    /users/password/new(.:format)  {:action=>"new", :controller=>"devise/passwords"}
                         GET    /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"}
                         PUT    /users/password(.:format)      {:action=>"update", :controller=>"devise/passwords"}
                         GET    /users/cancel(.:format)        {:action=>"cancel", :controller=>"my_devise/registrations"}
                         POST   /users(.:format)               {:action=>"create", :controller=>"my_devise/registrations"}
                         GET    /users/sign_up(.:format)       {:action=>"new", :controller=>"my_devise/registrations"}
                         GET    /users/edit(.:format)          {:action=>"edit", :controller=>"my_devise/registrations"}
                         PUT    /users(.:format)               {:action=>"update", :controller=>"my_devise/registrations"}
                         DELETE /users(.:format)               {:action=>"destroy", :controller=>"my_devise/registrations"}
              home_index GET    /home/index(.:format)          {:controller=>"home", :action=>"index"}
                    root        /                              {:controller=>"home", :action=>"index"}
                    root        /                              {:controller=>"home", :action=>"index"}
  • 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-14T03:12:05+00:00Added an answer on June 14, 2026 at 3:12 am

    To answer your actual question, it’s because you don’t have a route for that (/contacts – note no id). Your route is /contacts/:id(.:format) – the format is optional, but the id is not. You’ll need to make the id optional, too, or create another route.

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

Sidebar

Related Questions

I have a route defined like this: GET /question/:q_id controllers.Questions.viewQuestion(q_id: Long) Then in my
I have a route which routes a request to somepath/:id(.:format) to somecontroller#show . This
In my routes I have: resources :accounts This produces: accounts GET /accounts(.:format) accounts#index POST
I have a route like so: routes.MapRoute ( Profile, profile/{username}, new { controller =
I have a method like this : class ProfilesController < ApplicationController before_filter :authenticate_user! current_user
I have the following URl: http://localhost:12981/BaseEvent/EventOverview/12?type=Film This is route: routes.MapRoute( Default, // Route name
I'm using Expressjs w/ node.js and I have a route like this: users.init(app.db, function()
I have a route that is suppose to match something like this localhost:3000/site/admin and
I have this route that let me build custom url for users like /thisismyname,
i have two identically controllers routed in the same way : resources :profile resources

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.