2
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.
Regards,
Dan
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.
Regards,
Dan