title: A copy of ApplicationHelper has been removed from the module tree but is still active?
body: <p>I'm using rails 2.3.4 and ruby 1.8.7.
  In my application when i try to purchase an item via mobile Api(it's a metal request), purchase is successful , now when i go to web interface and make any changes in the entities like purchase limit or price of the item and then try to purchase through mobile api again, it throws an error</p>
  
  <pre><code>A copy of ApplicationHelper has been removed from the module tree but is still active!
  
  [RAILS_ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:414:in `load_missing_constant'
  
  [RAILS_ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing_not_from_s3_library'
  
  /home/user/.rvm/gems/ruby-1.8.7-p334/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing'
  
  [RAILS_ROOT]/app/helpers/web_application_helper.rb:414:in `purchases_left'
  
  [RAILS_ROOT]/app/helpers/web_application_helper.rb:83:in `accept_purchase_direct'
  
  [RAILS_ROOT]/lib/api/publisher/v1_purchases_helper.rb:49:in `purchases_handler'
  
  [RAILS_ROOT]/app/metal/v1_purchases_controller.rb:54:in `call'
  
  [RAILS_ROOT]/vendor/rails/railties/lib/rails/rack/metal.rb:44:in `call'
  
  [RAILS_ROOT]/vendor/rails/railties/lib/rails/rack/metal.rb:43:in `each'
  
  [RAILS_ROOT]/vendor/rails/railties/lib/rails/rack/metal.rb:43:in `call'
  
  [RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb:122:in `call'.
  </code></pre>
  
  <p>I looked around in the web as no of people have faced the same issue but unable to find the fix for the same.Now when the server is restarted and i tried to purchase , it is successful.I can't figure out the reason but still like to put my ideas, can it be fixed if after every action we connect to the database as error is thrown from the line where database query is made :</p>
  
  <pre><code>def purchases_left 
    accepted = AcceptedOffer.find_all_by_offer_id_and_user_id(offer.id, current_user.id)
  end
  </code></pre>
  
  <p>i have printed the value of offer and is coming correct.I cannot think of what more piece of code to put up.Any queries are welcomed.</p>