Article ID: 118329, created on Oct 31, 2013, last review on Jun 17, 2016

  • Applies to:
  • Plesk 11.5 for Linux


How-To install a Ruby on Rails application in Plesk 11.5 on Debian 7.


NB: these steps should be performed only if you have Plesk 11.5 installed on Debian 7 OS. For earlier versions of Plesk, please use this article

  1. install Ruby on Rails through autoinstaller

    /usr/local/psa/admin/sbin/autoinstaller '--select-release-current' '--install-component' 'ruby'
  2. install libfcgi-dev, libsqlite3-dev packages

    apt-get install libfcgi-dev libsqlite3-dev
  3. install sqlite3 and fcgi gems:

    gem install sqlite3
    gem install fcgi
  4. create a test application:

    rails -D ruby_test_application

    NOTE: "-D" is necessary to add dispatchers (dispatch.fcgi) into the public folder. Dispatchers are necessary for the Ruby on Rails application to work in Plesk with FastCGI.

  5. create .htaccess in the application root directory with the following context:

    RewriteEngine On
    RewriteRule ^$ public/index.html [L]
    RewriteCond %{REQUEST_URI} !^/ruby_test_application/public
    RewriteRule ^(.*)$ public/\$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ public/dispatch.fcgi/$1 [QSA,L]
  6. modify public/dispatch.fcgi file:

    #require File.dirname(__FILE__) + "/../config/environment"    <-- old
    require File.absolute_path(__FILE__) + '/../../config/environment'    <-- new
  7. open the config/routes.rb file in the editor and change lines starting with 'map.connect' by adding '/ruby_test_application/' in front of string values, e.g.:

    map.connect '/ruby_test_application/:controller/:action/:id'
    map.connect '/ruby_test_application/:controller/:action/:id.:format'

In order to create test page:

  1. Execute the following command to create a new controller with the name Hello:

    ruby script/generate controller Hello index
  2. Open the 'ruby_test_application/app/controllers/hello_controller.rb' file in a file editor and change its content: Find the following content:

    class HelloController < ApplicationController
      def index

    and replace it with the following:

    class HelloController < ApplicationController
      def index
                    @message = "Hello World"
  3. Open the 'ruby_test_application/app/views/hello/index.html.erb' file in the file editor: And change content from

    <p>Find me in app/views/hello/index.rhtml</p>


    <h1><%= @message %></h1>

Search Words

ruby on rails

ROR application

ruby on rails plesk

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 01bc4c8cf5b7f01f815a7ada004154a2 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f

Email subscription for changes to this article
Save as PDF