Rails - error uninitialized constant MyNamespace::OmniauthCallbacksController

I got an error like this:

uninitialized constant Mobile::OmniauthCallbacksController

It seems like a routes.rb issue. What exactly do I need to add to my namespace to make it work?

Here is the route scope:

  scope :module => :mobile, :as => :mobile do
    constraints(:subdomain => /m/) do
      devise_for :users, :path => "", :path_names =>
               { :sign_in => "login", :sign_out => "logout",
                 :sign_up => "signup" },
                 :controllers => {:sessions => "mobile/sessions" , :passwords => "mobile/passwords" , :confirmations => "mobile/confirmations" , :registrations => "mobile/registrations"}

      get "/home" => "home#index" , :as => "home"


Elsewhere in the routes.rb file there is a snippet like this:

  devise_scope :user do
    get "auth/:provider" => "users/omniauth_callbacks#passthru"

but I am not sure how to make it work within the namespace I am working in. Any ideas?



I believe the issue may be in your use of these values for your controllers:

 {:sessions => "mobile/sessions" , 
  :passwords => "mobile/passwords" , 
  :confirmations => "mobile/confirmations" , 
  :registrations => "mobile/registrations"

It looks like the code is getting into these controllers and trying to load OmniauthCallbacksController from inside the scope of Mobile.

Need Your Help

Trying to add a img upload to my form post in meteor

javascript upload meteor

I am trying to upload images to my public folder in meteor