Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Ruby on Rails Question

Discussion in 'General Discussion' started by griz, Aug 9, 2011.

  1. griz

    griz Well-Known Member

    Dec 29, 2001
    Likes Received:
    Trophy Points:

    I recently installed Ruby using /scripts/installruby - and now have version 1.8.7 installed.

    My client, however, has need for the latest version - 1.9.2

    Is there any way for me to upgrade to the latest version?

    Thanks in advance,

  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst Staff Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Griz,

    If you upgrade Ruby to a higher version, then it will not work with cPanel > Ruby on Rails area to generate applications any longer or be supported by cPanel for any issues that arise. If you are fine having to always manually create an application for this one customer every time it is required, then you could move the existing ruby binary and libraries, download the file at to the server, unpack it, and install it there with these commands:

    mv /usr/bin/ruby /usr/bin/ruby.bak110809
    mv /usr/lib/ruby /usr/lib/ruby.bak110809
    cd /root
    tar xzf ruby*
    cd ruby
    make && make install
    ln -s /usr/local/bin/ruby /usr/bin/ruby
    ln -s /usr/local/lib/ruby /usr/lib/ruby
    You should then see the new version:

    ruby -v
    ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
    At that point, your cPanel Ruby and Rails environment won't be compatible with what we support and any issues that arise will be unable to be investigated by technical support. As such, I would highly suggest staying with the supported 1.8.7 version unless you are willing to forgo all support mechanisms and all cPanel-based automation for generating applications.

    Important Note: For anyone who is following the above instructions, please use at your own risk. This is not a recommendation to follow that upgrade path. I am actually recommending against doing it.

    If you end up causing issues with everything upon doing the above and wish to revert to the prior setup, simply do the following:

    rm /usr/bin/ruby
    rm /usr/lib/ruby
    mv /usr/local/bin/ruby /usr/local/bin/ruby.bak110809
    mv /usr/local/lib/ruby /usr/local/lib/ruby.bak110809
    mv /usr/bin/ruby.bak110809 /usr/bin/ruby
    mv /usr/lib/ruby.bak110809 /usr/lib/ruby
    ln -s /usr/bin/ruby /usr/local/bin/ruby
    ln -s /usr/lib/ruby /usr/local/lib/ruby
    Check the ruby version has reverted:

    ruby -v
    You should then see:

    ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
    Good luck!
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice