Deploy Ruby Apps
How to deploy Ruby apps on Eenos?
This document will help you to deploy a ruby app on your eenos hosting control panel. Eenos control panel is a modern hosting control panel designed for modern apps.
Features Of Eenos Ruby App Management
Eenso control panel has the following wonderful features for easily managing ruby apps.
- Manage unlimited Ruby app domains or subdomains
- Ruby Version Selector
- Deploy Ruby on Rails with one click
Every eenos Ruby app has its own virtual environment. So migration and transfer of hosting accounts are easy.
To start deploying Ruby and Ruby On Rails app, login to your eenos control panel and go to the following Page:
Ruby -> Deploy Ruby Apps
Setup Ruby SandBox and Install Apps
Now you need to fill out the simple form as follows,
Choose Domain For Ruby or Rails App: Select a domain or subdomain for deploying a Ruby app. This is the website url you are going to deploy the app.
Choose Ruby Version: Select a suitable version of Ruby distribution to set up the Sandbox virtual environment.
App Startup Script: This is the startup entry script name. It is normally a ruby script ( eg: config.ru, app.ru )
Public Folder Name: This is the folder into which you upload the static files like CSS, js, images, etc. It is directly under your website document root.
Project Publicity Type: This option will help you to set up the project in either production or development mode.
Install Demo App: If you wish to install a sample Ruby on Rails app and if you have already developed the app, you can select the option no and upload the files yourself.
Installing the demo Ruby on Rails app may take some time. It is a time-consuming job. You can view the progress from the Ruby sandbox apps section.
Now, Click the button Deploy App and it will start deploying the app.
Manage Ruby App From Shell
If your hosting account has enabled SSH access, you can easily manage your Ruby app from the shell. You may contact your hosting server provider and enable the ssh shell to access this feature.
You can login to the server with the ssh client from your desktop.
Here, we are going to use the following details to show you how to manage Python apps from the eenos sever shell virtual environment.
Example eenos user: myuser
Example python app domain: ruby.mydomain.com
Example eenos ssh server port: 22
Login to the SSH terminal
Login to the SSH server with the following command,
ssh myuser@ruby.mydomain.com -p 22
Activate Ruby Virtual Environment
Activate the Virtual Sandbox Python environment for the domain ruby.mydomain.com as follows,
myuser:$ ~ $ source ~/.sandbox/ruby/ruby.mydomain.com/bin/activate
(ruby.mydomain.com) myuser:$ ~ $
Done, you are on the domain's ruby environment, you can start working on your Python app from the terminal.
See some example commands below,
Check the Ruby version, gem version, and Rails version for the domain,
(ruby.mydomain.com) myuserd@u:$ ~ $ ruby -v
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux]
(ruby.mydomain.com) myuser@u:$ ~ $ gem -v
3.2.32
(ruby.mydomain.com) myuser@u:$ ~ $ rails -v
Rails 7.0.2.3
(ruby.mydomain.com) myuser@u:$ ~ $
Install rack gem on the domain as follows,
(ruby.mydomain.com) myuser@u:$ ~ $ gem install rack
Fetching rack-3.0.2.gem
Successfully installed rack-3.0.2
Parsing documentation for rack-3.0.2
Installing ri documentation for rack-3.0.2
Done installing documentation for rack after 9 seconds
1 gem installed
(ruby.mydomain.com) myuser@u:$ ~ $
(ruby.mydomain.com) myuser@u:$ ~ $ gem list | grep rack
rack (3.0.2, 2.2.3)
rack-test (1.1.0)
(ruby.mydomain.com) myuser@u:$ ~ $
Deactivate Ruby Virtual Environment
You can deactivate the current working ruby shell virtual environment by using the following command,
(ruby.mydomain.com) myuser@:$ ~ $ deactivate
myuser@:$ ~ $
This command will return you to the default terminal. Now you can switch to another ruby app from the same terminal
Switch Ruby SandBox Virtual Environment
If we have Flask app on the domain chat.mydomain.com on the same eenos hosting account, we can switch to the virtual environment for the chat app as follows,
myuser:$ ~ $ source ~/.sandbox/ruby/chat.mydomain.com/bin/activate
(chat.mydomain.com) myuser:$ ~ $
With the above steps, you can start deploying Ruby and Ruby on Rails apps. The next session will help you to manage Ruby Gem modules from the eenos control panel.