Deploy Ruby Apps
How to deploy Ruby apps on eenos ?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 havehas 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 havehas its onown 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 rubyRuby app. This is the website url you are going to deploy the app.
Choose Ruby Version : Select a suitable version of Ruby distribution to setupset up the Sandbox virtual environment.
App Startup Script : This is the startup entry script name. It is normally a ruby script ( eg :eg: config.ru ,ru, app.ru )
Public Folder Name: This is the folder into which you upload the static files like css,CSS, js, images, etc. It is directly under your website document root.
Project Publicity Type : This option will help you to setupset 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 railsRails app may take some time. It is a time 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 havehas enabled sshSSH 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 appapps from the eenos sever shell virtual environment.
Example eenos user :user: myuser
Example python app domain :domain: ruby.mydomain.com
Example eenos ssh severserver port :port: 22
Login to the SSH terminal
Login to the sshSSH severserver with the following command ,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 domainsdomain's ruby environment ,environment, you can start working on your pythonPython app from the terminal.
See some example commands below,
Check the Ruby version ,version, gem versionversion, and railsRails 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 stepssteps, you can start deploying rubyRuby and rubyRuby on railsRails apps. The next session will help you to manage Ruby Gem modules from the eenos control panel.