Ruby
SandBox Ruby and Ruby on Rails app deployment and gem management.
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.
Ruby Gem Management
Manage Gem Modules on SandBox Apps
This page will help you to manage Ruby Gem modules on your Ruby apps. You can install, update, and uninstall gem modules from this page.
To access this option, Go to the following page,
Ruby -> Ruby Gem Management
This page will show your Ruby apps and an action button to Manage Gems. You may select your domain and click the manage Gem button which will take you to the gem management interface for the respective domain.
Install New Gem Module
You may enter the module lists as a line-by-line list or a comma-separated gem list. You can include the gem version tag too. After entering all the gems, click the button Install Gems.
The Module installation may take some time, you can see the deployment Status from Ruby -> Ruby & SandBox Apps
Update Single Gem Module
To update a single Gem module, click the Update button for the respective Python module.
You cannot update the Default version of the gem module as it is the server-side module installed with Ruby as a global gem module.
Bulk Update Modules
To update multiple gem modules, select the gem modules and click on the Bulk Update button.
Uninstall Single Gem
To remove a single gem module, click the Remove button for the respective gem module.
You cannot remove the global gem module showing as the default version, which is installed along with the server Ruby version.
Bulk Uninstall Modules
To remove multiple gem modules, select the gem modules and click the Bulk Remove button.
Ruby & SandBox Apps
Manage SandBox Ruby Apps
This page will give an easy interface for managing your ruby sandbox apps. To access the apps go to the following page,
Ruby-> Ruby & SandBox Apps
This page provides the following tools :
- Change the Ruby Version of the app
- Change Startup Script
- Change Public Folder
- Change Project Mode
- Enable/Disable SandBox
Change the Ruby Version on the App
To change the ruby version of a SandBox app, click the ruby icon on the respective app. Then select the ruby version. You can also choose to reinstall Sandbox.
If you change the ruby version, you may need to reinstall Sandbox to set up the gem modules.
Changing the Ruby version on a production app may break the app, if the requirements are not met.
You need to make sure to install all required gems after changing the ruby version.
Change Startup Script
This option will help you to change the entry point script or startup script on your ruby project. It is a ruby script name.
Examples: config.ru, app.ru,startup.ru
Change Public Folder
This folder contains the static files of your apps like CSS, JS, Images, etc. If your app configured the static files on a specific folder, you need to set this path, so that the web server directly serves these files.
Setting the wrong path for static files may break the website's contents.
Change Project Mode
You can switch your project into production or development mode. This mode will be enabled on your web server configuration.
Enable / Disable Sandbox
This option will help you to enable or disable the virtual ruby setup on your SandBox app.
Disabling the sandbox may break your sandbox application if it has custom modules.
Re-Install Sandbox
This option will remove all installed gem modules on your SandBox and reinstall the app ruby virtual environment on your project.
Delete SandBox
This option will uninstall the SandBox from your selected domain.