Padrino/Sinatra and AuthLogic

AuthLogic 3.1.0 doesn’t play nice with Sinatra 1.3.2. The error message is;

`included': undefined method `before' for Sinatra::Request:Class (NoMethodError)

The solution is to patch the last line of authlogic-3.1.0/lib/authlogic/controller_adapters/sinatra_adapter.rb from:

Sinatra::Request.send(:include, Authlogic::ControllerAdapters::SinatraAdapter::Adapter::Implementation)

to:

Sinatra::Base.send(:include, Authlogic::ControllerAdapters::SinatraAdapter::Adapter::Implementation)

Thank you to the post here (Google translation here)

Leave a Reply

You must be logged in to post a comment.