Skip to content

Sinatra adapter does not work with latest versions of Sinatra, Rack, and Ruby #80

Open
winton opened this Issue Dec 8, 2009 · 12 comments

10 participants

@winton
winton commented Dec 8, 2009

I have fixed these issues in my fork ( http://github.com/winton/authlogic ):

  • Rack::Request#remote_ip no longer exists, use Rack::Request#ip instead
  • Erroneously including Authlogic::ControllerAdapters::SinatraAdapter::Adapter::Implementation to Sinatra::Request, should use Sinatra::Base
  • Sinatra adapter works with Ruby 1.9.1
@chrisdinn

This is an important fix. Rails apps using Sinatra as metal can't use Authlogic without fixing these issues first. In fact, the Rails app won't even start specifically because of this incompatibility.

@johnbender

Just wanted to second this. The only change necessary for this to work for me was extending Sinatra::Base instead of Sinatra::Request, though I chose not to use the remote_ip field, and I am not using 1.9.

@thoughtless

I am having the same issue as chrisdinn. My rails app using Sinatra as metal can start when using the Authlogic gem.

@brianjlandau

+1 I'm having the same issue with using Sinatra as metal in a rails app.

@brianjlandau

Also, I can also verify that the fix at winton/authlogic@5b3097e works.

@bernd
bernd commented Oct 19, 2010

winton's fix works for me as well. It would be nice if a new version with this fix could be released. Thanks!

@mtodd
mtodd commented Oct 26, 2010

Is there any plans to pull this in and release it any time soon? This has been open for 10 months it seems.

@eric
eric commented May 28, 2011

It would be really great if this was fixed in 2.1 as well as HEAD.

@feixionglee

cool, this is big help, thanks

@brianjlandau

What's the status of this? This is a very simple fix and releases have been made since this has been opened. Is there a reason this isn't fixed yet?

@brianjlandau

Just checking in again. What's the status of this? Is this project not maintained anymore? Should the gem and repo be passed off to someone who will maintain it?

@mackuba
mackuba commented Feb 21, 2012

Guys, could you fix that? I've just run into this, looks like this bug has been lying here for 2 years now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.