How do I deploy a Ruby on Rails application?

NOTE: Before you deploy a Ruby on Rails application, read the Ruby on Rails documentation.


Create a Ruby on Rails application

After you confirm that your server uses a functional and accessible version of Ruby, you can create and deploy a Ruby on Rails environment. Ruby on Rails requires the following steps to set up the environment: 

 

  1. Enter your application's name in the App Name text box.

  2. To load when the server boots, select the Load on Boot? checkbox.

  3. Enter the application path in the Application Path text box.

    NOTE: If you set an application path in your public_html/ directory, anyone on the web can view your source code and configuration files.

  4. In the Environment menu, select the type of Ruby on Rails environment that you prefer.
  5. Click Create.

 

You can perform the following actions on applications in the Ruby on Rails Applications  table:

  • To redirect to an application's Rails server, click URL.
  • To run an application, click Run.
  • To stop an application, click Stop.
  • To load an application when the server boots, select the Load on Boot? checkbox.
  • To toggle an application between a production or development environment, select or deselect the Production checkbox.
  • To delete an application, click the DELETE link.

Create a Rewrite

Because Ruby on Rails uses its own server and does not respond on the standard HTTP port number 80, you must specify the port where site visitors can access your Ruby on Rails application (for example, example.com:12001).

Warnings:

  • Ruby application port numbers increment automatically with every new application. If you are on a shared server, the system assigns the next available port number to your application.
  • Your first application will not necessarily run on port 12001.

 

To configure Ruby to respond without the need for visitors to specify a port number, create a rewrite.

To configure a rewrite, perform the following steps:

  1. In the Create A Rewrite table, click Create Rewrite for the appropriate application 
  2. From the menu, select the domain, subdomain, or addon domain on which you wish to run your Ruby application.Click Save.
    • To run the application from a new page within your domain, enter the page name that you wish to use in the available text box.
  3. Click Save.

You can perform the following actions in the Current Rewrites table:

  • To change an application path name, enter the path name in the text box.
  • To save an application rewrite, click Save.
  • To delete an application rewrite, click Delete.

Additional applications and rewrites

To run multiple Ruby applications, you must configure additional ports to respond with Ruby on Rails and, if necessary, additional rewrites to disguise the port change.

  • To add additional Rails applications, follow the steps in the Create a Ruby on Rails application section. 
  • The new application will respond on the next available port number (for example, if your first application runs on port 12001, the second may run on port 12002 or higher).

    Warning:

    Ruby application port numbers increment automatically with every new application. If you are on a shared server, the system assigns the next available port number to your application. Also, your applications' port numbers may not be consecutive.

  • To configure an additional rewrite, follow the steps in the Create a Rewrite section.

  • You will need to use a new domain, addon domain, subdomain, or page (for example, example.com/RubyApplication) for the rewrite.

     
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Is it ok to use uppercase letters in an email address?

While most receiving email providers are fine with uppercase characters, some may not be. The...

How do I use the File Manager?

Our File Manager offers an easy interface to manage your website files and folders. A web hosting...

How do I view or change my FTP or cPanel password?

The username and password for your cPanel login and FTP login are the same. You can view your...

How much disk space is my site using?

This interface displays information about how you use your account's disk space, and all of your...

How much disk space is my site using?

This interface displays information about how you use your account's disk space, and all of your...