我使用rails 2.3.4和ruby 1.8.7。 在我的應用程序,當我嘗試通過移動API來購買商品(這是一個金屬的請求),購買成功後,現在當我去到Web界面,並在實體類的項目的限購或價格的任何變化,然後嘗試再通過移動API來購買,它拋出一個錯誤ApplicationHelper的副本已從模塊樹中刪除,但仍處於活動狀態?
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'.
我在網上看了看四周,因爲沒有人都面臨着同樣的問題,但無法找到該same.Now修復服務器重新啓動時和我試圖購買,它是successful.I想不通的原因,但還是喜歡把我的想法,可以將其固定,如果每一個動作後,我們連接到數據庫的錯誤是從哪兒數據庫查詢之線做成拋:
def purchases_left
accepted = AcceptedOffer.find_all_by_offer_id_and_user_id(offer.id, current_user.id)
end
我已經印刷要約的價值和即將correct.I想不出還有什麼一段代碼,把up.Any查詢歡迎。作爲高速緩存設置爲false發生在開發模式