2011-07-12 109 views
1

我試圖讓resque的Web服務器安裝爲機架式應用按照railscast reque教程添加此路線時resque的Web authlogic錯誤文件:當我開始試圖啓動軌道服務器

mount Resque::Server, :at => "/resque" 

上軌服務器我得到這個錯誤信息:

/Users/rick/.rvm/gems/ruby-1.9.2-p180/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic/controller_adapters/sinatra_adapter.rb:50:in `included': undefined method `before' for Sinatra::Request:Class (NoMethodError) 

看起來像是與authlogic有關嗎?

有誰知道這是什麼,以及如何解決它?

+0

您是否嘗試從您的Gemfile中刪除authlogic以查看是否有幫助?你能發佈你的Gemfile嗎? – Maran

回答

2

我遇到了與authlogic和sinatra相同的問題。如果Sinatra聲明,authlogic混合Implementaion模塊(請參閱lib/authlogic/controller_adapters/sinatra_adapter.rb)。 包含實現時,它嘗試調用私有方法:在Sinatra :: Request類之前。 :之前方法以某種方式添加使用Sinatra :: Delegator。

長話短說 - 我刪除舊的authlogic gem(2.1.6) 後問題消失所以答案是使用最新的authlogic版本。