Install Ruby on Rails on cPanel Part 2

Posted By: Tony Baird

Last Updated: Friday February 8, 2008

We recently installed Ruby on Rails on some other servers and double checked some of the old servers to find something very troubling.  Ruby on Rails was not actually functioning on the servers anymore and on the new machines it never worked at all!

I found out that the /scripts/installruby is actually out of date on cPanel and as a result it will not install the most recent version of rubygems which can cause all sorts of problems.  So for a fresh cPanel system you’re actually going to need to do the following right now until cPanel updates their install script.

Open  /scripts/installruby on your favorite text editor so probably vi.  You’re then going to want to find the following:

 ‘rubygems’ => [ 0, 9, 3],

It should be something like this, but what you’re looking for is the rubygems part which defines what version will be installed.  You’re going to want to replace it with the latest version which in our case was 0.9.5.  So yours should now look like this:

‘rubygems’ => [ 0, 9, 5],

Now you’ve got it looking for the right rubygems you now need to grab that version.  So you’re going to want to do the following

cd /usr/local/cpanel/src/3rdparty/ruby/ wget mv rubygems-0.9.5.tgz rubygems-0.9.5.tar.gz

Now you’re done and you can run /scripts/installruby and it should actually install properly and users should be able to start their ruby applications and they will actually start.

Now the next part that some people are encountering and we had this come up was installation of the wrong gems.  It seems cPanel’s gem installer isn’t very smart and it will put bad versions on such as the win32 version of fastthread.

So if you’re having issues with starting you may want to try the following:

gem list –local

This will give you a list of gems installed and their versions.  If you have multiple versions of any gems it might be a good idea to check that out.  You may also want to run

gem uninstall fastthread

Then install it again if you’re having issues with mongrel instances starting.  As this was the one we had issues with putting win32 versions on as well as the linux versions.

Hope that helps anyone out there having issues getting Ruby on Rails working on their cPanel servers.

Ready to get started? Build your site from