Defect #10827

Cannot access Repositories page and Settings in a Project - Error 500

Added by Marco Bettiol about 10 years ago. Updated about 10 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:


Target version:1.4.2
Resolution:Fixed Affected version:1.4.0


I had 2 repositories in a project
  • 1 svn
  • 1 local

I added a new git as default and this happened.
Since then I'm unable to access Repositories and Settings page of the project

Processing ProjectsController#settings (for at 2012-05-03 21:35:28) [GET]
  Parameters: {"controller"=>"projects", "action"=>"settings", "id"=>"my_project"}
Rendering template within layouts/base
Rendering projects/settings

ActionView::TemplateError (undefined method `<=>' for nil:NilClass) on line #13 of app/views/projects/settings/_repositories.html.erb:
10:     </tr>
11:   </thead>
12:   <tbody>
13:   <% @project.repositories.sort.each do |repository| %>
14:     <tr class="<%= cycle 'odd', 'even' %>">
15:       <td><%=h repository.scm_name %></td>
16:       <td><%=h repository.identifier %></td>

    app/models/repository.rb:144:in `<=>'
    app/views/common/_tabs.html.erb:23:in `each'
    app/helpers/application_helper.rb:231:in `render_tabs'
    config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/Ruby/Apps/redmine/public/500.html (500 Internal Server Error)

Associated revisions

Revision 9619
Added by Jean-Philippe Lang about 10 years ago

Fixed undefined method `<=>' for nil:NilClass when sorting repositories with nil identifiers (#10827).


#1 Updated by Jean-Philippe Lang about 10 years ago

  • Status changed from New to Closed
  • Target version set to 1.4.2
  • Resolution set to Fixed

Fixed in r9619 and merged in r9620 into 1.4-stable. You can patch your app/models/repository.rb
Thanks for pointing this out.

Also available in: Atom PDF