[Ovirt-devel] [PATCH server 8/8] Wrapper for mongrel to run with rails 2.3.2
Jason Guiditta
jason.guiditta at gmail.com
Mon Jul 20 14:58:37 UTC 2009
This file is needed because we use --prefix when running
mongrel_rails (which I think we need for now). It wraps
the AbstractRequest call that is no longer in rails (but
triggered by --prefix) so mongrel does not constantly die.
It is possible there is a way now in rails itself to specify
something in place of this flag, but I have not been able
to find where to put that setting yet.
Signed-off-by: Jason Guiditta <jason.guiditta at gmail.com>
---
src/config/initializers/abstract_request.rb | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
create mode 100644 src/config/initializers/abstract_request.rb
diff --git a/src/config/initializers/abstract_request.rb b/src/config/initializers/abstract_request.rb
new file mode 100644
index 0000000..938106d
--- /dev/null
+++ b/src/config/initializers/abstract_request.rb
@@ -0,0 +1,14 @@
+#This is a (hopefully) temporary workaround to help
+#mongrel, since it hooks into the now-gone AbstracRequest
+#class.
+
+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
--
1.6.2.5
More information about the ovirt-devel
mailing list