Terry Donaghe
2006-Jul-16 19:53 UTC
[Rails] Rails, FCGI, DreamHost, and endless frustrations
Hi all! I''m trying to deploy an application out to a subdomain at dreamhost. I am getting the dreaded "Rails application failed to start properly" error. The logs for my app are empty. In the DreamHost FTP app, when I look in the error.log file (I''m guessing this the Apache error log file) I see the following for each of my attempts: [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi">From what I''ve seen in doing research, I think this indicates a problem withFCGI. For some more background: I have followed the instructions listed here: http://www.railshosting.org/#dreamhost This is a very simple non database app that I''ve tested on my local box through a WebBrick server. I think that I''ve copied everything properly and set up the various config files properly. I editted the various files as shown in the tutorial above. I''ve done "chmod 755" to my public directory and to the dispatch* files in there. My she-bang looks like this: #!/usr/bin/ruby I''ve tried to kill FCGI various times using: killall -USR1 dispatch.fcgi when I try that I get this message: dispatch.fcgi: no process killed In another thread someone suggested doing this: ps aux | grep dispatch Which I did and nothing shows up for anything relating to dispatch. I''m not very familiar with Unix, but I''m guessing this means that FCGI is not running? If so, how the heck do it up? Someone suggested using "touch" on dispatch.fcgi. That didn''t accomplish anything either... I''ve looked at all of the Troubleshooting advice from Dreamhost and elsewhere. I''m just at a loss. I have mapped my subdomain as shown in the tutorial above. I''m pretty much at the complete end of things that I can think of or google about. Can anyone please give me a few more tips or hints or anything that might help me get this up and running? I''m pretty darned frustrated. Thanks!! -- Terry (TAD) Donaghe http://www.tadspot.com http://www.rubynoob.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060716/8f7f4bf7/attachment.html
When moving to FastCGI, I had to make sure I removed all the debug "puts" from all the code. This will mess up the headers if the puts output goes to the wrong place. Does that help? Ian. On 7/17/06, Terry Donaghe <terry.donaghe@gmail.com> wrote:> > Hi all! > > I''m trying to deploy an application out to a subdomain at dreamhost. I am > getting the dreaded "Rails application failed to start properly" error. The > logs for my app are empty. In the DreamHost FTP app, when I look in the > error.log file (I''m guessing this the Apache error log file) I see the > following for each of my attempts: > > [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > From what I''ve seen in doing research, I think this indicates a problem > with FCGI. For some more background: > > I have followed the instructions listed here: > > http://www.railshosting.org/#dreamhost > > This is a very simple non database app that I''ve tested on my local box > through a WebBrick server. I think that I''ve copied everything properly and > set up the various config files properly. I editted the various files as > shown in the tutorial above. I''ve done "chmod 755" to my public directory > and to the dispatch* files in there. My she-bang looks like this: > > #!/usr/bin/ruby > > I''ve tried to kill FCGI various times using: > > killall -USR1 > dispatch.fcgi > > when I try that I get this message: > > dispatch.fcgi: no process killed > > In another thread someone suggested doing this: > > ps aux | grep dispatch > > Which I did and nothing shows up for anything relating to dispatch. I''m > not very familiar with Unix, but I''m guessing this means that FCGI is not > running? If so, how the heck do it up? Someone suggested using "touch" on > dispatch.fcgi. That didn''t accomplish anything either... > > I''ve looked at all of the Troubleshooting advice from Dreamhost and > elsewhere. I''m just at a loss. > > I have mapped my subdomain as shown in the tutorial above. I''m pretty > much at the complete end of things that I can think of or google about. Can > anyone please give me a few more tips or hints or anything that might help > me get this up and running? I''m pretty darned frustrated. > > Thanks!! > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.com > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Regards, Ian Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060717/9b791291/attachment.html
Al Evans
2006-Jul-17 12:09 UTC
[Rails] Re: Rails, FCGI, DreamHost, and endless frustrations
Terry Donaghe wrote:> I have mapped my subdomain as shown in the tutorial above. I''m pretty > much > at the complete end of things that I can think of or google about. Can > anyone please give me a few more tips or hints or anything that might > help > me get this up and running? I''m pretty darned frustrated.Does log/fastcgi.crash.log have anything in it? If so, there''s some problem in the application. If not, the dispatcher is never getting started. --Al Evans -- Posted via http://www.ruby-forum.com/.
Terry Donaghe
2006-Jul-17 13:28 UTC
[Rails] Re: Rails, FCGI, DreamHost, and endless frustrations
Hi Al, There is no log/fastcgi.crash.log file. I''m pretty sure that the dispatcher is never getting started, but I don''t really know what that means or how to fix it. I''ve deleted and recreated the project several times now doing EXACTLY what I did when I saw it almost work that one time. Since that one time, though, the dispatch.fcgi file has never been read. I''ve made sure that dispatch.fgci is identical to the file that I use in my trivial application. Since it never gets started, I''m guessing that this problem is not caused by anything in my rails code, right? Because it seems that none of that even gets looked at until dispatch.fcgi gets kicked off. On 7/17/06, Al Evans <anejr@alevans.com> wrote:> > Terry Donaghe wrote: > > > I have mapped my subdomain as shown in the tutorial above. I''m pretty > > much > > at the complete end of things that I can think of or google about. Can > > anyone please give me a few more tips or hints or anything that might > > help > > me get this up and running? I''m pretty darned frustrated. > > Does log/fastcgi.crash.log have anything in it? If so, there''s some > problem in the application. If not, the dispatcher is never getting > started. > > --Al Evans > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Terry (TAD) Donaghe http://www.tadspot.com http://www.rubynoob.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060717/55f29d77/attachment.html
Terry Donaghe
2006-Jul-17 13:29 UTC
[Rails] Rails, FCGI, DreamHost, and endless frustrations
Hi Ian, I think the fact that dispatch.fcgi never gets started means that none of the rails code has even been looked at by the system, right? From everything that I''ve been doing so far, I''m pretty sure (though I could be wrong) that the problem is in the system not reading or starting or whatever fcgi. Terry On 7/17/06, Ian Connor <ian.connor@gmail.com> wrote:> > When moving to FastCGI, I had to make sure I removed all the debug "puts" > from all the code. This will mess up the headers if the puts output goes to > the wrong place. > > Does that help? > > Ian. > > On 7/17/06, Terry Donaghe <terry.donaghe@gmail.com> wrote: > > > Hi all! > > I''m trying to deploy an application out to a subdomain at dreamhost. I am > getting the dreaded "Rails application failed to start properly" error. The > logs for my app are empty. In the DreamHost FTP app, when I look in the > error.log file (I''m guessing this the Apache error log file) I see the > following for each of my attempts: > > [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > > [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > > [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > From what I''ve seen in doing research, I think this indicates a problem > with FCGI. For some more background: > > I have followed the instructions listed here: > > http://www.railshosting.org/#dreamhost > > This is a very simple non database app that I''ve tested on my local box > through a WebBrick server. I think that I''ve copied everything properly and > set up the various config files properly. I editted the various files as > shown in the tutorial above. I''ve done "chmod 755" to my public directory > and to the dispatch* files in there. My she-bang looks like this: > > #!/usr/bin/ruby > > I''ve tried to kill FCGI various times using: > > killall -USR1 > > dispatch.fcgi > > when I try that I get this message: > > dispatch.fcgi: no process killed > > In another thread someone suggested doing this: > > ps aux | grep dispatch > > Which I did and nothing shows up for anything relating to dispatch. I''m > not very familiar with Unix, but I''m guessing this means that FCGI is not > running? If so, how the heck do it up? Someone suggested using "touch" on > dispatch.fcgi. That didn''t accomplish anything either... > > I''ve looked at all of the Troubleshooting advice from Dreamhost and > elsewhere. I''m just at a loss. > > I have mapped my subdomain as shown in the tutorial above. I''m pretty > much at the complete end of things that I can think of or google about. Can > anyone please give me a few more tips or hints or anything that might help > me get this up and running? I''m pretty darned frustrated. > > Thanks!! > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.com > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Regards, > Ian Connor > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Terry (TAD) Donaghe http://www.tadspot.com http://www.rubynoob.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060717/c164aea1/attachment.html
Andrew Stone
2006-Jul-17 13:51 UTC
[Rails] Rails, FCGI, DreamHost, and endless frustrations
Check your ruby path declaration in dispatch.fcgi. I''ve seen this type of error when this is not correct (invalid path to ruby). -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060717/f475de01/attachment.html
Al Evans
2006-Jul-17 14:10 UTC
[Rails] Re: Re: Rails, FCGI, DreamHost, and endless frustrations
Terry Donaghe wrote:> Hi Al, > > There is no log/fastcgi.crash.log file.That seems to imply that dispatch.fcgi is never getting started. I think somebody already suggested making sure that the hashbang line in dispatch.fcgi matches what you see when you type "which ruby". The only other thing I can think of is: Are you sure you checked the box for FastCGI support on the DH control panel, and set the "Web Directory" to the path to your Rails public directory? --Al Evans -- Posted via http://www.ruby-forum.com/.
Brian Hogan
2006-Jul-17 14:59 UTC
[Rails] Re: Re: Rails, FCGI, DreamHost, and endless frustrations
Most common Dreamhost deployment errros: 1. Dreamhost has switched some of the servers to Apache2.... and Rails no longer runs in Production mode by default. Set the environment to production by commenting out the appropriate line in config/environment.rb 2. Make sure you check USE FAST CGI when you create your domain in the Dreamhost panel 3. Make sure that dispatch.fcgi has appropriate permissions... rwx (chmod 775 works well for this file) 4. Make sure that the first line of dispatch.fcgi is #!/usr/bin/ruby 5. Make sure that .htaccess points to dispatch.fcgi and not dispatch.cgi(the default) 6. Make sure you have frozen your gems so you don''t get beaten up when Rails gets updated system-wide 7. Errors with the format of the database.yml file Finally, to avoid random 500 errors, you can replace your dispatch.fcgi with this one: http://svn.napcsweb.com/public/deploy_on_dreamhost/dispatch.fcgi On 7/17/06, Al Evans <anejr@alevans.com> wrote:> > Terry Donaghe wrote: > > Hi Al, > > > > There is no log/fastcgi.crash.log file. > > That seems to imply that dispatch.fcgi is never getting started. > > I think somebody already suggested making sure that the hashbang line in > dispatch.fcgi matches what you see when you type "which ruby". > > The only other thing I can think of is: Are you sure you checked the box > for FastCGI support on the DH control panel, and set the "Web Directory" > to the path to your Rails public directory? > > --Al Evans > > -- > 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/20060717/da8f8217/attachment.html
Nathan Leach
2006-Jul-17 15:09 UTC
[Rails] Rails, FCGI, DreamHost, and endless frustrations
Terry, If you copied your entire project to Dreamhost from a machine with a different OS, I believe this would cause serious problems. The way I do it is to generate the project on Dreamhost using SSH, then move just the app, db, and public/stylesheets folders (along with any other individual files) to the server via SFTP. That solved my deployment problems. Hope this helps. Nathan -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org]On Behalf Of Terry Donaghe Sent: Sunday, July 16, 2006 2:54 PM To: rails@lists.rubyonrails.org Subject: [Rails] Rails, FCGI, DreamHost, and endless frustrations Hi all! I''m trying to deploy an application out to a subdomain at dreamhost. I am getting the dreaded "Rails application failed to start properly" error. The logs for my app are empty. In the DreamHost FTP app, when I look in the error.log file (I''m guessing this the Apache error log file) I see the following for each of my attempts: [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi">From what I''ve seen in doing research, I think this indicates a problem with FCGI. For some more background:I have followed the instructions listed here: http://www.railshosting.org/#dreamhost This is a very simple non database app that I''ve tested on my local box through a WebBrick server. I think that I''ve copied everything properly and set up the various config files properly. I editted the various files as shown in the tutorial above. I''ve done "chmod 755" to my public directory and to the dispatch* files in there. My she-bang looks like this: #!/usr/bin/ruby I''ve tried to kill FCGI various times using: killall -USR1 dispatch.fcgi when I try that I get this message: dispatch.fcgi: no process killed In another thread someone suggested doing this: ps aux | grep dispatch Which I did and nothing shows up for anything relating to dispatch. I''m not very familiar with Unix, but I''m guessing this means that FCGI is not running? If so, how the heck do it up? Someone suggested using "touch" on dispatch.fcgi. That didn''t accomplish anything either... I''ve looked at all of the Troubleshooting advice from Dreamhost and elsewhere. I''m just at a loss. I have mapped my subdomain as shown in the tutorial above. I''m pretty much at the complete end of things that I can think of or google about. Can anyone please give me a few more tips or hints or anything that might help me get this up and running? I''m pretty darned frustrated. Thanks!! -- Terry (TAD) Donaghe http://www.tadspot.com http://www.rubynoob.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060717/18e29dbe/attachment-0001.html
Brian Hogan
2006-Jul-17 15:21 UTC
[Rails] Rails, FCGI, DreamHost, and endless frustrations
Nathan: Great advice, and one I forgot to mention. On 7/17/06, Nathan Leach <nathan.leach@phifer.com> wrote:> > Terry, > > If you copied your entire project to Dreamhost from a machine with a > different OS, I believe this would cause serious problems. The way I do it > is to generate the project on Dreamhost using SSH, then move just the app, > db, and public/stylesheets folders (along with any other individual files) > to the server via SFTP. That solved my deployment problems. Hope this > helps. > > Nathan > > -----Original Message----- > *From:* rails-bounces@lists.rubyonrails.org [mailto: > rails-bounces@lists.rubyonrails.org]*On Behalf Of *Terry Donaghe > *Sent:* Sunday, July 16, 2006 2:54 PM > *To:* rails@lists.rubyonrails.org > *Subject:* [Rails] Rails, FCGI, DreamHost, and endless frustrations > > Hi all! > > I''m trying to deploy an application out to a subdomain at dreamhost. I am > getting the dreaded "Rails application failed to start properly" error. The > logs for my app are empty. In the DreamHost FTP app, when I look in the > error.log file (I''m guessing this the Apache error log file) I see the > following for each of my attempts: > > [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > [Sun Jul 16 12:44:13 2006] [error] [client 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > From what I''ve seen in doing research, I think this indicates a problem > with FCGI. For some more background: > > I have followed the instructions listed here: > > http://www.railshosting.org/#dreamhost > > This is a very simple non database app that I''ve tested on my local box > through a WebBrick server. I think that I''ve copied everything properly and > set up the various config files properly. I editted the various files as > shown in the tutorial above. I''ve done "chmod 755" to my public directory > and to the dispatch* files in there. My she-bang looks like this: > > #!/usr/bin/ruby > > I''ve tried to kill FCGI various times using: > > killall -USR1 > dispatch.fcgi > > when I try that I get this message: > > dispatch.fcgi: no process killed > > In another thread someone suggested doing this: > > ps aux | grep dispatch > > Which I did and nothing shows up for anything relating to dispatch. I''m > not very familiar with Unix, but I''m guessing this means that FCGI is not > running? If so, how the heck do it up? Someone suggested using "touch" on > dispatch.fcgi. That didn''t accomplish anything either... > > I''ve looked at all of the Troubleshooting advice from Dreamhost and > elsewhere. I''m just at a loss. > > I have mapped my subdomain as shown in the tutorial above. I''m pretty > much at the complete end of things that I can think of or google about. Can > anyone please give me a few more tips or hints or anything that might help > me get this up and running? I''m pretty darned frustrated. > > Thanks!! > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.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/20060717/d622eb8c/attachment.html
Trry, sorry about that I missed that part about it not starting at all. For me the puts resulted in the errors FastCGI: incomplete headers but it looks like the other suggestions in this thread are probably worth working through first. I have never used dreamhost and just had the header problems when going from windows to linux. The list posted by Brian seem like a good start. Ian. On 7/17/06, Terry Donaghe <terry.donaghe@gmail.com> wrote:> > Hi Ian, > > I think the fact that dispatch.fcgi never gets started means that none of > the rails code has even been looked at by the system, right? From > everything that I''ve been doing so far, I''m pretty sure (though I could be > wrong) that the problem is in the system not reading or starting or whatever > fcgi. > > Terry > > > On 7/17/06, Ian Connor <ian.connor@gmail.com> wrote: > > > > When moving to FastCGI, I had to make sure I removed all the debug > > "puts" from all the code. This will mess up the headers if the puts output > > goes to the wrong place. > > > > Does that help? > > > > Ian. > > > > On 7/17/06, Terry Donaghe < terry.donaghe@gmail.com> wrote: > > > > > Hi all! > > > > I''m trying to deploy an application out to a subdomain at dreamhost. I > > am getting the dreaded "Rails application failed to start properly" error. > > The logs for my app are empty. In the DreamHost FTP app, when I look in the > > error.log file (I''m guessing this the Apache error log file) I see the > > following for each of my attempts: > > > > [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > > > > > > > [Sun Jul 16 12:36:32 2006] [error] [client 130.13.244.211 > > ] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > > > > [Sun Jul 16 12:44:13 2006] [error] [client > > 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > > > > > [Sun Jul 16 12:44:13 2006] [error] [client > > 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > > > > From what I''ve seen in doing research, I think this indicates a problem > > with FCGI. For some more background: > > > > I have followed the instructions listed here: > > > > http://www.railshosting.org/#dreamhost > > > > This is a very simple non database app that I''ve tested on my local box > > through a WebBrick server. I think that I''ve copied everything properly and > > set up the various config files properly. I editted the various files as > > shown in the tutorial above. I''ve done "chmod 755" to my public directory > > and to the dispatch* files in there. My she-bang looks like this: > > > > #!/usr/bin/ruby > > > > I''ve tried to kill FCGI various times using: > > > > killall -USR1 > > > > > > dispatch.fcgi > > > > when I try that I get this message: > > > > dispatch.fcgi: no process killed > > > > In another thread someone suggested doing this: > > > > ps aux | grep dispatch > > > > Which I did and nothing shows up for anything relating to dispatch. I''m > > not very familiar with Unix, but I''m guessing this means that FCGI is not > > running? If so, how the heck do it up? Someone suggested using "touch" on > > dispatch.fcgi. That didn''t accomplish anything either... > > > > I''ve looked at all of the Troubleshooting advice from Dreamhost and > > elsewhere. I''m just at a loss. > > > > I have mapped my subdomain as shown in the tutorial above. I''m pretty > > much at the complete end of things that I can think of or google about. Can > > anyone please give me a few more tips or hints or anything that might help > > me get this up and running? I''m pretty darned frustrated. > > > > Thanks!! > > -- > > Terry (TAD) Donaghe > > http://www.tadspot.com > > http://www.rubynoob.com > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > -- > > Regards, > > Ian Connor > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.com > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Regards, Ian Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060718/07c5aafd/attachment-0001.html
Terry Donaghe
2006-Jul-23 22:19 UTC
[Rails] Rails, FCGI, DreamHost, and endless frustrations
Hi all, I actually figured out the problem!! Or at least I think I did. For whatever reason, it seems that if I modify my config/environment.rb file I get this problem - the app times out and the logs report that dispatch.fcgiwas never read. My little app uses the flickr gem which depends on another gem called xml-simple. I followed the instructions here: http://wiki.dreamhost.com/index.php/Ruby_on_Rails#Using_Gems_Installed_in_Your_Home_Directory I unpacked the gems into my vendor directory and inserted a line like: ENV[''GEM_PATH''] = File.expand_path(''~/.gems'') + '':/usr/lib/ruby/gems/1.8'' into the environment.rb file. After some experimentation with another app, I discovered that no matter where I place this line in my environment.rbfile I would get the can''t read dispatch.fcgi error. I tried the other solution in the above link and placed this line in the file: config.load_paths += %W( #{RAILS_ROOT}/vendor/gem_name/lib ) substituting the proper values for gem_name for both of my gems. This causes the same time out errors as well. Finally, I removed all changes to the environment.rb file (except where I uncommented out the production line) and then copied the flickr.rb and xmlsimple.rb files into my app/controllers directory. I restarted dispatch.fcgi and everything works fine now! My question now is, why does this happen, and is there another solution I should try so that I don''t have to copy these files out of my vendor/gem_name directories? Maybe they need to be unpacked somewhere else? Thanks for any illumination! Terry On 7/17/06, Ian Connor <ian.connor@gmail.com> wrote:> > Trry, sorry about that I missed that part about it not starting at all. > For me the puts resulted in the errors > > FastCGI: incomplete headers > > but it looks like the other suggestions in this thread are probably worth > working through first. I have never used dreamhost and just had the header > problems when going from windows to linux. The list posted by Brian seem > like a good start. > > > Ian. > > On 7/17/06, Terry Donaghe <terry.donaghe@gmail.com> wrote: > > > > Hi Ian, > > > > I think the fact that dispatch.fcgi never gets started means that none > > of the rails code has even been looked at by the system, right? From > > everything that I''ve been doing so far, I''m pretty sure (though I could be > > wrong) that the problem is in the system not reading or starting or whatever > > fcgi. > > > > Terry > > > > > > On 7/17/06, Ian Connor < ian.connor@gmail.com> wrote: > > > > > > When moving to FastCGI, I had to make sure I removed all the debug > > > "puts" from all the code. This will mess up the headers if the puts output > > > goes to the wrong place. > > > > > > Does that help? > > > > > > Ian. > > > > > > On 7/17/06, Terry Donaghe < terry.donaghe@gmail.com> wrote: > > > > > > > Hi all! > > > > > > I''m trying to deploy an application out to a subdomain at dreamhost. > > > I am getting the dreaded "Rails application failed to start properly" > > > error. The logs for my app are empty. In the DreamHost FTP app, when I > > > look in the error.log file (I''m guessing this the Apache error log > > > file) I see the following for each of my attempts: > > > > > > [Sun Jul 16 12:36:32 2006] [error] [client > > > 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > > > > > > > > > > > [Sun Jul 16 12:36:32 2006] [error] [client > > > 130.13.244.211 > > > ] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > > > > > > > > > > [Sun Jul 16 12:44:13 2006] [error] [client > > > > > > 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > > > > > > > > [Sun Jul 16 12:44:13 2006] [error] [client > > > > > > 130.13.244.211] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > > > > > > > > > > From what I''ve seen in doing research, I think this indicates a > > > problem with FCGI. For some more background: > > > > > > I have followed the instructions listed here: > > > > > > http://www.railshosting.org/#dreamhost > > > > > > This is a very simple non database app that I''ve tested on my local > > > box through a WebBrick server. I think that I''ve copied everything properly > > > and set up the various config files properly. I editted the various files > > > as shown in the tutorial above. I''ve done "chmod 755" to my public > > > directory and to the dispatch* files in there. My she-bang looks like this: > > > > > > > > > #!/usr/bin/ruby > > > > > > I''ve tried to kill FCGI various times using: > > > > > > killall -USR1 > > > > > > > > > > > > dispatch.fcgi > > > > > > when I try that I get this message: > > > > > > dispatch.fcgi: no process killed > > > > > > In another thread someone suggested doing this: > > > > > > ps aux | grep dispatch > > > > > > Which I did and nothing shows up for anything relating to dispatch. > > > I''m not very familiar with Unix, but I''m guessing this means that FCGI is > > > not running? If so, how the heck do it up? Someone suggested using "touch" > > > on dispatch.fcgi. That didn''t accomplish anything either... > > > > > > I''ve looked at all of the Troubleshooting advice from Dreamhost and > > > elsewhere. I''m just at a loss. > > > > > > I have mapped my subdomain as shown in the tutorial above. I''m pretty > > > much at the complete end of things that I can think of or google about. Can > > > anyone please give me a few more tips or hints or anything that might help > > > me get this up and running? I''m pretty darned frustrated. > > > > > > Thanks!! > > > -- > > > Terry (TAD) Donaghe > > > http://www.tadspot.com > > > http://www.rubynoob.com > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > -- > > > Regards, > > > Ian Connor > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > -- > > Terry (TAD) Donaghe > > http://www.tadspot.com > > http://www.rubynoob.com > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > Regards, > Ian Connor > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Terry (TAD) Donaghe http://www.tadspot.com http://www.rubynoob.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060723/b0586b3e/attachment-0001.html
Did you try: rake rails:freeze:gems # Lock this application to the current gems (by unpacking them into vendor/rails) This is the only safe way to deal with deployment because it guarantees you''ll have the same gems on production as on development. - dan -- Dan Kohn <mailto:dan@dankohn.com> <http://www.dankohn.com/> <tel:+1-415-233-1000> On Jul 23, 2006, at 3:17 PM, Terry Donaghe wrote:> Hi all, > > I actually figured out the problem!! Or at least I think I did. > For whatever reason, it seems that if I modify my config/ > environment.rb file I get this problem - the app times out and the > logs report that dispatch.fcgi was never read. My little app uses > the flickr gem which depends on another gem called xml-simple. I > followed the instructions here: > > http://wiki.dreamhost.com/index.php/ > Ruby_on_Rails#Using_Gems_Installed_in_Your_Home_Directory > > I unpacked the gems into my vendor directory and inserted a line like: > > ENV[''GEM_PATH''] = File.expand_path (''~/.gems'') + '':/usr/lib/ruby/ > gems/1.8'' > > into the environment.rb file. After some experimentation with > another app, I discovered that no matter where I place this line in > my environment.rb file I would get the can''t read dispatch.fcgi > error. I tried the other solution in the above link and placed > this line in the file: > > config.load_paths += %W( #{RAILS_ROOT}/vendor/gem_name/lib ) > > substituting the proper values for gem_name for both of my gems. > This causes the same time out errors as well. > > Finally, I removed all changes to the environment.rb file (except > where I uncommented out the production line) and then copied the > flickr.rb and xmlsimple.rb files into my app/controllers > directory. I restarted dispatch.fcgi and everything works fine now! > > My question now is, why does this happen, and is there another > solution I should try so that I don''t have to copy these files out > of my vendor/gem_name directories? Maybe they need to be unpacked > somewhere else? > > Thanks for any illumination! > > Terry > > > On 7/17/06, Ian Connor <ian.connor@gmail.com > wrote: > Trry, sorry about that I missed that part about it not starting at > all. For me the puts resulted in the errors > FastCGI: incomplete headers > but it looks like the other suggestions in this thread are probably > worth working through first. I have never used dreamhost and just > had the header problems when going from windows to linux. The list > posted by Brian seem like a good start. > > > Ian. > > On 7/17/06, Terry Donaghe < terry.donaghe@gmail.com> wrote: > Hi Ian, > > I think the fact that dispatch.fcgi never gets started means that > none of the rails code has even been looked at by the system, > right? From everything that I''ve been doing so far, I''m pretty > sure (though I could be wrong) that the problem is in the system > not reading or starting or whatever fcgi. > > Terry > > > On 7/17/06, Ian Connor < ian.connor@gmail.com> wrote: > When moving to FastCGI, I had to make sure I removed all the debug > "puts" from all the code. This will mess up the headers if the puts > output goes to the wrong place. > > Does that help? > > Ian. > > On 7/17/06, Terry Donaghe < terry.donaghe@gmail.com> wrote: > Hi all! > > I''m trying to deploy an application out to a subdomain at > dreamhost. I am getting the dreaded "Rails application failed to > start properly" error. The logs for my app are empty. In the > DreamHost FTP app, when I look in the error.log file (I''m guessing > this the Apache error log file) I see the following for each of my > attempts: > > [Sun Jul 16 12:36:32 2006] [error] [client > > 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/ > flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) > idle timeout (120 sec) > > > > [Sun Jul 16 12:36:32 2006] [error] [client > > 130.13.244.211 > > ] FastCGI: incomplete headers (0 bytes) received from server "/home/ > tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > > [Sun Jul 16 12:44:13 2006] [error] [client > > > 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/ > flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) > idle timeout (120 sec) > > > [Sun Jul 16 12:44:13 2006] [error] [client > > > 130.13.244.211 > ] FastCGI: incomplete headers (0 bytes) received from server "/home/ > tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > > From what I''ve seen in doing research, I think this indicates a > problem with FCGI. For some more background: > > I have followed the instructions listed here: > > http://www.railshosting.org/#dreamhost > > This is a very simple non database app that I''ve tested on my local > box through a WebBrick server. I think that I''ve copied everything > properly and set up the various config files properly. I editted > the various files as shown in the tutorial above. I''ve done "chmod > 755" to my public directory and to the dispatch* files in there. > My she-bang looks like this: > > #!/usr/bin/ruby > I''ve tried to kill FCGI various times using: > > killall -USR1 > > > > > dispatch.fcgi > > when I try that I get this message: > > dispatch.fcgi: no process killed > > In another thread someone suggested doing this: > > ps aux | grep dispatch > > Which I did and nothing shows up for anything relating to > dispatch. I''m not very familiar with Unix, but I''m guessing this > means that FCGI is not running? If so, how the heck do it up? > Someone suggested using "touch" on dispatch.fcgi. That didn''t > accomplish anything either... > > I''ve looked at all of the Troubleshooting advice from Dreamhost and > elsewhere. I''m just at a loss. > > I have mapped my subdomain as shown in the tutorial above. I''m > pretty much at the complete end of things that I can think of or > google about. Can anyone please give me a few more tips or hints > or anything that might help me get this up and running? I''m pretty > darned frustrated. > > Thanks!! > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.com > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Regards, > Ian Connor > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.com > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Regards, > Ian Connor > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.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/20060723/d9dfcf28/attachment-0001.html
Terry Donaghe
2006-Jul-23 22:36 UTC
[Rails] Rails, FCGI, DreamHost, and endless frustrations
Well, I had to do the hack listed on that link just to get the flickr gem. Dreamhost doesn''t have the flickr gem. I did this: gemhome: /home/<YOUR USER NAME HERE>/.gems gempath: - /home/<YOUR USER NAME HERE>/.gems - /usr/lib/ruby/gems/1.8 But, no I didn''t do a rake rails:freeze:gems Would that help in this case? On 7/23/06, Dan Kohn <dan@dankohn.com> wrote:> > Did you try: > rake rails:freeze:gems # Lock this application to the current gems > (by unpacking them into vendor/rails) > > This is the only safe way to deal with deployment because it guarantees > you''ll have the same gems on production as on development. > > - dan > -- > Dan Kohn <mailto:dan@dankohn.com <dan@dankohn.com>> > <http://www.dankohn.com/> <tel:+1-415-233-1000> > > > > On Jul 23, 2006, at 3:17 PM, Terry Donaghe wrote: > > Hi all, > > I actually figured out the problem!! Or at least I think I did. For > whatever reason, it seems that if I modify my config/environment.rb file I > get this problem - the app times out and the logs report that > dispatch.fcgi was never read. My little app uses the flickr gem which > depends on another gem called xml-simple. I followed the instructions here: > > > http://wiki.dreamhost.com/index.php/Ruby_on_Rails#Using_Gems_Installed_in_Your_Home_Directory > > I unpacked the gems into my vendor directory and inserted a line like: > > ENV[''GEM_PATH''] = File.expand_path (''~/.gems'') + '':/usr/lib/ruby/gems/1.8'' > > into the environment.rb file. After some experimentation with another > app, I discovered that no matter where I place this line in my > environment.rb file I would get the can''t read dispatch.fcgi error. I > tried the other solution in the above link and placed this line in the file: > > config.load_paths += %W( #{RAILS_ROOT}/vendor/gem_name/lib ) > > substituting the proper values for gem_name for both of my gems. This > causes the same time out errors as well. > > Finally, I removed all changes to the environment.rb file (except where I > uncommented out the production line) and then copied the flickr.rb and > xmlsimple.rb files into my app/controllers directory. I restarted > dispatch.fcgi and everything works fine now! > > My question now is, why does this happen, and is there another solution I > should try so that I don''t have to copy these files out of my > vendor/gem_name directories? Maybe they need to be unpacked somewhere else? > > > Thanks for any illumination! > > Terry > > > On 7/17/06, Ian Connor <ian.connor@gmail.com > wrote: > > > > Trry, sorry about that I missed that part about it not starting at all. > > For me the puts resulted in the errors > > > > FastCGI: incomplete headers > > > > but it looks like the other suggestions in this thread are probably > > worth working through first. I have never used dreamhost and just had the > > header problems when going from windows to linux. The list posted by Brian > > seem like a good start. > > > > > > Ian. > > > > On 7/17/06, Terry Donaghe < terry.donaghe@gmail.com> wrote: > > > > > > Hi Ian, > > > > > > I think the fact that dispatch.fcgi never gets started means that none > > > of the rails code has even been looked at by the system, right? From > > > everything that I''ve been doing so far, I''m pretty sure (though I could be > > > wrong) that the problem is in the system not reading or starting or whatever > > > fcgi. > > > > > > Terry > > > > > > > > > On 7/17/06, Ian Connor < ian.connor@gmail.com> wrote: > > > > > > > > When moving to FastCGI, I had to make sure I removed all the debug > > > > "puts" from all the code. This will mess up the headers if the puts output > > > > goes to the wrong place. > > > > > > > > Does that help? > > > > > > > > Ian. > > > > > > > > On 7/17/06, Terry Donaghe < terry.donaghe@gmail.com> wrote: > > > > > > > > > Hi all! > > > > > > > > I''m trying to deploy an application out to a subdomain at > > > > dreamhost. I am getting the dreaded "Rails application failed to start > > > > properly" error. The logs for my app are empty. In the DreamHost FTP app, > > > > when I look in the error.log file (I''m guessing this the Apache > > > > error log file) I see the following for each of my attempts: > > > > > > > > [Sun Jul 16 12:36:32 2006] [error] [client > > > > > > > > 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > > > > > > > > > > > > > > > [Sun Jul 16 12:36:32 2006] [error] [client > > > > > > > > 130.13.244.211 > > > > > > > > ] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > > > > > > > > > > > > > > [Sun Jul 16 12:44:13 2006] [error] [client > > > > > > > > > > > > 130.13.244.211] FastCGI: comm with (dynamic) server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) > > > > > > > > > > > > [Sun Jul 16 12:44:13 2006] [error] [client > > > > > > > > > > > > 130.13.244.211 > > > > ] FastCGI: incomplete headers (0 bytes) received from server "/home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" > > > > > > > > > > > > > > > > From what I''ve seen in doing research, I think this indicates a > > > > problem with FCGI. For some more background: > > > > > > > > I have followed the instructions listed here: > > > > > > > > http://www.railshosting.org/#dreamhost > > > > > > > > This is a very simple non database app that I''ve tested on my local > > > > box through a WebBrick server. I think that I''ve copied everything properly > > > > and set up the various config files properly. I editted the various files > > > > as shown in the tutorial above. I''ve done "chmod 755" to my public > > > > directory and to the dispatch* files in there. My she-bang looks like this: > > > > > > > > > > > > #!/usr/bin/ruby > > > > > > > > I''ve tried to kill FCGI various times using: > > > > > > > > killall -USR1 > > > > > > > > > > > > > > > > > > > > dispatch.fcgi > > > > > > > > when I try that I get this message: > > > > > > > > dispatch.fcgi: no process killed > > > > > > > > In another thread someone suggested doing this: > > > > > > > > ps aux | grep dispatch > > > > > > > > Which I did and nothing shows up for anything relating to dispatch. > > > > I''m not very familiar with Unix, but I''m guessing this means that FCGI is > > > > not running? If so, how the heck do it up? Someone suggested using "touch" > > > > on dispatch.fcgi. That didn''t accomplish anything either... > > > > > > > > I''ve looked at all of the Troubleshooting advice from Dreamhost and > > > > elsewhere. I''m just at a loss. > > > > > > > > I have mapped my subdomain as shown in the tutorial above. I''m > > > > pretty much at the complete end of things that I can think of or google > > > > about. Can anyone please give me a few more tips or hints or anything that > > > > might help me get this up and running? I''m pretty darned frustrated. > > > > > > > > Thanks!! > > > > -- > > > > Terry (TAD) Donaghe > > > > http://www.tadspot.com > > > > http://www.rubynoob.com > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Regards, > > > > Ian Connor > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > > > > -- > > > Terry (TAD) Donaghe > > > http://www.tadspot.com > > > http://www.rubynoob.com > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > -- > > Regards, > > Ian Connor > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.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 > > >-- Terry (TAD) Donaghe http://www.tadspot.com http://www.rubynoob.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060723/df897532/attachment.html
Presumably, you have the flickr gem on your development machine to get the code working. rake:freeze:gems copies that exact gem into the vendor/rails directory (so that you can check it into your version control). Then, when you do rake deploy, that exact gem will be copied from your subversion repository to Dreamhost (still in the vendor/rails directory). So, you never need to worry about Dreamhost installing the gem on their own (or you installing it manually). I believe it''s a much better solution than what Dreamhost recommends, since you''re guaranteed that the gem on the server always matches the one of your development machine. (Also note that Dreamhost provides free Subversion, which you definitely need to be using as part of your Capistrano deployment.) - dan -- Dan Kohn <mailto:dan@dankohn.com> <http://www.dankohn.com/> <tel:+1-415-233-1000> On Jul 23, 2006, at 3:36 PM, Terry Donaghe wrote:> Well, I had to do the hack listed on that link just to get the > flickr gem. Dreamhost doesn''t have the flickr gem. > > I did this: > > gemhome: /home//.gems > gempath: > - /home//.gems > > - /usr/lib/ruby/gems/1.8 > But, no I didn''t do a > > rake rails:freeze:gems > > Would that help in this case? > > On 7/23/06, Dan Kohn < dan@dankohn.com> wrote: > Did you try: > > rake rails:freeze:gems # Lock this application to the > current gems (by unpacking them into vendor/rails) > > This is the only safe way to deal with deployment because it > guarantees you''ll have the same gems on production as on development. > > - dan > -- > Dan Kohn < mailto:dan@dankohn.com > > < http://www.dankohn.com/ > <tel:+1-415-233-1000> > > > > On Jul 23, 2006, at 3:17 PM, Terry Donaghe wrote: > >> Hi all, >> >> I actually figured out the problem!! Or at least I think I did. >> For whatever reason, it seems that if I modify my config/ >> environment.rb file I get this problem - the app times out and the >> logs report that dispatch.fcgi was never read. My little app uses >> the flickr gem which depends on another gem called xml-simple. I >> followed the instructions here: >> >> http://wiki.dreamhost.com/index.php/ >> Ruby_on_Rails#Using_Gems_Installed_in_Your_Home_Directory >> >> I unpacked the gems into my vendor directory and inserted a line >> like: >> >> ENV[''GEM_PATH''] = File.expand_path (''~/.gems'') + '':/usr/lib/ruby/ >> gems/1.8'' >> >> into the environment.rb file. After some experimentation with >> another app, I discovered that no matter where I place this line >> in my environment.rb file I would get the can''t read dispatch.fcgi >> error. I tried the other solution in the above link and placed >> this line in the file: >> >> config.load_paths += %W( #{RAILS_ROOT}/vendor/gem_name/lib ) >> >> substituting the proper values for gem_name for both of my gems. >> This causes the same time out errors as well. >> >> Finally, I removed all changes to the environment.rb file (except >> where I uncommented out the production line) and then copied the >> flickr.rb and xmlsimple.rb files into my app/controllers >> directory. I restarted dispatch.fcgi and everything works fine now! >> >> My question now is, why does this happen, and is there another >> solution I should try so that I don''t have to copy these files out >> of my vendor/gem_name directories? Maybe they need to be unpacked >> somewhere else? >> >> Thanks for any illumination! >> >> Terry >> >> >> On 7/17/06, Ian Connor < ian.connor@gmail.com > wrote: >> Trry, sorry about that I missed that part about it not starting at >> all. For me the puts resulted in the errors >> FastCGI: incomplete headers >> but it looks like the other suggestions in this thread are >> probably worth working through first. I have never used dreamhost >> and just had the header problems when going from windows to linux. >> The list posted by Brian seem like a good start. >> >> >> Ian. >> >> On 7/17/06, Terry Donaghe < terry.donaghe@gmail.com> wrote: >> Hi Ian, >> >> I think the fact that dispatch.fcgi never gets started means that >> none of the rails code has even been looked at by the system, >> right? From everything that I''ve been doing so far, I''m pretty >> sure (though I could be wrong) that the problem is in the system >> not reading or starting or whatever fcgi. >> >> Terry >> >> >> On 7/17/06, Ian Connor < ian.connor@gmail.com> wrote: >> When moving to FastCGI, I had to make sure I removed all the debug >> "puts" from all the code. This will mess up the headers if the >> puts output goes to the wrong place. >> >> Does that help? >> >> Ian. >> >> On 7/17/06, Terry Donaghe < terry.donaghe@gmail.com> wrote: >> Hi all! >> >> I''m trying to deploy an application out to a subdomain at >> dreamhost. I am getting the dreaded "Rails application failed to >> start properly" error. The logs for my app are empty. In the >> DreamHost FTP app, when I look in the error.log file (I''m guessing >> this the Apache error log file) I see the following for each of my >> attempts: >> >> [Sun Jul 16 12:36:32 2006] [error] [client >> >> >> 130.13.244.211] FastCGI: comm with (dynamic) server "/home/ >> tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: >> (first read) idle timeout (120 sec) >> >> >> >> [Sun Jul 16 12:36:32 2006] [error] [client >> >> >> >> 130.13.244.211 >> >> ] FastCGI: incomplete headers (0 bytes) received from server "/ >> home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" >> >> >> >> [Sun Jul 16 12:44:13 2006] [error] [client >> >> >> >> 130.13.244.211] FastCGI: comm with (dynamic) server "/home/ >> tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" aborted: >> (first read) idle timeout (120 sec) >> >> >> [Sun Jul 16 12:44:13 2006] [error] [client >> >> >> >> >> 130.13.244.211 >> ] FastCGI: incomplete headers (0 bytes) received from server "/ >> home/tdonaghe/flickr.icuo.us/flickr/public/dispatch.fcgi" >> >> >> >> From what I''ve seen in doing research, I think this indicates a >> problem with FCGI. For some more background: >> >> I have followed the instructions listed here: >> >> http://www.railshosting.org/#dreamhost >> >> This is a very simple non database app that I''ve tested on my >> local box through a WebBrick server. I think that I''ve copied >> everything properly and set up the various config files properly. >> I editted the various files as shown in the tutorial above. I''ve >> done "chmod 755" to my public directory and to the dispatch* files >> in there. My she-bang looks like this: >> >> #!/usr/bin/ruby >> I''ve tried to kill FCGI various times using: >> >> killall -USR1 >> >> >> >> >> >> dispatch.fcgi >> >> when I try that I get this message: >> >> dispatch.fcgi: no process killed >> >> In another thread someone suggested doing this: >> >> ps aux | grep dispatch >> >> Which I did and nothing shows up for anything relating to >> dispatch. I''m not very familiar with Unix, but I''m guessing this >> means that FCGI is not running? If so, how the heck do it up? >> Someone suggested using "touch" on dispatch.fcgi. That didn''t >> accomplish anything either... >> >> I''ve looked at all of the Troubleshooting advice from Dreamhost >> and elsewhere. I''m just at a loss. >> >> I have mapped my subdomain as shown in the tutorial above. I''m >> pretty much at the complete end of things that I can think of or >> google about. Can anyone please give me a few more tips or hints >> or anything that might help me get this up and running? I''m >> pretty darned frustrated. >> >> Thanks!! >> -- >> Terry (TAD) Donaghe >> http://www.tadspot.com >> http://www.rubynoob.com >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >> >> >> -- >> Regards, >> Ian Connor >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >> >> >> -- >> Terry (TAD) Donaghe >> http://www.tadspot.com >> http://www.rubynoob.com >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >> >> >> -- >> Regards, >> Ian Connor >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >> >> >> -- >> Terry (TAD) Donaghe >> http://www.tadspot.com >> http://www.rubynoob.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 > > > > > > -- > Terry (TAD) Donaghe > http://www.tadspot.com > http://www.rubynoob.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/20060723/00d75634/attachment-0001.html