Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 15 of 15
  1. #1
    Member dev_cw's Avatar
    Join Date
    Jun 2004
    Posts
    59

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

    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.

    ... My “banging tin pots together” benchmarking with httperf indicated that where the Apache1.3+FastCGI setup on Dreamhost could handle ~30 reqs/sec before it would start dropping connections, the Apache2.2+Mongrel setup on a 128MiB Rimuhosting VPS can handle ~90 reqs/sec before things get hinky. In addition, the amount of downtime due to lost worker threads or fudged FastCGI connections was nil. The only times the site went down could be directly traced to me cutting first and measuring second.

    Apache+Mongrel is shaping up to be the preferred deployment platform for Rails applications. ...
    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

  2. #2
    Member
    Join Date
    Jul 2003
    Posts
    51

    Default

    I have no clue about your posted question, but if you really want RoR support in CPanel vote for the bug: http://bugzilla.cpanel.net/show_bug.cgi?id=2970.

  3. #3
    Member dev_cw's Avatar
    Join Date
    Jun 2004
    Posts
    59

    Default

    To follow up on my own post I have found out that you can sucessfuly use mongrel with apache 1.3 by using pound - http://www.apsis.ch/pound/ (or nginx - http://sysoev.ru/en/ ) to handle the mongrel connection. Now I need to find out how to accomplish this.

    I have found this article on using pound with mongrel:
    http://www.entanke.se/blog/2006/06/2...ound-on-a-vps/

  4. #4
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    932
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #5
    Member dev_cw's Avatar
    Join Date
    Jun 2004
    Posts
    59

    Default

    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. #6
    Member
    Join Date
    Apr 2003
    Location
    Lisbon - Portugal
    Posts
    120
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by sneader View Post
    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

    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. #7
    Member
    Join Date
    Sep 2003
    Posts
    165

    Default

    chmod 700 /scripts/installruby and try again.
    search is your friend!
    cPanel Specialist Certification::Technical

  8. #8
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Sep 2006
    Location
    Virginia Beach, VA
    Posts
    254
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    If this helps anyone, I got Ruby working perfectly on my cPanel VPS... I posted the instructions on my site:

    http://www.v-nessa.net/2007/01/15/in...uby-on-cpanel/

  9. #9
    Member
    Join Date
    Dec 2003
    Location
    Ribeirao Preto, Brazil
    Posts
    66

    Default

    Thanks vanessa..
    And.. nice site btw hehe.


    ------

    So, Ruby on Rails on Apache 1.3 could be limited?

  10. #10
    Member
    Join Date
    Jul 2003
    Posts
    51

    Default

    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. #11
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Sep 2006
    Location
    Virginia Beach, VA
    Posts
    254
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Sabaote View Post
    Thanks vanessa..
    And.. nice site btw hehe.

    thanks

    Quote Originally Posted by ClearSky View Post
    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?
    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
    Last edited by vanessa; 03-02-2007 at 06:52 PM.

  12. #12
    Member
    Join Date
    Jul 2003
    Posts
    51

    Default

    Okay, that's what I figured was happening, just wanted to be sure. Thanks.

  13. #13
    Member
    Join Date
    May 2006
    Location
    Johannesburg, South Africa
    Posts
    944
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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?
    • cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
    • Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
    • Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
    SoftDux- The Leaders in Software
    Use the coupon: cpanel-06 to get 20% off our packages

  14. #14
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Sep 2006
    Location
    Virginia Beach, VA
    Posts
    254
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #15
    Member
    Join Date
    Sep 2003
    Posts
    50

    Default

    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

Similar Threads & Tags
Similar threads

  1. Ruby on Rails with Apache in cPanel?
    By ee99ee in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-10-2010, 11:10 AM
  2. Ruby on Rails in Cpanel 11
    By kinsky in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 08-22-2007, 08:28 AM
  3. cPanel 11 and ruby on rails info?
    By JamieD in forum cPanel and WHM Discussions
    Replies: 27
    Last Post: 06-26-2007, 12:21 PM
  4. Ruby on Rails and cPanel API
    By XMG-Eric in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-28-2007, 10:00 AM
  5. Replies: 0
    Last Post: 05-12-2006, 04:00 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube