2
我有一大堆的所需履行的Marshal.load
的要求,但班如何卸載
files = ["payment_type","payment_type_ticket_mapping","price_modifier_ticket_delta_mapping","user","revenue_type","revenue_type_group","tax","tax_type","punch"]
files.each {|file| require file }
的「要求」的聲明中軌加載的文件,當我運行rsepc他們給我下面的錯誤
/spec/factories.rb:6: undefined method `admin_login_url' for #<ActionView::Base:0xb62e0228> (ActionView::TemplateError)
當我刪除reuire聲明它工作正常,但這種說法是必要的Marshal.load
功能如何卸載已加載的類需要聲明的工作完成之後。
有趣的..你在工廠使用網址助手嗎? – luacassus
我已經解決了使用config.cache_classes =環境不錯,問題。 –
@Anup寫下你的評論和答案,以便讓問題顯示爲已回答。 – Regedor