I've spent a few hours on this so here I am. Starting with Ryans Railscast, I decided to add twitter login to my rails / devise app. I followed it for a bit, had issues and troubleshooted various issues until I got here: When clicking "Sign in with twitter", I am redirected there and upon return, I get the following issue:
ActiveRecord::StatementInvalid in Users::OmniauthCallbacksController#twitter
SQLite3::SQLException: no such column: users.provider: SELECT "users".* FROM "users" WHERE "users"."provider" = 'twitter' AND "users"."uid" = '20323034' ORDER BY "users"."id" ASC LIMIT 1
This issue is very close to this other stackoverflow problem, except they are using the facebook login rather than twitter. See top comment on top answer:
Devise, Omniauth and Facebook integration session error
Please advise, and thank you!
routes: devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks", :registrations => "registrations" } do
get "info/contact" get "info/about" get "info/landing" get "info/test" get '/users/sign_out' => 'devise/sessions#destroy'
root "info#landing" end
resources :events do resources :registrations end end
gemfile:
gem 'zurb-foundation'
gem 'devise'
gem 'omniauth-twitter'
gem 'omniauth'
gem 'oauth2'