SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    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

  2. #2
    eschew sesquipedalians silver trophy sweatje's Avatar
    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.

  3. #3
    SitePoint Enthusiast
    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!

  4. #4
    SitePoint Guru Majglow's Avatar
    Join Date
    Aug 1999
    Location
    B-Town
    Posts
    645
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sweatje
    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.
    It scales quite well and is becoming the deployment method of choice.
    Ohai!

  5. #5
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ofirp
    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.
    Can't you just not open port 5000 to the rest of the world?

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Luke Redpath
    Can't you just not open port 5000 to the rest of the world?
    I can't since it's an internal webserver and this organization has nothing between the server and the client's machines.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •