How to set up an environment for the Ruby on Rails application

Ruby on Rails is a free web application framework for the Ruby programming language. It is often referred to as 'Rails' or 'RoR'. It is intended to be used with the Agile development methodology, which is often used by web developers for its suitability for short, client-driven projects.

Ruby on Rails features several tools intended to make commonplace development tasks easier and 'out of the box'. Rails provides scaffolding which can automatically construct some of the models and views needed for a basic website. A simple Ruby web server and Rake build system are also included. By including these common tools with the Rails system, a basic development environment is in effect provided with all versions of the software. Rails is also noteworthy for its extensive use of the JavaScript libraries Prototype and Script.aculo.us for Ajax.

We support RoR with our Stellar Plus, Stellar Business and Reseller packages (and old Professional, Ultimate, Business and Reseller packages). The following versions are working on our servers: Ruby – 1.8.7, Rails – 2.3.18. You can set up your environment for your Ruby on Rails application in cPanel in the following way:





How to install Ruby on Rails (RoR)

1.Log into your cPanel, navigate to the Software section >> Ruby on Rails:



2. Fill in the corresponding fields:
  • App Name - enter your application's name.
  • Application Path - enter the application path for the app.
  • Environment - here you may select the type of RoR environment that you prefer.
  • NOTE: If you set an application path in your public_html/ directory, anyone on the web can view your source code and configuration files.
  • Load on Boot? - is useful if you wish to load the app when the server boots.
Then, click on Create:



Now you can perform the following actions on applications:
  • To redirect to an application's RoR 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 and development environment, select or clear the Production checkbox.
  • To delete an application, click Delete.




How to create a Rewrite

The RoR app uses its own server and does not respond to the standard HTTP port 80. Therefore, you’ll need to specify the port where website visitors can access your RoR application or configure it to respond without the need for your visitors to specify a port number.
To configure a rewrite, perform the following steps:

1. In the Ruby on Rails menu >> the Create A Rewrite section, click +Create Rewrite for the newly-created application:



2. On the next page, select the domain name, subdomain, or addon domain name on which you wish to run your Ruby application.
To run the application from a new page within your domain name, enter the page name that you wish to use in the URL field.
Click Save:



3. Now you may see the actual app URL in the Current Rewrites section:



If you wish to change the application path, enter a new one in the corresponding field and click Save.
To delete the rewrite, choose Delete.
Once the App Status is changed to Running, open the application URL in your browser. You will see the RoR welcome message:



The environment for your Ruby on Rails application is set up. Feel free to deploy your application now.


That's it!

              
                      Need any help? Contact our HelpDesk

Comments

We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

Need help? We're always here for you.

× Close