This project is archived and is in readonly mode.

#2319 ✓invalid
Peter Leonhardt

Rails 2.3 + Mongrel: Deploy with --prefix causes AbstractRequest Error

Reported by Peter Leonhardt | March 23rd, 2009 @ 10:54 PM | in 2.x

Hey guys,

I think this is more of a mongrel problem, but seeing as how that hasn't had an update in a year, I'm wondering if we can fix this on the rails side.

Using mongrel_rails start --prefix /something

now breaks, because on line 151 of mongrel/rails.rb reads


ActionController::AbstractRequest.relative_url_root = ops[:prefix] if ops[:prefix]

Since AbstractRequest has been removed, this throws a "undefined constant ActionController::AbstractRequest" error. And relative_url_root is now on ActionController::Base

I've worked around it by adding:


module ActionController
  class AbstractRequest < ActionController::Request
    def self.relative_url_root=(path)
      ActionController::Base.relative_url_root=(path)
    end
    def self.relative_url_root
      ActionController::Base.relative_url_root
    end
  end
end

to my /lib directory in my 2.3.2.1 apps

Not sure if you guys want to allow the backward compatibility or not, but wanted to bring the problem to your attention.

Thanks

Comments and changes to this ticket

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages