Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #3039

Closed
Open
Created 12 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

ActionController::RoutingError (No route matches {:controller=>"users", :action=>"show", :username=>nil}):

Closed

ActionController::RoutingError (No route matches {:controller=>"users", :action=>"show", :username=>nil}):

Created by: buh-rabbit

I get the following error: ActionController::RoutingError (No route matches {:controller=>"users", :action=>"show", :username=>nil}): app/helpers/events_helper.rb:6:in link_to_author' app/views/events/event/_note.html.haml:2:in_app_views_events_event__note_html_haml__631284749464040337_17253768540' app/views/events/_event.html.haml:12:in _app_views_events__event_html_haml__324368459914979753_17253506540' app/views/dashboard/show.js.haml:2:in_app_views_dashboard_show_js_haml___1740372430569068073_17253280520' app/controllers/dashboard_controller.rb:20:in `show'

I try to run bundle exec rake gitlab:enable_namespaces RAILS_ENV=production but i get another error:

Generate usernames for users without one

Done

Create directories for groups

Done

Move projects in groups into respective directories ... development / myproject ... already at /home/git/repositories/development/myproject.git

Done Rebuild Gitolite ... rake aborted! uninitialized constant Gitlab::Gitolite /usr/home/git/gitlab/lib/tasks/gitlab/enable_namespaces.rake:11:in `block (2 levels) in <top (required)>' Tasks: TOP => gitlab:enable_namespaces (See full trace by running task with --trace)

I'm using: ruby 1.9.3p385 git commit ab191963

Linked issues
0


  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jalada

    👍

    By Administrator on 2013-02-26T09:28:24 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jalada

    It looks like a 'username' field has been added for users but the migrations aren't setting them to anything, so they are all nil, which causes the routes to fail.

    I went into a Rails console and manually set a username for everyone.

    Another fix would probably be to change app/helpers/events_helper.rb to check for existence of a username... Oops?

    By Administrator on 2013-02-26T09:34:07 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: buh-rabbit

    Thank you jalada. There is only one user with this problem. I find the NULL username with the following sql query: select * from users where username IS NULL \G; and update the record.

    By Administrator on 2013-02-26T13:55:21 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jalada

    I'm not sure this issue should be closed, FWIW.

    By Administrator on 2013-02-26T13:58:06 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: afraazali

    This still occurs on the latest master even after the username sql fix.

    By Administrator on 2013-03-01T20:03:26 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: afraazali

    I found a fix to my solution. I'm not a ruby developer, so I'm not sure why this worked. When looking at the database after the migration from 4.2 to master, I saw that the username for the admin user (id=1) was set to admin@local.host, in a clean install from master it is set to "root". Setting the username value to "root" fixed the issue.

    By Administrator on 2013-03-02T04:14:42 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: jalada

    @afraazali Yeah, that isn't a fix in general. That only applies to if there is one user, I think.

    The migration simply needs changing to auto-generate usernames for users that already exist, or not raise an exception if a user doesn't have a username.

    @buh-rabbit Can you please reopen this issue so the maintainers can see it still needs fixing?

    By Administrator on 2013-03-02T10:50:16 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: caldwell

    This is happening to me and it's a very confusing error to someone like me who doesn't know rails. My older users don't have usernames (NULL in the db). Updating them manually in the DB fixed the problem.

    By Administrator on 2013-03-26T02:29:55 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
Assign to
Milestone
No milestone
None
None
Time tracking
Due date
None
None
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Confidentiality
Not confidential

You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

Lock issue
Unlocked
participants
Reference:

Menu

Projects Groups Snippets
Help