1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Installing Ruby Web Applications

Discussion in 'Plesk for Linux - 8.x and Older' started by 2dareis2do, Jul 3, 2008.

  1. 2dareis2do

    2dareis2do Guest

    After installing 'Ruby on Rails support' via the Plesk Control Panel, (what ever Ruby on Rails Support means exactly?), I am experiencing problems trying to set up and run my first ruby application.

    I tried to run a basic ruby command from the command line and this did not seem to work either. First of all I tried to open up IRB (Interactive Ruby):

    [root@web1 ruby2]# irb
    bash: irb: command not found

    I also tried your instructions:
    1. Go to Domains > Domain name > 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 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]
    6. Save the file.
    7. Remove the file your_application/public/.htaccess
    8. Open the file your_application/public/dispatch.fcgi with a text editor and put the following lines there: #!/usr/bin/ruby
    9. Save the file.

    As opposed to creating a 'subdirectory' I created a folder. I hope this is what is meant. Please clarify.

    Also where says Open the file your_application/public/dispatch.fcgi with a text editor and put the following lines there: #!/usr/bin/ruby, do you mean:

    Open the file your_application/public/dispatch.fcgi with a text editor and replace the first line with #!/usr/bin/ruby. if so then I have done this. Please clarify!

    Once that has been completed, I tried to access it at the following URL: http://your-domain.com/your_application. However, instead of seeing the ruby page (as I have set it up on my Mac at home), I just seem to get redirected to another page on the site. This brings me back to wondering, what are we trying to do with the .htaccess files?

    I have also tried to access our server via port 3000, i.e. IPaddress:3000, although I might need to ask our web host to open up this port for us,but at no point does it mention that the 'Ruby on Rails support' needs to be accessed from this port.

    All in all, I would appreciate it if you could explain if I am on the right lines. Also, I feel that parallels could do a much better job of explaining and documenting, what 'Ruby on Rails support' actually means.


  2. 2dareis2do

    2dareis2do Guest

    Insatlling Ruby Web Applications

    Does anyone work on this forum?


  3. jahsh420

    jahsh420 Guest

    It is a community forum, so nobody technically "works" here. I am also having problems getting ruby applications to work. If I find anything I will let you know.
  4. jahsh420

    jahsh420 Guest


    Here is the fix. The problem is with the .htaccess file in the application directory. Change it to look like this:

    RewriteEngine On
    RewriteRule ^$ public/index.html [L]
    RewriteCond %{REQUEST_URI} !^/rails/public

    RewriteRule ^(.*)$ public/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ public/dispatch.fcgi/$1 [QSA,L]

    in this example "rails" is our application directory
  5. sergius

    sergius Golden Pleskian

    Nov 6, 2005
    Likes Received: