Hello,
The recommended way to run Ruby on Rails[ROR] in production is to use CGI or fastcgi.
You have to route requests to ROR applications through Apache via CGI or fastcgi.
Here is the step by step guide on how to:
1. Connect to the server via SSH using your cpanel's login details, provided you have the ssh access enabled for your account.
We do provide JailShell access on couple of servers.
2. Once you are connected to server via ssh, you will be in your home directory by default. You can verify it with
"pwd" command.
You can see the output like this :
Code:
[username@server ~]$ pwd
/home/username
[username@server ~]$
3. Then run the following commands to generate a test rail application and its controller.
Code:
[username@server ~]$ rails demo
[username@server ~]$ cd demo
[username@server ~]$ ruby script/generate controller test
4. Now create a symlink in public_html so that application would be accessible via web browser :
Code:
[username@server ~]$ cd ../public_html
[username@server ~]$ ln –s ../demo/public rails
5. Modify the Rewrite rule under .htaccess under "demo/public" folder.
Code:
[username@server ~]$ cd ../demoapp/public
[username@server ~]$ vi .htaccess
Now, find the line in the
.htaccess that looks something like this:
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
And change “dispatch.cgi” to “
dispatch.fcgi”
Save the file and quit.
You can then visit
http://yourdomain. com/rails/ and you should see a “Welcome Aboard” page which confirms successful installation and working of your rail application.
You can deploy any other standard Rail applications as well.
Most of them should work well with the preinstalled Gems modules on server.
You can check list of
gem modules installed on server using following command:
Code:
[username@server ~]$ gem list
For any further assistance in this regard, you are most welcome to open a ticket with our support desk at
http://support.eukhost.com
Regards,
Nick J.