Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninitialized constant Devise::Models::TwitterOauth #21

Closed
tmiskiew opened this issue Aug 17, 2011 · 9 comments
Closed

uninitialized constant Devise::Models::TwitterOauth #21

tmiskiew opened this issue Aug 17, 2011 · 9 comments

Comments

@tmiskiew
Copy link

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

NameError

uninitialized constant Devise::Models::TwitterOauth

app/models/user.rb:12

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
end

What am I missing?

Thanks
Thomas

@arieliten
Copy link

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

  • Ariel

@tmiskiew
Copy link
Author

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 as completed Sep 2, 2011
@linuxonrails
Copy link

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

Please, reopen the issue!

@dan
Copy link

dan commented Mar 20, 2012

I have the same problem with devise-2.0.4.

@shyammohankanojia
Copy link

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

@hitgirl
Copy link

hitgirl commented May 26, 2012

same problem with devise-2.0.4. anyone?

@kemen
Copy link

kemen commented Jun 8, 2012

same problem here:

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

please reopen.

@scicco
Copy link

scicco commented Jun 19, 2012

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

https://gist.github.com/2956475

@pozorvlak
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants