Creating a Ruby On Rails application in Cpanel

Ruby On Rails icon is there in cpanel theme from cpanel 11 onwards.
You can create a Ruby On Rails application in cpanel by following steps given below.

1. Login to cpanel
2. Click on the Ruby On Rails Icon in cpanel.
3. Fill in the “App Name” box with the application name you want to use.
4. Check the box for “Load on boot’.
5. Application Path will be automatically filled in as public_html/application_name.

You can create the application in this location itself. But, if you are installing this inside public_html, the configuration files will be public and everyone can access it. In order to avoid this, change the permission of the configuration files to 600. The main configuration file in which mysql passwords are stored is database.yml(Path: path_to_application/config/database.yml).

Or, you can install the application outside the public_html directory(in the home directory itself). Then you should set redirect to this application through apache to  the mongrel port from the cpanel >> Ruby On rails>>Redirects. Mongrel is the default webserver for RoR applications, which will be installed in the server when we install ruby using using /scripts/installruby.

6. Select the environment. The default environment in which the application will be created is ‘production’.

7. Click “Create”.

Application will be created in the specified path. All the newly created application will be using a port(>12000).

If the application name is test and  installation directory /home/username/public_html/test, then you can access the application using http://domainname/test/public/ (Use ‘/’ at the end which is the good method).

 

 

Both comments and pings are currently closed.

Comments are closed.