Jelastic Ruby Hosting


Ruby Application Servers

Jelastic supports the following Ruby application servers

  • Apache2 + Passenger
  • Nginx + Passenger 
  • Nginx + Puma
  • Nginx + Unicorn

Note: Thin and Mongrel are not supported due to large CPU and memory usage.

Version Management

RVM is used as a standard version manager. RVM is responsible for configuring the current version of Ruby in each container. Currently, Jelastic supports the following Ruby versions:

  • 1.9.2-p320
  • 1.9.3-p429
  • 2.0.0-p195
  • 2.1.1

All of these versions are pre-installed in each Ruby container.

Switching between different versions is performed via the Jelastic dashboard by executing

rvm use ${ruby_version}

When a user switches the versions from one to another, Jelastic also performs resolving dependencies.

Jelastic will update all Ruby instances automatically in the case a new minor version of Ruby becomes available (e.g. appears new patch level 2.0.0-p196) via self-patching feature. All new environments will be created automatically with the new version of Ruby.

Dependency Management

Dependency management is provided by Bundler. You only need to specify the list of required gems in Gemfile and Bundle and this will resolve all dependencies.

By default Ruby in Jelastic comes with a list of the most popular/widespread Ruby gems for all supported Ruby versions. They are cached locally in each ruby container for fast environment creation.

When you deploy your application, Bundler performs dependency resolving by searching gems at and installing the latest version of all gems if needed.

If you use a non strict versions declaration in your Gemfile (e.g. gem version will have to be greater than specific "jquery-rails", "~> 2.0.2") - Bundler will download and install the latest version of the corresponding gem on each deployment.

If your application uses any special (non-public) dependency, you need to specify its repository URL in Gemfile and Bundler will also download and install this gem.

Jelastic supports all standard deployment types of Ruby applications:

  • production
  • development
  • testing

Production is the default deployment type. You can switch between deployment types at any time via the Jelastic Dashboard.

Bundler performs dependency resolving in the following cases:

  • Deploying application
  • Switching between Ruby versions
  • Changing deployment type

Post Deploy Configuration

Jelastic can perform post deployment application configuration via rake. This is usually needed to finalize configuration of complex applications, to run additional applications or specific steps for application configuration like db:migrate.

To do this we've introduced a new file called rake_deploy. It is located in the application root and contains a list of the commands that have to be passed to rake. Each command has to be located in a separate line. Commands are executed successively.

Jelastic executes commands from rake_deploy with each restart of the apache/nginx service and deletes them right after successful execution. As a result, if you need to bypass different commands to rake on each deploy you need to create a rake_deploy file each time and put the correct commands there.

Jelastic puts the output of each rake_deploy into a corresponding log file which is available via "Logs" view in the Jelastic Dashboard.

Syntaxis of rake_deploy file:


And Jelastic will execute the following scripts:


In case of Redmine rake_deploy looks like the following:


Note: To freeze gems you need to add this command to rake_deploy: gems:unpack

Configurations Available via Jelastic File Manager

Jelastic makes the following files and folders available for CRUD operations:

Directory PathDescription
/var/www/webroot/ for application files
contain web server config files

Available Frameworks

Jelastic supports ANY Ruby framework: you just need to add the corresponding dependency in Gemfile. Among the most popular are:

  • Ruby on Rails
  • Sinatra
  • Rack
  • therubyracer
  • Ramaze
  • ExecJS

Log Files

Jelastic makes available the following log files:

  • access_log.log
  • error_log.log
  • rake_deploy.log
  • bundle_install.log