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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:02:46+00:00 2026-05-20T22:02:46+00:00

I’m getting a weird error when I try to link to the show_members action

  • 0

I’m getting a weird error when I try to link to the show_members action

Routing Error
No route matches "/groups/1/show_members"

#routes.rb
get 'groups/:id/members' => 'groups#show_members'

#groups_controller.rb
def show_members

When I run rake routes I get this:

#rake routes
            groups GET    /groups(.:format)           {:controller=>"groups", :action=>"index"}
            groups POST   /groups(.:format)           {:controller=>"groups", :action=>"create"}
         new_group GET    /groups/new(.:format)       {:controller=>"groups", :action=>"new"}
        edit_group GET    /groups/:id/edit(.:format)  {:controller=>"groups", :action=>"edit"}
             group GET    /groups/:id(.:format)       {:controller=>"groups", :action=>"show"}
             group PUT    /groups/:id(.:format)       {:controller=>"groups", :action=>"update"}
             group DELETE /groups/:id(.:format)       {:controller=>"groups", :action=>"destroy"}
        group_join GET    /groups/join(.:format)       {:controller=>"groups", :action=>"join"}
 group_remove_user PUT    /groups/remove_user(.:format){:controller=>"groups", :action=>"remove_user"}
                   GET    /groups/:id/members(.:format){:controller=>"groups", :action=>"show_members"}

UPDATE:
But all I want the show_members action to do is show all the users within that group. I want the user functionality and paths to remain the same. And now the show_members action routes to group, the same as show. In my groups controller, I split the default show group action into three pages, one for the group profile which is show, one for the members in that group which goes to show_members, and one for the news page, which will go to show_news when i get to it.

#groups_controller.rb
def show_members
  @group = Group.find(params[:id])
  @members = @group.users
  @group_admin = User.find(@group.group_admin)
  respond_to do |format|
    format.html # show.html.erb
    format.xml  { render :xml => @group }
  end
end

#rake routes
group_join GET    /groups/:group_id/join(.:format) {:controller=>"groups", :action=>"join"}
group_remove_user PUT    /groups/:group_id/remove_user(.:format) {:controller=>"groups", :action=>"remove_user"}
group GET    /groups/:group_id/:id/members(.:format) {:controller=>"groups", :action=>"show_members"}
group_users GET    /groups/:group_id/users(.:format) {:controller=>"users", :action=>"index"}
group_user GET    /groups/:group_id/users/:id(.:format) {:controller=>"users", :action=>"show"}
I WANT THIS new_user_session GET    /users/sign_in(.:format) {:controller=>"devise/sessions", :action=>"new"}
INSTEAD OF THIS new_user_group_session GET    /users/groups/:group_id/sign_in(.:format)          {:controller=>"devise/sessions", :action=>"new"}
user_group_session POST   /users/groups/:group_id/sign_in(.:format)          {:controller=>"devise/sessions", :action=>"create"}
destroy_user_group_session GET    /users/groups/:group_id/sign_out(.:format)         {:controller=>"devise/sessions", :action=>"destroy"}
user_group_password POST   /users/groups/:group_id/password(.:format)         {:controller=>"devise/passwords", :action=>"create"}
new_user_group_password GET    /users/groups/:group_id/password/new(.:format)     {:controller=>"devise/passwords", :action=>"new"}
edit_user_group_password GET    /users/groups/:group_id/password/edit(.:format)    {:controller=>"devise/passwords", :action=>"edit"}
user_group_password PUT    /users/groups/:group_id/password(.:format)         {:controller=>"devise/passwords", :action=>"update"}
user_group_registration POST   /users/groups/:group_id(.:format)                  {:controller=>"users/registrations", :action=>"create"}

new_user_group_registration GET /users/groups/:group_id/sign_up(.:format) {:controller=>”users/registrations”, :action=>”new”}
edit_user_group_registration GET /users/groups/:group_id/edit(.:format) {:controller=>”users/registrations”, :action=>”edit”}
user_group_registration PUT /users/groups/:group_id(.:format) {:controller=>”users/registrations”, :action=>”update”}
user_group_registration DELETE /users/groups/:group_id(.:format) {:controller=>”users/registrations”, :action=>”destroy”}
user_group_confirmation POST /users/groups/:group_id/confirmation(.:format) {:controller=>”devise/confirmations”, :action=>”create”}
new_user_group_confirmation GET /users/groups/:group_id/confirmation/new(.:format) {:controller=>”devise/confirmations”, :action=>”new”}
user_group_confirmation GET /users/groups/:group_id/confirmation(.:format) {:controller=>”devise/confirmations”, :action=>”show”}
groups GET /groups(.:format) {:controller=>”groups”, :action=>”index”}
groups POST /groups(.:format) {:controller=>”groups”, :action=>”create”}
new_group GET /groups/new(.:format) {:controller=>”groups”, :action=>”new”}
edit_group GET /groups/:id/edit(.:format) {:controller=>”groups”, :action=>”edit”}
group GET /groups/:id(.:format) {:controller=>”groups”, :action=>”show”}
group PUT /groups/:id(.:format) {:controller=>”groups”, :action=>”update”}
group DELETE /groups/:id(.:format) {:controller=>”groups”, :action=>”destroy”}

#routes.rb
resources :groups do
  get 'join' => 'groups#join'
  put 'remove_user' => 'groups#remove_user'
  get ':id/members' => 'groups#show_members'
  resources :users, :only => [:index, :show]
  devise_for :users, :controllers => { :registrations => "users/registrations" }
end
  • 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-20T22:02:47+00:00Added an answer on May 20, 2026 at 10:02 pm

    Rails is correct when it says that no route matches /groups/1/show_members – your routes.rb is creating a route for something like /groups/1/members (without the “show_“)

    You’ll need to change routes.rb to look like:

    get 'groups/:id/show_members` => 'groups#show_members'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a JSP page retrieving data and when single or double quotes are
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.