uninitialized constant Devise::Models::TwitterOauth #21

tmiskiew opened this Issue Aug 17, 2011 · 9 comments


None yet
9 participants

Hello there,

I've installed:

devise (1.4.2)
devise-twitter (0.1.1)

and have followed the instructions on the devise-twitter page.

I'm calling: http://localhost:3000/user/sign_in/twitter

and get


uninitialized constant Devise::Models::TwitterOauth


class User < ActiveRecord::Base

To use devise-twitter don't forget to include the :twitter_oauth module:

e.g. devise :database_authenticatable, ... , :twitter_oauth

IMPORTANT: If you want to support sign in via twitter you MUST remove the

:validatable module, otherwise the user will never be saved

since it's email and password is blank.

:validatable checks only email and password so it's safe to remove

Include default devise modules. Others available are:

:token_authenticatable, :confirmable, :lockable and :timeoutable

devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :twitter_oauth

Setup accessible (or protected) attributes for your model

attr_accessible :email, :password, :password_confirmation, :remember_me

What am I missing?


Hey, I'm getting the same here. Did you get some feedback on how to resolve the issue?

  • Ariel

tmiskiew commented Sep 2, 2011

I got no feedback unfortunately, but when I started using it with devise 1.1.3 and it started working. Give it a try. Also check this here for other options. http://ruby-toolbox.com/categories/api_clients.html Look for projects / gems that are well maintained.

@tmiskiew tmiskiew closed this Sep 2, 2011

I have the same problem with devise-1.4.9 :-(

Please, reopen the issue!

dan commented Mar 20, 2012

I have the same problem with devise-2.0.4.

Hi dan ..
Im facing same problem ..did u got solution?

hitgirl commented May 26, 2012

same problem with devise-2.0.4. anyone?

kemen commented Jun 8, 2012

same problem here:

Using devise (2.1.0)
Using devise-twitter (0.1.1)

please reopen.

scicco commented Jun 19, 2012

i temporarily fixed this issue putting this on my rails app with name config/initializer/twitter.rb


AFAICT, this is an error in the documentation: replace :twitter_oauth with just :twitter to fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment