#16 new
Lar Van Der Jagt

uninitialized constant OAuth::VERSION

Reported by Lar Van Der Jagt | May 6th, 2009 @ 01:51 AM

I used your twitterapp rails template to bootstrap a rails application using TwitterAuth.

When I try to sign in via twitter, I get the following exception:

Processing SessionsController#new (for at 2009-05-06 01:27:24) [GET]

NameError (uninitialized constant OAuth::VERSION): oauth (0.3.3) lib/oauth/client/helper.rb:54:in amend_user_agent_header' oauth (0.3.3) lib/oauth/client/net_http.rb:28:inoauth!' oauth (0.3.3) lib/oauth/consumer.rb:175:in sign!' oauth (0.3.3) lib/oauth/consumer.rb:151:increate_signed_request' oauth (0.3.3) lib/oauth/consumer.rb:123:in request' oauth (0.3.3) lib/oauth/consumer.rb:157:intoken_request' oauth (0.3.3) lib/oauth/consumer.rb:105:in get_request_token' /opt/local/lib/ruby/gems/1.8/gems/twitter-auth-0.1.21/app/controllers/sessions_controller.rb:4:innew' haml (2.1.0) rails/./lib/sass/plugin/rails.rb:19:in process'

I did some exploring and found out that there is a fork of the oauth gem on github which fixes this. It is just a one line 'require' fix. You can view the commit here:


When I tried to install that gem, I still got the 0.3.3 version instead of 0.3.4 so I'm guessing the gem hasn't rebuilt yet as the change is pretty new.

I made the change locally and everything seems fine now. I'm curious what a more permanent solution to this sort of problem would be however, and thought others might find this useful.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A full-stack authentication system for Rails that uses Twitter.

People watching this ticket