Question

How to deploy my Rails 3 app on shared hosting ?

When I buy hosting, they clearly mention Ruby on Rails support.

My hosting is Linux. The hosting service provider's technical member also don't know how to use Rails app. He is just saying that you can use Rails apps with FastCGI.

The hosting provider also does not allow to SSH access!

Thank you in advance.

Was it helpful?

Solution

There appears to be some threads out there on this:


Resolution As of version 8.1, Plesk Control Panel supports Ruby on Rails. There is not an option in the Plesk Control Panel that should be checked to enable Ruby on Rails support; you only need to install the ruby packages.

To install an application written in Ruby, take the following steps:

  1. Go to Domains > your-domain.com > Setup.
  2. Select the CGI and FastCGI check-boxes and click OK.
  3. Connect to your FTP account, change to the /htdocs directory, and create a subdirectory where the application files will reside. Let's call this directory your_application, for illustration purposes.
  4. Upload the application files to the htdocs/your_application directory.
  5. Create a file with the name .htaccess in this directory, open it with a text editor of your choice, and add the following lines into the file:
RewriteEngine On
RewriteRule ^$ /public/index.html [L]
RewriteCond %{REQUEST_URI} !^/your_application/public
RewriteRule ^(.*)$ /public/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ public/dispatch.fcgi/$1 [QSA,L]
  1. Save the file.
  2. Remove the your_application/public/.htaccess file.
  3. Open the your_application/public/dispatch.fcgi file with a text editor and put the following lines there: #!/usr/bin/ruby
  4. Save the file. The web application will now be accessible at the following URL: http://your-domain.com/your_application
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top