Manage Ruby Applications

Enable Ruby for your Web Site

To enable Ruby for your web site, go to Websites & Domains > Ruby and click Enable Ruby.

Ruby_enable

The Ruby interpreter of the selected version will be enabled for your web site, and the version number will be displayed at the Websites & Domains page near the Ruby icon.

Ruby_enabled

Deploy a Ruby Application

Upload your application’s files (for example, using the File Manager) as follows:

  1. Create a subdirectory named /<application name>/public in the website home directory, where <application name> is the name of your Ruby application.
  2. Upload the application files (including the config.ru file) into the /<application name> directory.
  3. Go to Websites & Domains, click Hosting Settings and set the Document root value to /<application name>/public.

Then, go to Websites & Domains > Ruby. If Ruby is enabled, Plesk will detect your application, and the Ruby page will display the information about it:

Ruby_application

The following information is displayed:

An application may contain a Gemfile listing the gems and their versions required by the application. In this case, for application deployment, you need to install these gems using the Bundler utility. Go to Websites&Domains, click Ruby and then click Bundle install.

Bundle install-1

All the gems will be installed to the vendor/bundle directory in the application structure.

Bundle install-2

After the progress dialog shows that the installation has completed successfully, the application will be deployed to your web site and restarted.

If your application requires a database, add it in Plesk (refer to Website Databases).

Note: If you need to execute Rake tasks with your application via the command line interface and want to use the same Ruby version and the same gems set as your application has, use the bundle command. For example: RAILS_ENV=production bundle exec rake db:migrate.

Restart the Application

In some cases, it could be necessary to restart the application (for example, if the application is running in the production mode and a new version of code has been deployed). Go to Websites & Domains, click Ruby, and then click Restart App. Alternatively, click the Restart App button next to the name of the application at the Websites & Domains page.

Ruby_restart

The application should be restarted if you have changed its configuration files, application code, or added or removed custom environment variables.

Access to Configuration Files

Plesk provides you with quick links to the most used configuration files of the application. You can edit these files to define custom settings. For example, you can edit the Gemfile listing the gems required by the application.

To see the application configuration files detected by Plesk, go to Websites & Domains and click Ruby.

Ruby_conf_files

Click a file name to edit its content, make the necessary changes, and click OK.

Ruby_conf_file_edit

Disable Ruby

To disable Ruby for your domain, go to Websites & Domains, click Ruby, and then click Disable Ruby.