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 have the following wonderful features for easily managing ruby appsapps.
- Manage unlimited Ruby app domains or subdomains
- Ruby Version Selector
- Deploy Ruby on Rails with one click
Every eenos Ruby app have its on virtual environment. So migration and transfer of hosting accounts are easyeasy.
To start deploying Ruby anand Ruby On Rails appapp, loginslogin 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 the simple form as follows,
ChoseChoose 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.
ChoseChoose Ruby Version : Select a suitable version of Ruby distribution to setup the Sandbox virtual environmentenvironment.
App Startup Script : TheThis 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, imagesimages, etc. It is directly under your website document rootroot.
Project Publicity Type : This option will help you to setup the project in either production or development mode.
Install Demo App : If you wish to install a sample Ruby on Rails pp.app and Youyou have already developed the app, you can select no and upload the files yourself.
Installing demo Ruby on rails app may take some time. It is a time consuming job.You can view the progress from RuyRuby sandbox apps sectionsection.
NowNow, Click the button Deploy App and it will start deploying the app.
MangeManage Ruby App From Shell
If your hosting account have enabled ssh access.access, You 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.
HereHere, we are going to use the following details to show you how to manage Python app from eenos sever shell virtual environment.
Example eensoeenos user : myuser
Example python app domain : ruby.mydomain.com
Example eenos ssh sever port : 22
Login to SSH terminal
Login to the ssh sever 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 domains ruby environment , you can start working on your python app from the terminalterminal.
See some example commandcommands below,
Check 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 useby using the following commandcommand,
(ruby.mydomain.com) myuser@:$ ~ $ deactivate
myuser@:$ ~ $
This command will return youryou to the default terminal. Now you can switch to another ruby app from the same terminal
Switch Ruby SandBox Virtual Environment
Let us sayIf we have Flask app on the domain chat.mydomain.com on the same 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 panelpanel.