{"action":"opened","issue":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4353","repository_url":"https://api.github.com/repos/activeadmin/activeadmin","labels_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4353/labels{/name}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4353/comments","events_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4353/events","html_url":"https://github.com/activeadmin/activeadmin/issues/4353","id":141467124,"number":4353,"title":"[Routing Error] uninitialized constant Admin::Admin","user":{"login":"mac-adam-chaieb","id":4356939,"avatar_url":"https://avatars.githubusercontent.com/u/4356939?v=3","gravatar_id":"","url":"https://api.github.com/users/mac-adam-chaieb","html_url":"https://github.com/mac-adam-chaieb","followers_url":"https://api.github.com/users/mac-adam-chaieb/followers","following_url":"https://api.github.com/users/mac-adam-chaieb/following{/other_user}","gists_url":"https://api.github.com/users/mac-adam-chaieb/gists{/gist_id}","starred_url":"https://api.github.com/users/mac-adam-chaieb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mac-adam-chaieb/subscriptions","organizations_url":"https://api.github.com/users/mac-adam-chaieb/orgs","repos_url":"https://api.github.com/users/mac-adam-chaieb/repos","events_url":"https://api.github.com/users/mac-adam-chaieb/events{/privacy}","received_events_url":"https://api.github.com/users/mac-adam-chaieb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-17T03:11:37Z","updated_at":"2016-03-17T03:11:37Z","closed_at":null,"body":"__Context__\r\nMy `active_admin.rb` looks like this:\r\n\r\n```ruby\r\nconfig.default_namespace = :admin\r\n\r\nconfig.namespace :volunteer_portal do |portal|\r\n  portal.authentication_method = :authenticate_volunteer!\r\n  portal.current_user_method = :current_volunteer\r\n  portal.logout_link_path = :destroy_volunteer_session_path\r\n  portal.root_to = 'volunteer_portal/volunteers#index'\r\nend\r\n\r\nconfig.namespace :admin do |admin|\r\n  admin.authentication_method = :authenticate_administrator!\r\n  admin.current_user_method = :current_administrator\r\n  admin.logout_link_path = :destroy_administrator_session_path\r\n  admin.root_to = 'admin/new_students#index'\r\nend\r\n```\r\n\r\nMy `routes.rb` looks like this:\r\n\r\n```ruby\r\nRails.application.routes.draw do\r\n  root to: 'pages#index'\r\n\r\n  devise_for :administrators, ActiveAdmin::Devise.config\r\n  devise_for :volunteers, ActiveAdmin::Devise.config.merge({ path: 'volunteer_portal/' })\r\n  ActiveAdmin.routes(self)\r\n\r\n  # Irrelevant to our discussion\r\n  resources :volunteers, only: [:new, :create]\r\n  resources :new_students, only: [:new, :create]\r\n\r\n  get 'welcome', to: 'pages#index'\r\nend\r\n```\r\n\r\nAll my resources are defined in `app/admin`.\r\n\r\nWhat I want to accomplish is one `admin` namespace where login is required that has access to a bunch of other resources (this is pretty much God mode.) None of my resources in `app/admin` define a namespace explicitly because the default namespace is `admin`.\r\n\r\nThe second namespace, which is `volunteer_portal` only has access to a `volunteer#edit` page and therefore I have registered the resource with two namespaces:\r\n\r\n```ruby\r\nActiveAdmin.register Volunteer do\r\n  # Stuff here...\r\nend\r\n\r\nActiveAdmin.register Volunteer, namespace: :volunteer_portal do\r\n  # More stuff here...\r\nend\r\n```\r\n\r\nFinally, I set up Devise with the `Volunteer` model by running\r\n\r\n```rails g active_admin:install User```\r\n\r\nAnd skipping all the `conflicts` and re-writing `active_admin.rb` myself as shown above.\r\n\r\n__The Problem__\r\n\r\nWhen I access my login page for the volunteer portal at `/volunteer_portal/login`, I get redirected to `/admin` with the following error screen:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/4356939/13835208/0f112f7a-ebcc-11e5-8438-bcba30e655c4.png)\r\n\r\n\r\nI've tried disabling namespaces completely, I tried setting up the config of `admin` outside of  a `config.namespace` block and the one of `volunteer_portal` inside one. Nothing seems to work. I'm very confused.\r\n\r\nplease help @seanlinsley @gregbell @timoschilling @pcreux @mattvague \r\n"}}