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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:58:13+00:00 2026-05-30T20:58:13+00:00

Im getting this routing error No route matches {:controller=>posts, :action=>show} when i click on

  • 0

Im getting this routing error

No route matches {:controller=>”posts”, :action=>”show”}

when i click on the new post link from index page it gives me this error, even though in my new post link i cal for new action i dont know y it is calling for show action.

my index page:

%h1 All Posts
%html
  %head
  %body
    %table
      %tr
        %th Author Name
        %th Title
        %th Email
        %th description
        %th
        %th
        %th

      - @posts.each do |post|
        %tr
          %td= post.author_name
          %td= post.title
          %td= post.email
          %td= post.description
          %td= link_to 'Show', post
          %td= link_to 'Edit', edit_post_path(post)
          %td= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete

%br
= link_to 'New Post', :controller => "posts", :action => "new"

my edit page:

%h1 Update Post

%html
  %head
    %title
  %body
    = form_for(@post) do |f| 
      = f.label :Author_name 
      %br
      = f.text_field :author_name
      %br
      = f.label :Title
      %br
      = f.text_field :title
      %br
      = f.label :Email
      %br
      = f.text_field :email
      %br
      = f.label :Description
      %br
      = f.text_area :description

      %br
      = f.submit

%br
= link_to 'Back', post_path 

my rake routes:

        new_auth_session GET    /auths/sign_in(.:format)                    devise/sessions#new
            auth_session POST   /auths/sign_in(.:format)                    devise/sessions#create
    destroy_auth_session DELETE /auths/sign_out(.:format)           devise/sessions#destroy
           auth_password POST   /auths/password(.:format)                   devise/passwords#create
       new_auth_password GET    /auths/password/new(.:format)               devise/passwords#new
      edit_auth_password GET    /auths/password/edit(.:format)              devise/passwords#edit
                         PUT    /auths/password(.:format)                   devise/passwords#update
cancel_auth_registration GET    /auths/cancel(.:format)              devise/registrations#cancel
       auth_registration POST   /auths(.:format)                           devise/registrations#create
   new_auth_registration GET    /auths/sign_up(.:format)                    devise/registrations#new
  edit_auth_registration GET    /auths/edit(.:format)                       devise/registrations#edit
                         PUT    /auths(.:format)                            devise/registrations#update
                         DELETE /auths(.:format)                            devise/registrations#destroy
                   users GET    /users(.:format)                            users#index
                         POST   /users(.:format)                            users#create
                new_user GET    /users/new(.:format)                        users#new
               edit_user GET    /users/:id/edit(.:format)                   users#edit
                    user GET    /users/:id(.:format)                        users#show
                         PUT    /users/:id(.:format)                        users#update
                         DELETE /users/:id(.:format)                        users#destroy
           post_comments GET    /posts/:post_id/comments(.:format)          comments#index
                         POST   /posts/:post_id/comments(.:format)          comments#create
        new_post_comment GET    /posts/:post_id/comments/new(.:format)      comments#new
       edit_post_comment GET    /posts/:post_id/comments/:id/edit(.:format) comments#edit
            post_comment GET    /posts/:post_id/comments/:id(.:format)      comments#show
                         PUT    /posts/:post_id/comments/:id(.:format)      comments#update
                         DELETE /posts/:post_id/comments/:id(.:format)      comments#destroy
                   posts GET    /posts(.:format)                            posts#index
                         POST   /posts(.:format)                            posts#create
                new_post GET    /posts/new(.:format)                        posts#new
               edit_post GET    /posts/:id/edit(.:format)                   posts#edit
                    post GET    /posts/:id(.:format)                        posts#show
                         PUT    /posts/:id(.:format)                        posts#update
                         DELETE /posts/:id(.:format)                        posts#destroy
                    root        /                                           posts#index

Im not able to get why it is searching for ‘shows’ action when im passing it new..

  • 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-30T20:58:15+00:00Added an answer on May 30, 2026 at 8:58 pm

    The problem is your link: link_to 'Back', post_path

    Where post_path is singluar, means: Link to one post. This would assume that you provide the post or its id, like link_to 'Back', post_path(@some_other_post).

    I assume you want to backlink to all posts, which would be plural; link_to 'Back', posts_path (posts instead of post).

    You can also see this in your routes.

    post  GET    /posts/:id
    posts GET    /posts
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, getting a pretty bizarre routing error here. No route matches {:controller=>subscriptions, :action=>change} Extracted
I'm getting this error for the URL http://localhost:3000/dashboard/ Routing Error No route matches /dashboard
I am getting ActionController::RoutingError (No route matches [POST] /users/sign_up): when I click on this
Anyone getting this error when using the new free chart controls MS bought from
So I'm getting a 'No route matches' error, and being new to Rails 3
I keep getting this error when trying to view my channels controller. uninitialized constant
I'm getting a weird error when I try to link to the show_members action
I'm getting ActionController::RoutingError in Profiles#show when I click a link to render a layout
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to

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.