Greg Hauptmann
2006-Oct-21 11:56 UTC
help getting rails application working on fastcgi on dreamhost please
Hi, I''ve previously had a rails application up and running on dreamhost using fastcgi, however have just recently performed a "cap deploy" but have had problems: * I get a long wait period after browsing to the application and finially it returns "Application Error - Rails application failed to start properly" * No entries in the rails production (or development) logs * No fastcgi.crash.log entries * In the /log/http error.log I see "FastCGI: incomplete headers (0 bytes) received from server " * If I run dispatch.rb [skybar]$ ruby dispatch.rb ./../config/environment.rb:3: uninitialized constant RAILS_ROOT (NameError) from dispatch.rb:4:in `require'' from dispatch.rb:4 Can anyone help with some fault finding tips re how to track down whats going wrong? Note that I have made sure: - log/temp & dispatch.fcgi are writeable - have issued "killall -9 ruby" - etc Thanks in advance Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Al Evans
2006-Oct-21 13:08 UTC
Re: help getting rails application working on fastcgi on dre
Greg Hauptmann wrote:> Can anyone help with some fault finding tips re how to track down whats > going wrong?Have you made certain the hashbang lines on your dispatch scripts are correct for the host? These need to be absolute paths to the copy of ruby you''re running, "#!/usr/bin/env ruby" can''t be relied on because there is no useful environment when they are called by Apache. After you try to access your site, are there any copies of dispatch.fcgi running on the host (pa aux in an ssh window will tell you)? If not, they''re not getting started up, for one reason or another. --Al Evans -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2006-Oct-21 21:27 UTC
Re: help getting rails application working on fastcgi on dreamhost please
PS. I did not that in ~/logs/<domain>/http/error.log there are the follow 2 entries that show up after a timeout period of the browser not returning correctly: * FastCGI: comm with (dynamic) server "<domain>/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) * FastCGI: incomplete headers (0 bytes) received from server "<domain> /public/dispatch.fcgi" Does this help? Anyone know how to fix this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Bharat
2006-Oct-23 08:39 UTC
Re: help getting rails application working on fastcgi on dreamhost please
did u upload the files created in windows? if so, make sure that you do not have an extra line break at the end of the first lines of dispatch.cgi/fcgi. Run ''cat -v public/dispatch.fcgi | head -1'' and see if there is a hidden ''^M'' at the end of the line. If this is ok, then check your database.yml to ensure that you have given the right credentials. I have written a small write up on my experience setting up typo on bluehost. See if that helps. Bharat http://blog.publishedperspectives.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2006-Oct-23 20:16 UTC
Re: help getting rails application working on fastcgi on dreamhost please
hi Bharat * Checked for hidden ^M''s but none were there so this should be ok? * database credentials are fine (tried a "mysql -h asdf -u ...etc) Any other ideas re getting fastcgi working again on dream host. Again there are no rails or fcgicrash logs that appear. I''ve got no real idea how to try to track it down? Tks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2006-Oct-23 20:28 UTC
Re: help getting rails application working on fastcgi on dreamhost please
PS - I wonder if it could be something to do with copying in the full set of directories for my rails application upsetting something to do with the dreamhost setting for my site? For example whether I have to reforce my site to be "fastcgi" enabled or something like that? (even though on the dreamhost panel if I look it is still showing this subdomain to be fastcgi enabled) On 10/24/06, Greg Hauptmann <greg.hauptmann.ruby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > hi Bharat > > * Checked for hidden ^M''s but none were there so this should be ok? > * database credentials are fine (tried a "mysql -h asdf -u ...etc) > > Any other ideas re getting fastcgi working again on dream host. Again > there are no rails or fcgicrash logs that appear. I''ve got no real idea how > to try to track it down? > > Tks > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Al Evans
2006-Oct-23 22:46 UTC
Re: help getting rails application working on fastcgi on dre
Greg Hauptmann wrote:> PS - I wonder if it could be something to do with copying in the full > set of > directories for my rails application upsetting something to do with the > dreamhost setting for my site? For example whether I have to reforce my > site to be "fastcgi" enabled or something like that? (even though on the > dreamhost panel if I look it is still showing this subdomain to be > fastcgi > enabled)Do you have the "web directory" field in the setup panel pointed to your public directory, e.g., /home/<username>/<rails_directory>/public? --Al Evans -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Mr Grumpy
2006-Oct-24 11:05 UTC
Re: help getting rails application working on fastcgi on dre
Al - thanks a million - I believed the other posts about the hashbang and there was a wailing and gnashing of teeth for a couple of hours last night! #!/usr/bin/ruby at the top of dispatch.fcgi capistranoised my app. on Dreamhost. Thanks again. Mr Grumpy is somewhat less so. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---