title: Rails App on Ubuntu running Apache and Passenger throws 404 with params
body: <p>I am trying to set up a server to host my rails apps. I have one I am testing and it is giving me a 404 error when I call a controller action while passing params in the URL. I have this app deployed on Heroku and it runs perfectly. Any action that is called without params work perfectly on the new server. It is only the action that passes the params that is giving me the 404.  </p>
  
  <p>Also I ran it locally with Webrick on the server and it works fine. It only has this issue when running on passenger.</p>
  
  <p>Any ideas what might cause this or where I should start to find the issue?</p>
  
  <p>This is the request being sent
  Request GET /groups/2/set_and_redirect/%2Fgroups%2F2%2Fgroups_lists HTTP/1.1</p>
  
  <p>This is the body of the 404 response
  The requested URL /groups/2/set_and_redirect//groups/2/groups_lists was not found on this server.</p>
  
  <p>Edit</p>
  
  <p>This is the partial that is causing the issue. Specificaly the link_to group.name. The edit and delete both work fine and the set and redirect works fine on Heroku and Webrick.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;% @groups.each do |group| %&gt;
      &lt;h4&gt;&lt;div&gt;
        &lt;%= link_to group.name, groups_set_and_redirect_path(:id =&gt; group.id, :path =&gt; group_list_path(id: group.id) ), remote: true %&gt;&amp;nbsp;&amp;nbsp;
        &lt;%= link_to ('&lt;i class="glyphicon glyphicon-edit"&gt;&lt;/i&gt;').html_safe, edit_group_path(group),'data-toggle' =&gt; 'modal', 'data-target' =&gt; "#group-modal#{group.id}", remote: true %&gt;&amp;nbsp;&amp;nbsp;
  
        &lt;%= link_to ('&lt;i class="glyphicon glyphicon-trash text-danger"&gt;&lt;/i&gt;').html_safe, group, method: :delete, data: { confirm: 'Are you sure?' }, remote: true %&gt;
      &lt;/div&gt;&lt;/h4&gt;
  &lt;%end%&gt;
  &lt;div&gt; &lt;%= link_to ('&lt;i class="glyphicon glyphicon-plus text-success"&gt;&lt;/i&gt;').html_safe, "#group-modal", 'data-toggle' =&gt; 'modal', class: 'btn btn-lg' %&gt; &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <blockquote>
    <p>I changed my route from</p>
    
    <p>get 'groups/:id/set_and_redirect/:path' => 'groups#set_and_redirect',
    :as => :groups_set_and_redirect</p>
    
    <p>to</p>
    
    <p>get 'groups/:id/set_and_redirect' => 'groups#set_and_redirect', :as =>
    :groups_set_and_redirect</p>
    
    <p>and now it works</p>
  </blockquote>