title: RequestToken Oauth-plugin 401 Unauthorized
body: <p>I successfully implemented OAuth using the oauth-plugin gem with Rails 3.0.9. However, once I upgraded to Rails 3.1.3, I'm receiving an error when attempting to get the request token.</p>
  
  <p>I've been testing locally </p>
  
  <p>Rails 3.1.3
  oauth (0.4.5)
  oauth-plugin (0.4.0.rc2)</p>
  
  <p>I've setup the Rails app as a provider</p>
  
  <blockquote>
    <p>Consumer Key: BkdI1PnzRuvKDw2Qs1wVxtDrtvmqhUgeXLwNpNtm Consumer</p>
    
    <p>Secret: eCY7JFk4vK6IeWXVq7yS3OMVT1XKpVOWOImsy3iw </p>
    
    <p>Request Token URL: <a href="http://localhost:3000/oauth/request_token" rel="nofollow">http://localhost:3000/oauth/request_token</a> </p>
  </blockquote>
  
  <p>In the console:</p>
  
  <pre><code>ruby-1.9.2-p290 :003 &gt; @consumer = OAuth::Consumer.new 
                                     "BkdI1PnzRuvKDw2Qs1wVxtDrtvmqhUgeXLwNpNtm",
                                     "eCY7JFk4vK6IeWXVq7yS3OMVT1XKpVOWOImsy3iw", 
                                     {:site =&gt; "http://localhost:3000"}
  =&gt; #&lt;OAuth::Consumer:0x007fe93d5bcdf8 @key="BkdI1PnzRuvKDw2Qs1wVxtDrtvmqhUgeXLwNpNtm",
     @secret="eCY7JFk4vK6IeWXVq7yS3OMVT1XKpVOWOImsy3iw", 
     @options={:signature_method=&gt;"HMAC-SHA1", 
               :request_token_path=&gt;"/oauth/request_token",
               :authorize_path=&gt;"/oauth/authorize",
               :access_token_path=&gt;"/oauth/access_token", 
               :proxy=&gt;nil, 
               :scheme=&gt;:header, 
               :http_method=&gt;:post, 
               :oauth_version=&gt;"1.0", 
               :site=&gt;"http://localhost:3000"}&gt;
  
  ruby-1.9.2-p290 :004 &gt; @consumer.get_request_token
  OAuth::Unauthorized: 401 Unauthorized 
  from /Users/donpottinger/.rvm/gems/ruby-1.9.2-p290@rails3_1/gems/oauth-0.4.5/lib/oauth/consumer.rb:219:in `token_request'
  from /Users/donpottinger/.rvm/gems/ruby-1.9.2-p290@rails3_1/gems/oauth-0.4.5/lib/oauth/consumer.rb:139:in `get_request_token'
  from (irb):4
  from /Users/donpottinger/.rvm/gems/ruby-1.9.2-p290@rails3_1/gems/railties-3.1.3/lib/rails/commands/console.rb:45:in `start'
  from /Users/donpottinger/.rvm/gems/ruby-1.9.2-p290@rails3_1/gems/railties-3.1.3/lib/rails/commands/console.rb:8:in `start'
  from /Users/donpottinger/.rvm/gems/ruby-1.9.2-p290@rails3_1/gems/railties-3.1.3/lib/rails/commands.rb:40:in `&lt;top (required)&gt;'
  from script/rails:6:in `require'
  from script/rails:6:in `&lt;main&gt;'
  </code></pre>