Web Hosting

How to Host a Ruby Application on Plesk

Host a Rack-based Ruby application on Winheberg Plesk web hosting, folder layout, public root, enabling Ruby, gem installation, restart and troubleshooting.

November 2, 2026 Winheberg
Documentation›Web Hosting›How to Host a Ruby Application on Plesk

Context

Your Winheberg web hosting can run Rack-based Ruby applications, such as those written with Sinatra, Roda or Hanami. Plesk serves them with Phusion Passenger, which starts your application on the first visit and keeps it in memory.

The Plesk Ruby extension handles the Ruby version, the installation of the gems listed in your Gemfile and the application restart. You need no command-line access.

This guide covers the expected folder layout, the website root setting, enabling Ruby, installing gems and the most common errors.

The Winheberg Plesk panel is displayed in French. Menu, field and button names are quoted below exactly as they appear on screen, followed by their English meaning.

Prerequisites

An application that needs to run command-line tasks, such as Ruby on Rails migrations, requires SSH access. If your plan does not open it, a Winheberg VPS gives you full control of the server.

1. Prepare the application layout

Plesk expects a specific layout. The application folder holds config.ru and the Gemfile, and a public subfolder receives static files such as images or stylesheets.

Expected layout
Item Location
Application folder app.example.com
Startup file app.example.com/config.ru
Gem list app.example.com/Gemfile
Static files app.example.com/public

To test the hosting before uploading your real application, here is a minimal application. The config.ru file holds the application itself.

run lambda { |env|
  [200, { "content-type" => "text/html; charset=utf-8" }, ["<h1>Bonjour depuis Ruby #{RUBY_VERSION}</h1>"]]
}

The Gemfile declares the rack gem it needs.

source "https://rubygems.org"

gem "rack"

Upload these files to the application folder with the Plesk Fichiers (Files) manager, or with our guide How to Connect to Your Plesk Hosting over FTP with FileZilla

2. Point the website to the public folder

Open your domain from Sites Web & Domaines (Websites & Domains), then the Hébergement et DNS (Hosting & DNS) tab and the Hébergement (Hosting) entry. In Racine du document (Document root), add /public to the application folder path, then click Enregistrer (Save).

Document root set to the public folder in the Plesk Hosting Settings

Plesk then creates the public folder if it does not exist, with its default index.html page. Delete this file from the Fichiers manager, otherwise it is what shows at your website address instead of your application.

3. Enable Ruby

In the domain Démarrer (Get Started) tab, click Ruby, then Activer Ruby (Enable Ruby).

Get Started tab of a Plesk domain with the Ruby entry

The Ruby page then shows the application settings and its action buttons.

Ruby page of a domain in Plesk with Bundle install and Restart App
Ruby page settings
Setting What it shows
Version de Ruby (Ruby version) The version used by the application, which you can change by clicking it
Mode d'application (Application mode) production, the mode to keep for a live website
Root d'application (Application root) The application folder, always the parent folder of the website root
Variables d'environnement personnalisées (Custom environment variables) The variables passed to the application, set with préciser (specify)
Type d'app Ruby (Ruby app type) Basé sur Rack (Rack-based), detected from the config.ru file

Check that Root d'application shows your application folder, for instance /app.example.com. If it shows /, the website root was not set to the public folder, go back to step 2.

4. Install the gems

Click Installation de bundle (Bundle install). Plesk reads your Gemfile, installs the gems in the application vendor folder and creates the Gemfile.lock file.

Run Installation de bundle again after every change to the Gemfile.

5. Restart and test the application

Click Redémarrer l'app (Restart App), then open your domain in a browser. The minimal application shows the Ruby version in use.

Bonjour depuis Ruby page shown by the test application

Remember to Redémarrer l'app after every upload of a new version of your code, otherwise Passenger keeps the old one in memory.

Troubleshooting

❌ The Ruby page says "Fichier de démarrage /config.ru introuvable"

Plesk looks for config.ru (startup file not found) in the parent folder of the website root, and does not find it there.

  • Check that the Racine du document ends with /public, as in step 2
  • Check that config.ru sits in the application folder, not in public
  • Reload the Ruby page, Root d'application should show the application folder

❌ The default Plesk page shows instead of the application

Passenger first serves the files present in public, including the default page created by Plesk.

  • Delete public/index.html from the Fichiers manager
  • Reload your website without cache with Ctrl+F5

❌ The application returns an error after an update

A gem is missing or the application kept the old version in memory.

  • Run Installation de bundle again, then Redémarrer l'app
  • Open the Logs button of the Ruby page to read the error message
  • If a gem fails to compile during installation, open a ticket with our support and attach the message

Best practices

  • Keep the production mode for the public website
  • Store your keys and passwords in the Variables d'environnement personnalisées, never in the code
  • Commit the Gemfile.lock file, it ensures the same gem versions locally and on the hosting
  • Only put static files in public, the rest of the application must not be reachable from the web
  • Turn on HTTPS with our guide How to Generate a Let's Encrypt SSL Certificate for Your Website

Need help?

If your application still does not start, open a ticket with our support from your client area, Technical department, filling in the Related Product field with the web hosting concerned. Attach the content of the Logs of the Ruby page and the Ruby version in use.

Your Ruby application runs on your hosting, without a single command line 💎

Need a Web Hosting server?

Discover our offers tailored to your needs and get started now.

View offers