The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

built in Ruby on Rails vs mod_rails?

Discussion in 'General Discussion' started by danimal, May 15, 2008.

  1. danimal

    danimal Well-Known Member

    Joined:
    Jul 14, 2003
    Messages:
    79
    Likes Received:
    0
    Trophy Points:
    6
    Hello!

    I notice that there is now a ruby on rails cPanel option that is available. It looks like it uses fastthread and mongrel. I'm also considering getting mod_rails installed and running.

    Has anyone fiddled with these enough to offer some opinions on the two?

    Pros of using cPanel rails:
    1) built in to cpanel (which is very nice)
    2) some end-user controls (which could be good or bad)
    3) cpanel support?

    Pros of using mod_rails:
    1) super easy deployment
    2) possibly better performance? (from the little I've read)

    I like the fact that mod_rails uses apache to manage spawning handlers as needed, whereas using mongrel, the mongrel processes are started up front, I believe.

    But, I prefer speed and stability, even over configurability.

    Thoughts?

    -Danimal :cool:
     
  2. gdelfino

    gdelfino Registered

    Joined:
    Feb 4, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have those same questions.

    After all these months, were you able to try mod_rails on a cPanel server?
     
  3. danimal

    danimal Well-Known Member

    Joined:
    Jul 14, 2003
    Messages:
    79
    Likes Received:
    0
    Trophy Points:
    6
    Yes,

    I use mod_rails. You need to be able to manually edit httpd.conf, so if you are the sysadmin and have root access, it works well. If you are a reseller or don't have root access, you are probably stuck with the cpanel rails, which is probably fine.

    -Danimal :cool:
     
  4. gdelfino

    gdelfino Registered

    Joined:
    Feb 4, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I have root access. I already ran /scripts/installruby but I am hesitant about running /usr/local/cpanel/bin/ror_setup as it works with mongrel instead of mod_rails.

    BTW, I found instructions on setting up mod_rails on cPanel servers here:

    http://bobcares.com/index.php/blog/?p=174
     
  5. gdelfino

    gdelfino Registered

    Joined:
    Feb 4, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    in order to make Apache know that my site is supposed to run under mod_rails (passenger), I had to put a configuration file here:

    Code:
    /usr/local/apache/conf/userdata/std/2/username/domain/rails.conf
    
    Inside the file I had 2 directives:

    Code:
    DocumentRoot /home/username/myrailsapp/public
    RailsBaseURI /
    The first line was OK, but the second one was failing when trying to run the
    /scripts/verify_vhost_includes command:

    Code:
    "Invalid command 'RailsBaseURI', perhaps misspelled or defined by a module not included in the server configuration"
    I took the time to debug the verify_vhost_includes script to see why it was failing and I found that the script calls the following command:

    Code:
    /usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/userdata/std/2/username/domain/rails.conf
    So, then I was able to fix the problem by using a rails.conf like this:

    Code:
    DocumentRoot /home/username/myrailsapp/public
    <IfDefine PASSENGER>
        RailsBaseURI /
    </IfDefine>
    OK.... This was going to be a question, but I found the solution while writing it. Still, I post it as it may be useful to others.

    Regards,

    Gustavo Delfino
     
Loading...

Share This Page