Ruby is a popular, open source programming language with a powerful and practical, yet natural and easy to read/write syntax. Ruby combines the best practices from various solutions to provide a unique object-oriented language, which aims for simplicity and provides such features as basic & special object-oriented features; operator overloading; exception handling; iterators and closures; garbage collection, and more.
Ruby Environment Hosting
Cantech Cloud provides a powerful and intuitive topology wizard to set up the hosting of a new environment.
environment section Switch to select Ruby language tab, select the required application server and engine version, add any other software stack required. If needed, adjust other parameters, such as cloudlets (RAM and CPU), disk space, Public IPv4/IPv6, node count, etc.
Ruby Application Servers
Ruby application servers based on the Apache and NGINX software stacks. Both ones are configured to utilize the Ruby on Rails framework for implementing web applications and the Passenger application server by default.
If needed, the NGINX Ruby stack can be easily configured to work with different inbuilt servers:
- Passenger – one of the most feature-rich application servers for Ruby, which are invaluable for the modern web apps and microservice APIs
- Puma – a Ruby web server oriented on speed and parallelism due to fast and accurate HTTP 1.1 protocol parsing
- Unicorn – an HTTP server, which takes advantage of the Unix/Unix-like kernels features for serving fast clients on low-latency, high-bandwidth connections.
You can select the required version of Ruby via the topology wizard during the creation of a new environment, as well as adjust it for the existing instances via container redeployment.
Ruby Application Deployment
Follow the below link for the Deployment Ruby project
Ruby Dependency Management
Ruby Dependency Management
All Ruby instances within Cantech Cloud are provided with the Bundler dependency manager for automatic tracking and installing the exact gems and versions, which your project requires. If the project has a Gemfile file in the root folder, it will automatically resolve dependencies with Bundler after deployment to the server without you having to perform any manual intervention.
Also, if needed, you can include any Ruby framework into your Gemfile (Sinatra, Rack, therubyracer, Ramaze, etc.) or utilize Ruby on Rails – one of the most popular frameworks for developing and implementing web applications, which is available by default. Refer to the Ruby Dependency Management documentation for additional information.
Ruby Post Deploy Configuration
In order to automate the repetitive actions that Ruby projects need to perform after the application is deployed (e.g. db:migrate), a rake_deploy file (located in the root folder of the project) can be created.
The file should contain a list of commands (each one from a new line) that will be executed consecutively via the rake tool after each restart of the Apache/NGINX node. After successful execution, the rake_deploy file is automatically removed. Refer to the Ruby Post Deploy Configuration documentation for additional information.
If you need any help contact our support, Open support ticket from client area.