What pain. I am ready to switch hosts. I have this app in Dreamhost where I load the static pages just fine. The location of my rails app is /home/username/webaddress.com Under that resides the app/, public/ and so on. Like I said I can see my static pages that I have under public since I have in the Managed host panel the following: Web Directory: /home/username/[ webaddress.com/public ] / The problem comes in my index.html where I make a reference to app/controller/customer#submit in the html by <p><a href="/customer/submit" >Contact</a></p> which gives me a file not found/400 error. I have already checked all the files as far as permission (done a recursive chmod 755 on app/) and the shebang. So about the only thing I can think of is that my .htaccess is not correct. Here is the contents of my .htaccess: AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" All these stuff worked just fine in WEBrick. Thanks for your help. -- Posted via http://www.ruby-forum.com/.
Hi Carlos, I ran into the same issue few weeks ago. WEBrick was working just fine but not apache/fcgi. By default, Dreamhost run your app in production mode whereas in WEBrick you''re in development mode. I hadn''t set any production database so I couldn''t work properly. Could be the same for you. Franck On 2/14/06, Carlos Rivera <riverawynter@gmail.com> wrote:> > What pain. I am ready to switch hosts. I have this app in Dreamhost > where I load the static pages just fine. The location of my rails app > is /home/username/webaddress.com Under that resides the app/, public/ > and so on. Like I said I can see my static pages that I have under > public since I have in the Managed host panel the following: > > Web Directory: /home/username/[ webaddress.com/public ] / > > The problem comes in my index.html where I make a reference to > > app/controller/customer#submit > > in the html by > > <p><a href="/customer/submit" >Contact</a></p> > > > which gives me a file not found/400 error. I have already checked all > the files as far as permission (done a recursive chmod 755 on app/) and > the shebang. So about the only thing I can think of is that my > .htaccess is not correct. Here is the contents of my .htaccess: > > AddHandler fastcgi-script .fcgi > AddHandler cgi-script .cgi > Options +FollowSymLinks +ExecCGI > RewriteEngine On > > RewriteRule ^$ index.html [QSA] > RewriteRule ^([^.]+)$ $1.html [QSA] > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > > ErrorDocument 500 "<h2>Application error</h2>Rails application failed to > start properly" > > > All these stuff worked just fine in WEBrick. > > Thanks for your help. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060214/70ec1311/attachment.html
How about posting the errors in logs/production.log? That should provide more information On 2/14/06, Franck <franck.dagostini@gmail.com> wrote:> > Hi Carlos, > > I ran into the same issue few weeks ago. WEBrick was working just fine but > not apache/fcgi. > > By default, Dreamhost run your app in production mode whereas in WEBrick > you''re in development mode. I hadn''t set any production database so I > couldn''t work properly. > > Could be the same for you. > > Franck > > > On 2/14/06, Carlos Rivera <riverawynter@gmail.com> wrote: > > > > What pain. I am ready to switch hosts. I have this app in Dreamhost > > where I load the static pages just fine. The location of my rails app > > is /home/username/webaddress.com Under that resides the app/, public/ > > and so on. Like I said I can see my static pages that I have under > > public since I have in the Managed host panel the following: > > > > Web Directory: /home/username/[ webaddress.com/public ] / > > > > The problem comes in my index.html where I make a reference to > > > > app/controller/customer#submit > > > > in the html by > > > > <p><a href="/customer/submit" >Contact</a></p> > > > > > > which gives me a file not found/400 error. I have already checked all > > the files as far as permission (done a recursive chmod 755 on app/) and > > the shebang. So about the only thing I can think of is that my > > .htaccess is not correct. Here is the contents of my .htaccess: > > > > AddHandler fastcgi-script .fcgi > > AddHandler cgi-script .cgi > > Options +FollowSymLinks +ExecCGI > > RewriteEngine On > > > > RewriteRule ^$ index.html [QSA] > > RewriteRule ^([^.]+)$ $1.html [QSA] > > RewriteCond %{REQUEST_FILENAME} !-f > > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > > > > ErrorDocument 500 "<h2>Application error</h2>Rails application failed to > > > > start properly" > > > > > > All these stuff worked just fine in WEBrick. > > > > Thanks for your help. > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060214/887adf3d/attachment.html
Franck wrote:> Hi Carlos, > > I ran into the same issue few weeks ago. WEBrick was working just fine > but > not apache/fcgi. > > By default, Dreamhost run your app in production mode whereas in WEBrick > you''re in development mode. I hadn''t set any production database so I > couldn''t work properly. > > Could be the same for you. > > FranckIf I have the following in my environment.rb it should do it right? ENV[''RAILS_ENV''] ||= ''production'' As far as the production.log everytime I try to access the app I get the following(for some reason "customer" is truncated and only showing "stomer", do not know if this is right ): Processing Base#index (for 66.249.72.242 at 2006-02-14 02:43:39) [GET] Parameters: {} ActionController::RoutingError (Recognition failed for "stomer/submit"): /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:469:in `recognition_failed'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:459:in `recognize!'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in `process_request'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in `process!'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `each_cgi'' /usr/lib/ruby/1.8/fcgi.rb:597:in `each'' /usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `process!'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!'' dispatch.fcgi:34 -- Posted via http://www.ruby-forum.com/.
Any idea on what could be going wrong with this? -- Posted via http://www.ruby-forum.com/.
Carlos, Did you check the DreamHost wiki: http://wiki.dreamhost.com/index.php/Ruby_on_Rails There''s a lot of good info there. Also, you might try the forums: http://discussion.dreamhost.com/postlist.pl?Cat=&Board=forum_programming -Tom On 2/14/06, Carlos Rivera <riverawynter@gmail.com> wrote:> Any idea on what could be going wrong with this? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Yeah I followed the instructions on the WIKI, but no results. Tom Wilcoxen wrote:> Carlos, > > Did you check the DreamHost wiki: > > http://wiki.dreamhost.com/index.php/Ruby_on_Rails > > There''s a lot of good info there. Also, you might try the forums: > > http://discussion.dreamhost.com/postlist.pl?Cat=&Board=forum_programming > > -Tom-- Posted via http://www.ruby-forum.com/.
Could anybody tell me if this is an issue with my htacccess or just my html file? This thing is a nightmare. Easy to develop, but damn I inding it harder than deploying a j2ee app! Guest wrote:> Yeah I followed the instructions on the WIKI, but no results. > Tom Wilcoxen wrote: >> Carlos, >> >> Did you check the DreamHost wiki: >> >> http://wiki.dreamhost.com/index.php/Ruby_on_Rails >> >> There''s a lot of good info there. Also, you might try the forums: >> >> http://discussion.dreamhost.com/postlist.pl?Cat=&Board=forum_programming >> >> -Tom-- Posted via http://www.ruby-forum.com/.
is the issue affecting only for this particular url? On 2/15/06, Guest <riverawynter@gmail.com> wrote:> > Yeah I followed the instructions on the WIKI, but no results. > Tom Wilcoxen wrote: > > Carlos, > > > > Did you check the DreamHost wiki: > > > > http://wiki.dreamhost.com/index.php/Ruby_on_Rails > > > > There''s a lot of good info there. Also, you might try the forums: > > > > http://discussion.dreamhost.com/postlist.pl?Cat=&Board=forum_programming > > > > -Tom > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060215/344ca06b/attachment.html