Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8176421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:10:21+00:00 2026-06-06T23:10:21+00:00

So I have this app that uses omniauth-facebook to autenticate users, a new user

  • 0

So I have this app that uses omniauth-facebook to autenticate users, a new user creates in the sessionscontroller:

class SessionsController < ApplicationController
  def create
    user = User.from_omniauth(env['omniauth.auth'])
    session[:user_id] = user.id
    redirect_to root_url, notice: "Signed in!"
  end
end

then it hits the user model:

class User < ActiveRecord::Base
  def self.from_omniauth(auth) 
    where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user|
      user.provider = auth["provider"]
      user.uid = auth["uid"]
      user.name = auth["info"]["name"] unless auth["info"].blank?
      user.email = auth["info"]["email"] unless auth["info"].blank?
      user.save!
    end
  end
end

Then in my usercontroller I have something like this to display a user profil:

class UserController < ApplicationController
  def show
    @user = User.find(params[:id])
  end
end

And in the show.html.erb I have something like this:

<%= @user.name %>, <%= @user.email %>

But I get the following error: Routing Error - uninitialized constant UsersController

My routes file:

Bummerang::Application.routes.draw do


    resources :users, :only => :show

    root to: 'static_pages#home'

    match '/about',   to: 'static_pages#about'
    match '/contact', to: 'static_pages#contact'

    # autentications routes
    match '/auth/:provider/callback', to: 'sessions#create'
    match 'signout', to: 'sessions#destroy', as: 'signout'
    match 'auth/failure', to: redirect('/')
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:10:22+00:00Added an answer on June 6, 2026 at 11:10 pm

    It’s a little difficult to tell what the problem here is: in the future, consider posting the entire error message and the code that the error message references as being bad.

    Nevertheless, my guess is: your UsersController is named UserController. It should be pluralized. Change the name to UsersController and this should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Sinatra app, that uses omniauth which constantantly gets this error attack
I have a little web app that uses the Facebook like widget. This page
Posting this one for a friend. They have an Icefaces app that uses Icefaces's
This is the situation. I have a windows form app that uses an access
I have an air app that uses a native process. This process is a
I have WP7 app that uses the MVVM pattern. When the user goes from
I have this App that uses the Webbrowser control to do automated browsing. I
I have an app that uses this library (actually a direct port to D
I copied this class from a similar class I have in this app that
So, this is a strange one. I have an app that uses permission INTERNET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.