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.

cPanel and Ruby on Rails (RoR) will it work???

Discussion in 'General Discussion' started by dev_cw, Jan 16, 2007.

  1. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    Recently I have installed RoR on my cPanel server and things seem to be working fine. However, some Ruby developers I have spoken with (I don't know no ruby so far) claim that the only acceptable method is to use a server like mongrel rather than FastCGI to handle the Ruby on Rails apps. Since mongrel only works with Apache 2.2 and since cPanel doesn't support Apache 2.2 does this mean that providing RoR on Apache 1.3 + FastCGI on a cPanel server is not a good idea? Or is this sort of a claim one of those "ideal situations" scenarios where it will be better on the mongrel setup but will work OK with the FastCGI setup.

    Quote from Time For A Grown-Up Server: Rails, Mongrel, Apache, Capistrano and You

    I see that cPanel is moving towards Apache2 but who knows how long that will be :eek:
     
  2. ClearSky

    ClearSky Well-Known Member

    Joined:
    Jul 9, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
  3. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
  4. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Did you notice that one of the comments on Bugzilla 2970 is from none other than Nick from cPanel:

    ------- Comment #12 From J. Nick Koston 2006-12-09 05:37 [reply] -------
    /scripts/installruby has been in the tree for a few months.


    Has anyone run this script? Results? :)

    - Scott
     
  5. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    I have been aware of this script, but I have not had the courage to test it on a production server. THe installation of ruby and its components are easy. FastCGI is a bit more trouble but not too bad either. However the main issue is concerning load balancing and proxy capabilities not available in Apache1.3 (which is the heart and soul of cPanel) which are needed to use mongrel (THE best way to handle ruby/rails applications. That is why there are many folks adding a second server or third party load balancer in front of Apache 1.3 to handle these functions. I think that /scripts/installruby is not the way to go at this pint if you are serious about hosting ruby/rails applications.

    Once cPanel goes with apache 2.2 things will be better for the Rails host.

    Hosting rails apps is not automated, you need to manually go in and edit your proxy(when using mongrel) or your fascgciserver cofig.

    Ruby/rails is definatly here to stay. I host only a hand full of clients and one needed Rails...in my case it was almost a 1 out of 10 deal, so I would imagine that if I hosted 100 sites that 10 would need ruby rails sometime soon. It would be a great idea if cPanel got really serious about rails and included functions in WHM.
     
  6. Spokuz

    Spokuz Well-Known Member
    PartnerNOC

    Joined:
    Apr 24, 2003
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lisbon - Portugal
    cPanel Access Level:
    Root Administrator

    I try with root acess but the system gaves me the msg:
    /scripts/installruby
    -bash: /scripts/installruby: Permission denied

    What could be the problem?
     
  7. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    16
    chmod 700 /scripts/installruby and try again.
     
  8. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
  9. Sabaote

    Sabaote Well-Known Member

    Joined:
    Dec 19, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Ribeirao Preto, Brazil
    Thanks vanessa..
    And.. nice site btw hehe.


    ------

    So, Ruby on Rails on Apache 1.3 could be limited?
     
  10. ClearSky

    ClearSky Well-Known Member

    Joined:
    Jul 9, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    What exactly does the gem install of the mysql for ruby do? I assume they are libraries for Ruby to connect to and use MySQL?
     
  11. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider

    thanks ;)

    A lot of Ruby content management systems use mysql, similiar to how php ones do (like wordpress, joomla, etc.) Think of it like compiling php... you need to compile ruby with mysql as well

    =D
     
    #11 vanessa, Mar 2, 2007
    Last edited: Mar 2, 2007
  12. ClearSky

    ClearSky Well-Known Member

    Joined:
    Jul 9, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Okay, that's what I figured was happening, just wanted to be sure. Thanks.
     
  13. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Installing ROR on cPanel seems to be easy enough todo, my question is, how to you allow your clients to upload their ROR based apps?
     
  14. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    they can install them as they would any php-based applications - they need to upload the files, create the database and configure the .htaccess. Only catch is that you may want to give them jailed ssh access so they can create symlinks to files outside the public_html, which is the secure way to install ruby apps...not required though.
     
  15. JamieD

    JamieD Well-Known Member

    Joined:
    Sep 3, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    We have been offering RoR to our customers with cPanel for well over 8 months now. FastCGI is our default configuration for customers, the down side of this is that every time a user hits the website for the first time the application has to start up (we kill off idle processes after 5 minutes of inactivity) which can take up to 30 seconds for large applications.

    Another issue with fastcgi is that the processes tend to runaway, some do not get killed off correctly, sometimes it will allow an application to start up more instances than its allowed to. We have had to write a script that cleans up runaway fastcgi processes every few minutes.

    We have successfully got mongrel clusters setup and running behind nginx as a load balancer. This is defiantly not an easy thing to setup correctly, there is a lot of small issues that need to be resolved before sites can work correctly without issues, especially getting this to work with rails caching. I would suggest not using pound behind apache, it does not pass all of the headers to mongrel correctly so it looks like all of your connections are coming internally.

    Our initial trials show that mongrel uses less server resources than fastcgi, although these applications are resident in memory all the time with mongrel rather than being started on demand with fastcgi.

    Jamie
     
Loading...

Share This Page