These directions will help you set up your Rails environment for simpler MVC Ruby development. This is not a beginner tutorial - if you know nothing about the command line, then Ruby on Rails is not for you.
Preconfiguration
- You must enable FastCGI for your domain. Login to Plesk, click on "Web Hosting Settings" for the domain you wish to use Rails with and enable FastCGI
- You will also need SSH access enabled. The option to enable it is also found within Web Hosting Settings. You may require non chrooted access - if this is the case, then some of the steps below will fail. Please open a support request to obtain non-rooted SSH access.
Setting up your Rails application skeleton
- Create your rails application skeleton by logging in via SSH and running
- Within the newly created skeleton, find the 'public' directory. Open the .htaccess file within (notice the leading `.') and change the following line
- Visit [your_domain]/[your_app_dir]/public/ to ensure the installation is complete. You should see a "Welcome Aboard" page that was auto-generated by Rails.
/usr/bin/rails /var/www/vhosts/[your_domain]/httpdocs/[your_app_dir]
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
to RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
From here you can follow the directions on the Welcome Aboard page to set up your database, generate models and controllers and configure routes.