Summary of Problems I have faced during installation of Ruby on Rails (RoR) on Hostgator

It is true that most of the Ruby/Rails community doesn’t develop on Windows, it has to mainly develop on Ubuntu but, that doesn’t mean that it’s been left entirely unsupported.
I am very new to the Ruby on rails programming ,I was just trying to install the rails on hostgator from last four days but I got struck , and not able to connect from the my local machine via PUTTY. While installing on hostgator I was getting these issue like the server was not starting, not able to connect the database .
So the steps I have followed for coming out with these problems

Step 1: Setup your Rails Environment

First, we're going to need to create the environment in which our rails application will live. Head to your cPanel, and access the Ruby on Rails icon from the Software/Services group.

This is your Ruby on Rails control panel. Here, we're going to create our application environment- give it a name. In this instance, I'm going to call mine 'redmine' since I'm going to be hosting a Redmine application! cPanel will fill in the application path, so just tick the 'Load on Boot?' box, make sure your environment is set to 'production' and click 'Create'.
This will create a directory at /home/[your username]/rails_apps/[app name] For me, since my username is cubecity, this directory is called /home/cubecity/rails_apps/redmine.

Step 2: Create Rewrite

After creating a new project we will hit the create rewrite button, after hitting on rewrite one URL will be generating automatically, This URL is should go to browser box where the home page for rail will appear if everything will be fine .

Step 3: Download/Extract your application

First, head to your application's webpage, and download the application. In this instance, I'm going to go download Redmine and Upload your application zip file to your rails_apps directory in your home directory, as shown in the following figure.

Step 4: Setup database/database user

Head back to cPanel. Go to MySQL Databases under the Databases group.First, let's create a new MySQL database. Under the Create New Database section, make a new database. Choose a name for your MySQL database, and click on 'Create Database. Then Next, in the Add User To Database section, let's add our 'redmine' user to our 'redmine' database. Select your user from the drop-down, select your database from the drop-down, and click 'Add'.

Step 5: Connect Rails to the database

This next section requires knowledge of SSH, and how to connect to the server with a client such as PuTTY. We'll be executing some commands from SSH, and these are required for the application to function correctly.Connect to your account via SSH.

Step 6: Create redirects

Head back to cPanel. Go to your Ruby on Rails control panel, and look under theCreate A Rewrite section. Click the 'Create Rewrite' button to create a rewrite for your application. This will create a .htaccess file in the directory of the domain you choose. We don't really recommend installing rails applications to subdirectories unless you are experienced with ruby on rails. Note which domain you rewrite the site too, you'll have to make a brief change to its .htaccess file.

0 comments: