I'm trying to use oauth-plugin on a Rails application I'm developing, but I keep running into problems.
To make sure I'm not making any mistake, I started an application from scratch (using Rails 3.0.3). Here are the steps I followed:
- Create da new rails application (
rails.test) Edited its
Gemfileto include:gem "oauth-plugin", ">=0.4.0.pre1" gem "oauth", "0.4.4"Generated
oauth-consumer, by runningscript/rails g oauth_consumerEdited
oauth_consumers.rbto include my keys for Google integration::google=>{ :key=>"anonymous", :secret=>"anonymous", :scope=>"https://www.google.com/calendar/feeds/", :options => { :site => "http://www.google.com", :request_token_path => "/accounts/OAuthGetRequestToken", :access_token_path => "/accounts/OAuthGetAccessToken", :authorize_path=> "/accounts/OAuthAuthorizeToken" }, }Edited
routes.rbto add the route foroauth_consumer:resources :oauth_consumersEdited
application_controller.rbto implement thelogged_in?method as follows:def logged_in? true endNow when I access
http://localhost:3000/oauth_consumers/googleI get the following error:uninitialized constant GoogleToken
Does anyone know what causes this error and how can I fix it? GoogleToken is a class that should have been auto generated by oauth-plugin, so I can't tell why I'm getting this uninitialized constant error.