title: wrong number of arguments (3 for 2) after upgrading from Rails 3.0.14 to Rails 3.1.4
body: <p>Everything was working fine in Rails 3.0.14, but after changing 
  <code>gem 'rails', '3.0.14'</code> to <code>gem 'rails', '3.1.4'</code> and running <code>bundle update rails</code> I now get the following error:</p>
  
  <pre><code>Started GET "/" for 127.0.0.1 at 2012-03-16 11:11:44 -0400
    Processing by PagesController#index as HTML
    Completed 500 Internal Server Error in 54ms
    ArgumentError (wrong number of arguments (3 for 2)):
       app/controllers/application_controller.rb:37:in `customize_by_subdomain'```
  </code></pre>
  
  <p>The most popular answer seemed to be that sqlite3 needed to be updated, but I did <code>bundle update sqlite3</code> and I still have the same problem.</p>
  
  <p>Here is the full trace: <a href="https://gist.github.com/2050530" rel="nofollow noreferrer">https://gist.github.com/2050530</a> </p>
  
  <p>The method that it is complaining about looks like this:</p>
  
  <pre><code>35 def customize_by_subdomain
  36   subdomain = (request.subdomain.present? &amp;&amp; request.subdomain != 'www' &amp;&amp; request.subdomain) || 'launch'
  37   @current_org = Organization.find_by_subdomain(subdomain) || Organization.find_by_subdomain('launch')
  38 end
  </code></pre>
  
  <p>I have looked at the multitude of similar questions and I not found anything that solves my problem. The closest was question to mine was: <a href="https://stackoverflow.com/questions/8630441/wrong-number-of-arguments-3-for-1-after-upgrading-rails-from-3-1-1-to-3-1-3">wrong number of arguments (3 for 1) after upgrading rails from 3.1.1 to 3.1.3</a> but I am using authlogic and the version I am using didn't change after upgrading rails.</p>
  
  <p>The only other interesting thing is my entire test suite passes, except for one request/integration spec which goes through the process of creating a new user. It seems strange that my request specs work fine when I can't even access a page in development.</p>
  
  <p>Any ideas on what I can do to get to the bottom of this?</p>