SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Running mod_ruby
-
Sep 5, 2006, 16:36 #1
- Join Date
- Oct 2005
- Posts
- 31
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Running mod_ruby
Hi, I'm having trouble running my application with mod_ruby on Apache2. I've set them up like this:
httpd.conf:
-----------
<IfModule mod_ruby.c>
RubyRequire apache/ruby-run
RubySafeLevel 0
<Location /instrumenta>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Location>
</IfModule>
public/.htaccess:
-----------
RewriteRule ^(.*)$ dispatch.rb [QSA,L]
And when I run the app I get the awful error msg:
"Application error
Rails application failed to start properly"
And the Apache logs show me this:
------------------------
[Tue Sep 05 18:22:01 2006] [error] mod_ruby: error in ruby
[Tue Sep 05 18:22:01 2006] [error] mod_ruby: /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing': uninitialized constant ADDITIONAL_LOAD_PATHS (NameError)
[Tue Sep 05 18:22:01 2006] [error] mod_ruby: from /var/rails/instrumenta/public/dispatch.rb:12
[Tue Sep 05 18:22:01 2006] [error] mod_ruby: from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load'
[Tue Sep 05 18:22:01 2006] [error] mod_ruby: from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
------------------------
Please help, I'm stuck and need to get this working asap.
Thanks a lot.
-Ofir
-
Sep 5, 2006, 17:27 #2
- Join Date
- Jun 2003
- Location
- Iowa, USA
- Posts
- 3,749
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
As I understand it, mod_ruby is not a recommended deployment strategy for rails. I just recently spent a whole night unsucessfully trying to get FastCGI for FCGID with Apache2 and rails working. I finally settled on running rails through mongrel and using Apache to proxy to mongrel. This setup is working great for development, but I am not sure how well it would scale to production levels.
Jason Sweat ZCE - jsweat_php@yahoo.com
Book: PHP Patterns
Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
Detestable (adjective): software that isn't testable.
-
Sep 5, 2006, 18:23 #3
- Join Date
- Oct 2005
- Posts
- 31
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I want to try using mod_ruby, since FCGI has an annoying bug I can't get fixed. I even posted a thread about it http://www.sitepoint.com/forums/showthread.php?t=417678
I can't use Mongrel or any other proxy solution, since I'm using client auth in Apache, and it would be pointless since the app could be accessed directly thru http://server:5000 or so.
I'm not very concerned about performance since the number of concurrent users will never be over 20.
All this has made me wanna go back to PHP, probably with Symfony!
-
Sep 6, 2006, 00:51 #4
Originally Posted by sweatje
Ohai!
-
Sep 6, 2006, 02:38 #5
Originally Posted by ofirp
-
Sep 6, 2006, 07:51 #6
- Join Date
- Oct 2005
- Posts
- 31
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Luke Redpath
Bookmarks