#138 ✓invalid
jammy

Does not work with Rails 3

Reported by jammy | September 16th, 2010 @ 06:33 PM

There is a detection to see if the rails app is rack based, which is too naive.

In lib/rack/adapter/rails.rb:

  def rack_based?
    rails_version = ::Rails::VERSION
    rails_version::MAJOR >= 2 && rails_version::MINOR >= 2 && rails_version::TINY >= 3
  end

In rails 2.3.8 (for example), we get true && true && true.

In rails 3.0.0, we get true && false && false, which means it thinks the rails isn't rack based.

Could we check for a config.ru in rails root instead?

Or maybe, if we detect rails 3, skip all the rails stuff, and just treat it like a rack app.

Comments and changes to this ticket

  • jammy

    jammy September 16th, 2010 @ 06:40 PM

    Apologies, scratch that. The issue was that I had already fiddled with the thin code on my server to support something else. Thin normally DOES check for config.ru, and treat it like a rack app, when it hasn't been fiddled with by the user :)

    Please close.

  • macournoyer

    macournoyer September 17th, 2010 @ 08:50 AM

    • State changed from “new” to “invalid”

    :D

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages