Gemfile gem 'devise' gem 'omniauth' gem 'twitter' config/initialisers/devise.rb Devise.setup do |config| config.omniauth :twitter, 'CONSUMER KEY', 'CONSUMER SECRET' end config/initializers/twitter.rb Twitter.configure do |config| config.consumer_token = Devise.omniauth_configs[:twitter].args.first config.consumer_secret = Devise.omniauth_configs[:twitter].args.last end app/models/user.rb class Use