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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:47:15+00:00 2026-06-04T14:47:15+00:00

Environment: Rails 3.2.3 Mac OS X Lion Ruby-1.9.3-p194 (MRI) I have a rails app

  • 0

Environment:

  • Rails 3.2.3
  • Mac OS X Lion
  • Ruby-1.9.3-p194 (MRI)

I have a rails app and I am using app/views/layouts/application.html.erb as a sort of ‘left-nav-pane’ for some links I use as menu options.

There are two links using link_to in the menu (reduced for brevity here). If I REMOVE one link and run the app, the remaining link does what it’s supposed to do. If I REMOVE the second link and RESTORE the first link, the first link does what IT is supposed to do.

If, however, I have both links in the menu at the same time, clicking one of them will work, but clicking the second creates a runtime error.

Using Pry and the Rails source itself (3.2.3), I have pin-pointed where the error is occurring in the framework. The exception happens in actionpack-3.2.3/lib/action_view/template.rb and is happening in the render method on the following line of code:

def render(view, locals, buffer=nil, &block)
  ActiveSupport::Notifications.instrument("!render_template.action_view", :virtual_path => @virtual_path) do
    compile!(view)
    view.send(method_name, locals, buffer, &block)   # <----ERROR OCCURS HERE
  end
rescue Exception => e
  handle_render_error(view, e)
end

The value of method_name = _app_views_layouts_application_html_erb___1387085669206687706_70334317584180

There is a method by this name on the view. When the ‘send’ is executed, the following exception is generated.

ActionController::RoutingError: No route matches {:action=>"signup_for_role",       
:controller=>"assignments", :club_id=>nil, :member_id=>[#<Member id: 2, first_name: 
"Joseph", last_name: "Smith", start_date: "2012-01-01", end_date: "9999-12-31", 
created_at: "2012-04-07 13:58:46", updated_at: "2012-05-06 21:54:12", club_id: 2, email:    
"joe.smith@gmail.com", assignable: true, address_one: nil, address_two: nil, city: nil, 
state: nil, zip_code: nil, phone: nil, mobile_phone: nil>]}

Because the code in the method is generated by Rails and not in a source code file, I am unable to step through it with Pry; I can only ‘send’ the message and see the result.

Here’s the code from the layout with the two links in question:

<!DOCTYPE html>
<html>
  <head>
    <title>MyApp</title>
    <%= stylesheet_link_tag    "application" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>
  </head>
  <body>
    <div style='padding-left:10px;  margin-top:10px; ' >
      <div class='container' style='margin-top:50px; margin-left:50px;padding-right:200px; '>

        <!-- This link_to works, whether alone, or when the other link_to is present -->
        <%=  link_to "Sign Up for a Role", signup_for_role_club_member_assignments_path(params[:club_id], current_user_as_member) %>  
        <br/><br/>

        <!-- This link_to fails when both link_to's are present, but works when the other link_to is removed. -->
        <%= link_to "Clubs", clubs_path %><br>


      </div>
      <!-- ***************************************************************** -->
      <!-- Yield below... this is where the currently selected view displays -->
      <!-- ***************************************************************** -->
      <div class='container' style='margin-left:200px'  >
        <%= yield %>
      </div>
    </div>
  </body>
</html>

Lastly, here is my routes.rb file:

Rolemaster::Application.routes.draw do

  resources :sessions
  resources :enrollments
  resources :logs

  resources :clubs do
    resources :members do
      resources :assignments do
        collection do
          get 'signup_for_role'
          get 'display_success'
          get 'past_activity'
        end
      end
      resources :absences 
    end
    resources :roles 
    resources :role_groups  

    resources :meetings do
      get 'forassignment', :on => :collection
      get 'print'
      resources :assignments
    end

    resources :assignments do
      post 'generate', :on => :collection 
    end
    resources :absences do
      get 'list', :on => :collection
    end
  end  


  resources :users do
    put "update_password" => "users#update_password"
    put "update_email" => "users#update_email"
    get "edit_password" => "users#edit_password"
    get "edit_email"    => "users#edit_email"
  end

  match "agendas/print"  
  get "enrollments/new"
  post "enrollments/create"
  get "log_in" => "sessions#new", :as => "log_in"
  get "log_out" => "sessions#destroy", :as => "log_out"
  get "sign_up" => 'users#new', :as => 'sign_up'
  get "test/email"
  get "sessions/revoke_admin"
  get "sessions/revoke_super_user"


  get "admins" => "admins#index"
  root :to => 'sessions#new'
end

Any help is greatly appreciated. I’ve probably spent 20 hours or more on this so far.

  • 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-04T14:47:16+00:00Added an answer on June 4, 2026 at 2:47 pm

    Always read error messages the truth is out there)

    params[:club_id] is nil
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Develop a Rails app on your Mac. Have a virtual Windows box using Parallels
I have installed RubyMine on Mac but my development environment for Ruby and Rails
I have Ruby and Rails installed with RVM in a Mac OS X Lion
I'm trying to set up a rails 2.2.2 application in Mac OS X Lion.
Why does this happen? ruby script/console Loading development environment (Rails 2.0.2) >> exit jay-z-mac-pro:justinz$
I am trying use neo4j with Ruby on rails on Mac OSX. I have
I have a simple Rails 3.1.rc6 app that I'm using to try to test
My environment: Mac OSX 10.6 Snow Leopard Ruby 1.9.2p0 Rails 3.0.0 thinking-sphinx (2.0.0.rc1) Sphinx
i am using Rails 1.9.3 running on Mac OS X Lion. i am trying
I have the Rails Environment setup on my Mac. Local : ~/GitHub/Warehouse/ Server :

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.