cPanel 11 Stage 2 (currently in the most recent RELEASE build) have RoR functionality, including Rails and Gems options on cpanel.
Note: For RoR, Apache must have mod_proxy support.
How To Install Ruby on a cpanel Server
How TO Install And Setup Gems
Ruby Gems are collections of functions that allow you to perform tasks in Ruby. You will need to install a Gem before you can use it inside a Ruby program.
Note: Current cpanel version has some bugs or issue with Gem Setup. We may sometimes need to configure Gems and Rails from command line.
tar xvzf rubygems-0.8.11.tgz
ruby setup.rb all
This step involves execution of `ruby setup.rb` with arguments `config / setup / install` all together
gem query --local
gem q -L
Listing all installed gems
gem install rails OR # (Enter Y for all dependencies)
gem install rails --include-dependencies
Note: maximum memory a cPanel process can be used must be set to a value greater than 128M(WHM > Server Configuration -> Tweak Settings)
Location of Your Ruby Gem on Application(s)
Using Your Ruby Gem(s)
You will need to add /home/username/ruby/gems to the include path. You can do this by adding the following code to your script:
Start And Stop Ruby Application
Once the setup is completed. You can start/stop the application using the Action button on cpanel
Set up a Redirection
The default port appears to be 12001, so the actual URL is: http://domain.com:12001/ ..which loads the app running at: /home/domain/path/to/rails/app/appname http://domain.com/Applnname to http://domain.com:12001/Applnname
You can set up this redirection using a .htaccess file inside the "Applnname" directory.
Here the complete installation process :
a) /scripts/installruby (unfortunately it is currently not perfect, no idea why)
b) gem install rails
c) gem install mongrel
if fastthread isn't installed (normally you will be asked for fastthread during mongrel installation)
d) gem install fastthread
Don't forget to open firewall ports 3000 and 12001
CTO / SEO Guru
Canadian Web Hosting