How to Install Ruby on Rails Application - Complete Deployment Tutorial
Ruby, an open-source and widely adopted programming language, possesses a robust, practical, natural, easy-to-read syntax. By amalgamating the finest practices from diverse solutions, Ruby presents a distinctive object-oriented language that prioritizes simplicity. Its notable features include basic and extraordinary object-oriented functionalities, operator overloading, exception handling, iterators, closures, garbage collection, and more.
The platform offers seamless integration of Ruby web servers and a comprehensive suite of management and automation tools, including the famous Ruby on Rails web development framework. This combination facilitates comfortable hosting and maximizes the convenience of Ruby application development.
In this article, we will explore the unique features of Ruby hosting and introduce the various possibilities related to Ruby within the platform.
Ruby Environment Hosting
The platform offers a robust and user-friendly topology wizard, which simplifies the process of setting up hosting for a new environment. Switch to the Ruby language tab and choose the desired application server and engine version. You can also include any additional required software stack. To tailor the environment precisely to your specifications, you can adjust other parameters, such as cloudlets (RAM and CPU), disk space, public IPv4/IPv6, and node count.
Note: Apache Ruby and NGINX Ruby templates utilize a modern systemd initialization daemon.
Note: Each instance operates as an entirely isolated and independent container. Moreover, scaled-out nodes are automatically distributed across the physical servers (or VMs), ensuring high availability.
Ruby Application Servers
The platform offers Ruby application servers based on the Apache and NGINX software stacks. Both are configured to use the Ruby on Rails framework to develop web applications and the Passenger application server by default.
If required, the NGINX Ruby stack can be easily configured to work with various built-in servers:
Passenger is a feature-rich application server for Ruby, making it a valuable asset for modern web apps and microservice APIs.
Puma is a Ruby web server designed for speed and parallelism, thanks to its fast and accurate HTTP 1.1 protocol parsing.
Unicorn - Leveraging the advantages of Unix/Unix-like kernels, it serves fast clients on low-latency, high-bandwidth connections as an HTTP server.
Ruby Versioning
The below-mentioned Ruby versions are presently (at the time of writing) supported:
- 3.0.6
- 3.1.4
- 3.2.2
Note: The most current list of releases available on the platform can be accessed through the dedicated Software Stack Versions document, which is regularly updated weekly.
You can select the desired Ruby version through the topology wizard while creating a new environment and adjusting existing instances through container redeployment.
Ruby Application Deployment
The platform automates the deployment process for the managed Apache Ruby and NGINX Ruby application servers using the following methods:
- Application archive uploaded from the local machine or via an external URL
- Remote VCS repository (e.g., GitHub)
When deploying a Ruby application, you can only use a single context (ROOT). However, you have the flexibility to choose from three Deployment Types (RAILS_ENV) for it:
- Development - This option reloads all application classes and turns off caching, facilitating a faster development cycle.
- Production - Selecting this type turns on all caching.
- Test - Choosing this option wipes out the database between test runs
You can effortlessly switch between the Ruby deployment types by using the drop-down list next to your application (as depicted in the image below).
Ruby Dependency Management
All Ruby instances within the platform come equipped with the Bundler dependency manager, which automatically tracks and installs the exact gems and versions required by your project. Suppose your project includes a Gemfile file in the root folder. In that case, Bundler will automatically resolve dependencies after deployment to the server, eliminating your need for manual intervention.
Additionally, if required, you can incorporate any Ruby framework into your Gemfile, such as Sinatra, Rack, therubyracer, Ramaze, etc.; use Ruby on Rails, one of the most popular frameworks for developing and implementing web applications is available by default.
Ruby Post Deploy Configuration
To automate repetitive actions required by Ruby projects after application deployment, like db: migrate, you can create a rake_deploy file in the project's root folder.
The file should incorporate a list of commands (each command on a new line). These commands will be executed consecutively via the rake tool after each Apache/NGINX node restart. Once the command successfully runs, the rake_deploy file automatically removes.
Domains Management
You can set a custom domain name for your Ruby application, replacing the default one. Depending on the environment topology, you should follow one of the following methods:
CNAME redirect is recommended for dev and test environments when utilizing the Shared Load Balancer.
DNS A Record when using a public IP, as it is capable of handling high traffic loads effectively & suitable for production environments.
For seamless traffic redirection from one environment to another (e.r., redirecting customers to a newer application version without downtime), the recommended method is to use the swap domains functionality. Additionally, it is accessible as the SwapExtIps API/CLI method.
Automatic Vertical Scaling
A vital feature of the platform is its dynamic provisioning of the resources (RAM and CPU) your nodes need, based on the current load, with no manual intervention required. Set the desired cloudlets limit (128 MiB of RAM and 400 MHz of CPU each) for your Ruby application server, and the platform will automatically manage everything else.
Consequently, you gain the advantage of a truly user-oriented Pay-per-Use charging approach, eliminating the need to predict or estimate incoming load. It ensures you never overpay for unused resources and saves time as the platform automatically handles load-related adjustments and architectural changes.
Manual Horizontal Scaling
To perform horizontal scaling with the platform, you only need to select the desired number of nodes through the corresponding section in the topology wizard. Furthermore, the platform offers two scaling modes to choose from:
Stateless - This mode simultaneously creates all new nodes from the base image template.
Stateful - This mode sequentially copies the file system of the master container into the new nodes.
Note: To ensure proper distribution of requests, a load balancer instance is automatically added when scaling Ruby servers.
The maximum number of servers of the same type within a single environment layer depends on the hosting provider's settings.
Automatic Horizontal Scaling
You can configure automatic horizontal scaling for your Ruby environment using tunable triggers. These triggers monitor the nodes' load changes and increase or decrease the number of nodes accordingly.
The process is straightforward. Access the Environment Settings
- >> Monitoring
- >> Auto Horizontal Scaling section, and select the desired layer and resource to be monitored (CPU, RAM, Network, Disk I/O, Disk IOPS).
- >> Then, set the exact conditions and specifics of scaling through the intuitive UI form.
Conclusion
Ruby hosting on cloud platforms presents a robust and user-friendly environment for developing and deploying Ruby applications. The platform offers flexible scalability, automated management, and compatibility with various frameworks, delivering a seamless and cost-effective solution for developers. Explore the benefits of hosting Ruby applications on our platform!

Jilesh Patadiya, the visionary Founder and Chief Technology Officer (CTO) behind AccuWeb.Cloud. Founder & CTO at AccuWebHosting.com. He shares his web hosting insights on the AccuWeb.Cloud blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, and Windows and Linux hosting platforms.