Leng
2006-Nov-24 23:42 UTC
Rails Error: Unable to access log file... in Apache error log file
Hi, My Rails Depot app is working fine using WEBrick server but with Apache2, the app is having problems with writing to the development.log file. When using WEBrick, the development.log shows the logging consistently, but when using Apache2, nothing shows in the development.log file. On checking the Apache error log, I get this: [Sat Nov 25 10:24:38 2006] [error] [client 127.0.0.1] Rails Error: Unable to access log file. Please ensure that /srv/www/htdocs/depot/../config/../log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed. I am a newbie to RoR and Linux as well (about 3 weeks). I have performed "chown, and chgrp and chmod" on the log directory and "ls -l /srv/www/rails/depot/log" produced the following: -rw-rw-rw- 1 wwwrun www 442996 2006-11-23 17:37 development.log -rw-rw-rw- 1 wwwrun www 0 2006-11-20 22:34 production.log -rw-rw-rw- 1 wwwrun www 0 2006-11-20 22:34 server.log -rw-rw-rw- 1 wwwrun www 0 2006-11-20 22:34 test.log What am I missing here? Cheers, Leng --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Conrad Taylor
2006-Nov-29 19:57 UTC
Re: Rails Error: Unable to access log file... in Apache error log file
Hi Leng, the webrick server may have an exclusive lock on the development.log file. Also, you cannot change the file''s permission to gain write access to a file that has a exclusive lock. My recommendation would be to allow Apache and Webrick to write to their own respective log files because it makes it easier to debug the application in question. Good luck, -Conrad On 11/24/06, Leng <lengpoh-m/5qDMzAQIgQrrorzV6ljw@public.gmane.org> wrote:> > > Hi, > > My Rails Depot app is working fine using WEBrick server but with > Apache2, the app is having problems with writing to the development.log > file. When using WEBrick, the development.log shows the logging > consistently, but when using Apache2, nothing shows in the > development.log file. On checking the Apache error log, I get this: > > [Sat Nov 25 10:24:38 2006] [error] [client 127.0.0.1] Rails Error: > Unable to access log file. Please ensure that > /srv/www/htdocs/depot/../config/../log/development.log exists and is > chmod 0666. The log level has been raised to WARN and the output > directed to STDERR until the problem is fixed. > > I am a newbie to RoR and Linux as well (about 3 weeks). I have > performed "chown, and chgrp and chmod" on the log directory and "ls -l > /srv/www/rails/depot/log" produced the following: > -rw-rw-rw- 1 wwwrun www 442996 2006-11-23 17:37 development.log > -rw-rw-rw- 1 wwwrun www 0 2006-11-20 22:34 production.log > -rw-rw-rw- 1 wwwrun www 0 2006-11-20 22:34 server.log > -rw-rw-rw- 1 wwwrun www 0 2006-11-20 22:34 test.log > > What am I missing here? > > Cheers, > Leng > > > > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---