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) but not for all servers. For the servers with the new setup, feel free to check this article. 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)
How to create a Rewrite
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!
"Our guide will help you understand the underlying principles of WordPress optimization"
Rasalina Willamson
Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae
Share this Post
Trusted By
900+
Client World wide
24x7x365
Professional Technical Support
Providing Cloud
Services
Since 2008
Network Uptime
99.9%
Server Uptime