Aly Dharshi
2005-Oct-26 15:01 UTC
Install Woes: RoR 0.14.1, Apache 2.0.55 and mod_fastcgi 2.4.2
Hello All, I am new to RoR, I have a Solaris 10 machine with above mentioned software. Ruby has been installed from Blastwave.org. I have the following line in my Apache''s httpd.conf: Include /etc/httpd/rails.conf rails.conf looks like: Alias /cookbook /export/home/rails/cookbook/public I have the following .htaccess file: # General Apache options AddHandler fastcgi-script .fcgi #AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteBase /cookbook RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f #RewriteRule ^(.*)$ dispatch.cgi [QSA,L] RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" the file dispatch.fcgi: #!/opt/csw/bin/ruby # # You may specify the path to the FastCGI crash log (a log of unhandled # exceptions which forced the FastCGI instance to exit, great for debugging) # and the number of requests to process before running garbage collection. # # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log # and the GC period is nil (turned off). A reasonable number of requests # could range from 10-100 depending on the memory footprint of your app. # # Example: # # Default log path, normal GC behavior. # RailsFCGIHandler.process! # # # Default log path, 50 requests between GC. # RailsFCGIHandler.process! nil, 50 # # # Custom log path, normal GC behavior. # RailsFCGIHandler.process! ''/var/log/myapp_fcgi_crash.log'' # require File.dirname(__FILE__) + "/../config/environment" #require ''fcgi_handler'' require ''fcgi'' RailsFCGIHandler.process! I can make it as far as the page Congratulations, you''ve put Ruby on Rails ! (via http://myhost.mydomain.com/cookbook/) but when I try the ONLamp.com tutorial by doing ruby script/generate scaffold bash-3.00# ruby script/generate scaffold Recipe exists app/controllers/ exists app/helpers/ exists app/views/recipes create test/functional/ dependency model create app/models/ create test/unit/ create test/fixtures/ create app/models/recipe.rb create test/unit/recipe_test.rb create test/fixtures/recipes.yml overwrite app/views/recipes/_form.rhtml? [Ynaq] a forcing scaffold force app/views/recipes/_form.rhtml create app/views/recipes/list.rhtml create app/views/recipes/show.rhtml create app/views/recipes/new.rhtml create app/views/recipes/edit.rhtml create app/controllers/recipes_controller.rb create test/functional/recipes_controller_test.rb create app/helpers/recipes_helper.rb create app/views/layouts/recipes.rhtml create public/stylesheets/scaffold.css then I change ownership of the files to the apache user and group as that is what the webserver is running under then try: http://myhost.mydomain.com/cookbook/Recipe/new I get a 404 Not Found. Am I missing the point here, I have been banging my head against the wall trying to figure out what I am doing wrong. Any ideas will be much appreciates. TIA. Cheers, Aly. -- Aly S.P Dharshi aly.dharshi-EynCeXvFgoheoWH0uzbU5w@public.gmane.org "A good speech is like a good dress that''s short enough to be interesting and long enough to cover the subject"
Simon Robson
2005-Oct-26 16:23 UTC
Re: Install Woes: RoR 0.14.1, Apache 2.0.55 and mod_fastcgi 2.4.2
Aly Dharshi wrote:> > then I change ownership of the files to the apache user and group as > that is what the webserver is running under then try: > > http://myhost.mydomain.com/cookbook/Recipe/new > > I get a 404 Not Found.Have you tried: http://myhost.mydomain.com/cookbook/recipe/new (lower case ''r'') Simon
Aly Dharshi
2005-Oct-26 17:00 UTC
Re: Install Woes: RoR 0.14.1, Apache 2.0.55 and mod_fastcgi 2.4.2
Hello Simon, Yes tried that too: http://myhost.mydomain.com/cookbook/recipe/new No luck I get a : Not Found The requested URL /cookbook/recipe/new was not found on this server. Cheers, Aly. Simon Robson wrote:> Aly Dharshi wrote: > >> >> then I change ownership of the files to the apache user and group as >> that is what the webserver is running under then try: >> >> http://myhost.mydomain.com/cookbook/Recipe/new >> >> I get a 404 Not Found. > > > Have you tried: > http://myhost.mydomain.com/cookbook/recipe/new (lower case ''r'') > > Simon > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- Aly S.P Dharshi aly.dharshi-EynCeXvFgoheoWH0uzbU5w@public.gmane.org "A good speech is like a good dress that''s short enough to be interesting and long enough to cover the subject"
Aly Dharshi
2005-Oct-26 17:10 UTC
Re: Install Woes: RoR 0.14.1, Apache 2.0.55 and mod_fastcgi 2.4.2
BTW this is what the apache error log shows: [Wed Oct 26 08:58:37 2005] [error] [client <removed this>] File does not exist: /export/home/rails/cookbook/public/Recipes [Wed Oct 26 10:55:53 2005] [error] [client <removed this>] File does not exist: /export/home/rails/cookbook/public/recipes [Wed Oct 26 10:56:04 2005] [error] [client <removed this>] File does not exist: /export/home/rails/cookbook/public/recipe Simon Robson wrote:> Aly Dharshi wrote: > >> >> then I change ownership of the files to the apache user and group as >> that is what the webserver is running under then try: >> >> http://myhost.mydomain.com/cookbook/Recipe/new >> >> I get a 404 Not Found. > > > Have you tried: > http://myhost.mydomain.com/cookbook/recipe/new (lower case ''r'') > > Simon > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- Aly S.P Dharshi aly.dharshi-EynCeXvFgoheoWH0uzbU5w@public.gmane.org "A good speech is like a good dress that''s short enough to be interesting and long enough to cover the subject"
Simon Robson
2005-Oct-27 07:39 UTC
Re: Install Woes: RoR 0.14.1, Apache 2.0.55 and mod_fastcgi 2.4.2
Then it looks as though your .htaccess file is being ignored. Within the main apache config you need to set the AllowOverride directive for the public directory in your rails install. More details here: http://httpd.apache.org/docs/2.0/howto/htaccess.html and here: http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride Simon Aly Dharshi wrote:> BTW this is what the apache error log shows: > > [Wed Oct 26 08:58:37 2005] [error] [client <removed this>] File does not > exist: /export/home/rails/cookbook/public/Recipes > [Wed Oct 26 10:55:53 2005] [error] [client <removed this>] File does not > exist: /export/home/rails/cookbook/public/recipes > [Wed Oct 26 10:56:04 2005] [error] [client <removed this>] File does not > exist: /export/home/rails/cookbook/public/recipe > > > Simon Robson wrote: > >> Aly Dharshi wrote: >> >>> >>> then I change ownership of the files to the apache user and group as >>> that is what the webserver is running under then try: >>> >>> http://myhost.mydomain.com/cookbook/Recipe/new >>> >>> I get a 404 Not Found. >> >> >> >> Have you tried: >> http://myhost.mydomain.com/cookbook/recipe/new (lower case ''r'') >> >> Simon >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > >
Aly Dharshi
2005-Oct-27 17:41 UTC
Re: Install Woes: RoR 0.14.1, Apache 2.0.55 and mod_fastcgi 2.4.2
Hello Simon, You are awesome, yes I tweaked that part in my rails.conf which looks like: Alias /cookbook /export/home/rails/cookbook/public <Directory /export/home/rails/cookbook/public> Options ExecCGI AddHandler cgi-script .fcgi Order allow,deny Allow from all AllowOverride All </Directory> I still have to do a Rewritebase /coobook, but it works now. I have fastcgi issues so not related to this so I will post separetly. Thanks. Cheers, Aly. Simon Robson wrote:> Then it looks as though your .htaccess file is being ignored. Within the > main apache config you need to set the AllowOverride directive for the > public directory in your rails install. > > More details here: > http://httpd.apache.org/docs/2.0/howto/htaccess.html > and here: > http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride > > Simon > > Aly Dharshi wrote: > >> BTW this is what the apache error log shows: >> >> [Wed Oct 26 08:58:37 2005] [error] [client <removed this>] File does >> not exist: /export/home/rails/cookbook/public/Recipes >> [Wed Oct 26 10:55:53 2005] [error] [client <removed this>] File does >> not exist: /export/home/rails/cookbook/public/recipes >> [Wed Oct 26 10:56:04 2005] [error] [client <removed this>] File does >> not exist: /export/home/rails/cookbook/public/recipe >> >> >> Simon Robson wrote: >> >>> Aly Dharshi wrote: >>> >>>> >>>> then I change ownership of the files to the apache user and group >>>> as that is what the webserver is running under then try: >>>> >>>> http://myhost.mydomain.com/cookbook/Recipe/new >>>> >>>> I get a 404 Not Found. >>> >>> >>> >>> >>> Have you tried: >>> http://myhost.mydomain.com/cookbook/recipe/new (lower case ''r'') >>> >>> Simon >>> _______________________________________________ >>> Rails mailing list >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- Aly S.P Dharshi aly.dharshi-EynCeXvFgoheoWH0uzbU5w@public.gmane.org "A good speech is like a good dress that''s short enough to be interesting and long enough to cover the subject"