Forum: Ruby on Rails No more logs after SVN?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
softwareengineer 99 (Guest)
on 2006-02-02 19:46
(Received via mailing list)
Hello,

  Yesterday I "subversioned" my app using svn and now everything works
fine except I don't see any log entries in development.log?
  What would cause the log entries to be not produced anymore?

  Thanks
  Frank
Ben R. (Guest)
on 2006-02-02 19:49
(Received via mailing list)
Hi Frank ~

I am not sure what you mean by "subversioned", but is your app running
in
development mode?  If so the development log should be created unless
there
is a permission issue on where it is trying to write the log.  I
personally
do not commit my logs to my svn repository.  I only have the log
directory
in the repository, so when I move the app, the DIR is there...

~ Ben
Xavier N. (Guest)
on 2006-02-02 19:52
(Received via mailing list)
On Feb 2, 2006, at 18:46, softwareengineer 99 wrote:

> Hello,
>
> Yesterday I "subversioned" my app using svn and now everything
> works fine except I don't see any log entries in development.log?
> What would cause the log entries to be not produced anymore?

If there are several developers in that application logs are not
under version control normally, they are local. Not that this
explains why they are not being written.
softwareengineer 99 (Guest)
on 2006-02-02 21:35
(Received via mailing list)
Hi Ben,
  Thanks for your reply.
  Yes, my app is running in development mode.

  By "subversioned" I mean I moved the app to a SVN repository. Before
the move the logs were being written to logs/development.log. Now
nothing is being written as I move from page to page.

  I don't want to commit my logs to the repository but would like to
have access to them as I develop.

  How can I change where the logs are being written?

  Thanks
  Frank

Ben R. <removed_email_address@domain.invalid> wrote:  Hi Frank ~

I  am not sure what you mean by "subversioned", but is your app running
in  development mode?  If so the development log should be created
unless there is a permission issue on where it is trying to write the
log.  I personally do not commit my logs to my svn  repository.  I only
have the log directory in the repository, so  when I move the app, the
DIR is there...

~ Ben

On 2/2/06, softwareengineer 99 <removed_email_address@domain.invalid> wrote:
Hello,

 Yesterday I "subversioned" my app using svn and  now everything works
fine except I don't see any log entries in  development.log?
  What would cause the log entries to be not produced anymore?

  Thanks
  Frank



---------------------------------
Bring words and photos together (easily) with
   PhotoMail  - it's free and works with Yahoo! Mail.

_______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails






--
Ben R.
http://www.benr75.com  _______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails
softwareengineer 99 (Guest)
on 2006-02-02 21:35
(Received via mailing list)
Hello Xavier,
  Thanks for your reply.
  I am the only developer working.

  Thanks
  Frank

Xavier N. <removed_email_address@domain.invalid> wrote:  On Feb 2, 2006, at 
18:46,
softwareengineer 99 wrote:

> Hello,
>
> Yesterday I "subversioned" my app using svn and now everything
> works fine except I don't see any log entries in development.log?
> What would cause the log entries to be not produced anymore?

If there are several developers in that application logs are not
under version control normally, they are local. Not that this
explains why they are not being written.
Łukasz Piestrzeniewicz (Guest)
on 2006-02-02 23:00
(Received via mailing list)
On 02/02/06, softwareengineer 99 <removed_email_address@domain.invalid> wrote:
>  By "subversioned" I mean I moved the app to a SVN repository. Before the
> move the logs were being written to logs/development.log. Now nothing is
> being written as I move from page to page.
>
>  I don't want to commit my logs to the repository but would like to have
> access to them as I develop.
>
>  How can I change where the logs are being written?

You may safely leave logs where they are, just tell svn to ignore
them: from your application main directory do:

# svn propset svn:ignore "*.log" log
# svn ci -m "Ignoring log files" log

Now for the problem with empty log files. I have had the same problem
today and I fixed it just by deleting all contents of log directory.
On next run of ./script/server everything was ok.
softwareengineer 99 (Guest)
on 2006-02-05 01:56
(Received via mailing list)
Thanks for your reply.

  I followed the steps you mentioned and the logs work when using
script/server however no log entries are made when using Apache.

  Any suggestions on how I can see the logs when accessing the
application through Apache?

  Thanks
  Frank

�ukasz Piestrzeniewicz <removed_email_address@domain.invalid> wrote:  On 
02/02/06,
softwareengineer 99  wrote:
>  By "subversioned" I mean I moved the app to a SVN repository. Before the
> move the logs were being written to logs/development.log. Now nothing is
> being written as I move from page to page.
>
>  I don't want to commit my logs to the repository but would like to have
> access to them as I develop.
>
>  How can I change where the logs are being written?

You may safely leave logs where they are, just tell svn to ignore
them: from your application main directory do:

# svn propset svn:ignore "*.log" log
# svn ci -m "Ignoring log files" log

Now for the problem with empty log files. I have had the same problem
today and I fixed it just by deleting all contents of log directory.
On next run of ./script/server everything was ok.

--
�ukasz Piestrzeniewicz
Zach W. (Guest)
on 2006-02-05 01:56
(Received via mailing list)
Does the user apache runs as have permissions to write to the log
directory?
softwareengineer 99 (Guest)
on 2006-02-05 03:36
(Received via mailing list)
Hi Zach,
  Thank you for your reply.

  Yes the user under which apache runs does have permisisons to the log
directory.

  I have tried to see the httpd error logs but nothing shows up there
either.

  I cannot make sense as to why the logs won't show up when running
under Apache.

  Thanks
  Frank

Zach W. <removed_email_address@domain.invalid> wrote:  Does the user apache runs 
as have
permissions to write to the log directory?


On 2/4/06, softwareengineer 99  wrote:
>
> £ukasz Piestrzeniewicz
softwareengineer 99 (Guest)
on 2006-02-06 07:20
(Received via mailing list)
I tried the following but now I keep getting error when trying to commit
that log is not a working copy. Please advise

  # svn commit
  # svn: '/var/www/html/hosts/adoppt.com/docs/ror/log' is not a working
copy

  Thanks
  Frank


�ukasz Piestrzeniewicz <removed_email_address@domain.invalid> wrote:You may 
safely
leave logs where they are, just tell svn to ignore
them: from your application main directory do:

# svn propset svn:ignore "*.log" log
# svn ci -m "Ignoring log files" log
Łukasz Piestrzeniewicz (Guest)
on 2006-02-06 13:00
(Received via mailing list)
Hi,

On 06/02/06, softwareengineer 99 <removed_email_address@domain.invalid> wrote:
> I tried the following but now I keep getting error when trying to commit
> that log is not a working copy. Please advise
>
>  # svn commit
>  # svn: '/var/www/html/hosts/adoppt.com/docs/ror/log' is
> not a working copy

It seems that log directory was not added to subversion in the first
place. In that case you have to add it first:

$ svn add -N log

Switch -N ensures that add operation is not recursive.
Now you can set the svn:ignore property:

$ svn propset svn:ignore "*.log" log
$ svn ci -m "Ignoring log files" log

It should work.
Harm (Guest)
on 2006-02-07 19:56
I do have the same problem. And tried the solution stated here but that
did not work. Is there a solution? This is really silly.

Łukasz Piestrzeniewicz wrote:
> Hi,
>
> On 06/02/06, softwareengineer 99 <removed_email_address@domain.invalid> wrote:
>> I tried the following but now I keep getting error when trying to commit
>> that log is not a working copy. Please advise
>>
>>  # svn commit
>>  # svn: '/var/www/html/hosts/adoppt.com/docs/ror/log' is
>> not a working copy
>
> It seems that log directory was not added to subversion in the first
> place. In that case you have to add it first:
>
> $ svn add -N log
>
> Switch -N ensures that add operation is not recursive.
> Now you can set the svn:ignore property:
>
> $ svn propset svn:ignore "*.log" log
> $ svn ci -m "Ignoring log files" log
>
> It should work.
Łukasz Piestrzeniewicz (Guest)
on 2006-02-08 14:08
(Received via mailing list)
On 07/02/06, Harm <removed_email_address@domain.invalid> wrote:
> I do have the same problem. And tried the solution stated here but that
> did not work. Is there a solution? This is really silly.

Are you using development environment or other? Try setting RAILS_ENV
environment variable to name of environment you are using:

$ RAILS_ENV=development ./script/server
Guest (Guest)
on 2006-02-08 15:59
Well the environment is just development. Nothing changed there. And the
funny thing is that Webbrick neatly logs everything. Only Apache does
not. And all the permissions are correct. The webserver can write in the
relevant directory.
Puzzlement reigns.

Łukasz Piestrzeniewicz wrote:
> On 07/02/06, Harm <removed_email_address@domain.invalid> wrote:
>> I do have the same problem. And tried the solution stated here but that
>> did not work. Is there a solution? This is really silly.
>
> Are you using development environment or other? Try setting RAILS_ENV
> environment variable to name of environment you are using:
>
> $ RAILS_ENV=development ./script/server
softwareengineer 99 (Guest)
on 2006-02-08 16:21
(Received via mailing list)
Exact situtation here with no solution.

  Frank

Guest <removed_email_address@domain.invalid> wrote:  Well the environment is 
just
development. Nothing changed there. And the
funny thing is that Webbrick neatly logs everything. Only Apache does
not. And all the permissions are correct. The webserver can write in the
relevant directory.
Puzzlement reigns.
Harm (Guest)
on 2006-02-08 16:23
Well I think I figured it out. After the directive FastCgiServer in my
apache conf files I put -initial-env RAILS_ENV=development. Then I
removed the stale development.log file and restarted apache. This
created a new log file! NOTE: if you remove the log file and do *not*
restart apache, no new log file will appear.
Rejoice!

Guest wrote:
> Well the environment is just development. Nothing changed there. And the
> funny thing is that Webbrick neatly logs everything. Only Apache does
> not. And all the permissions are correct. The webserver can write in the
> relevant directory.
> Puzzlement reigns.
>
> Łukasz Piestrzeniewicz wrote:
>> On 07/02/06, Harm <removed_email_address@domain.invalid> wrote:
>>> I do have the same problem. And tried the solution stated here but that
>>> did not work. Is there a solution? This is really silly.
>>
>> Are you using development environment or other? Try setting RAILS_ENV
>> environment variable to name of environment you are using:
>>
>> $ RAILS_ENV=development ./script/server
softwareengineer 99 (Guest)
on 2006-02-08 16:42
(Received via mailing list)
All I have in my apache conf files is:

  AddHandler fastcgi-script .fcgi
  AddHandler cgi-script .cgi

  and if I try to put
-initial-env RAILS_ENV=development

  I get an error
  "Invalid command '-initial-env', perhaps mis-spelled or defined by a
module not included in the server configuration"

  I am using Apache 2, if that helps?

  Thanks
  Frank

Harm <removed_email_address@domain.invalid> wrote:  Well I think I figured it 
out. After
the directive FastCgiServer in my
apache conf files I put -initial-env RAILS_ENV=development. Then I
removed the stale development.log file and restarted apache. This
created a new log file! NOTE: if you remove the log file and do *not*
restart apache, no new log file will appear.
Rejoice!

Guest wrote:
>>
>> Are you using development environment or other? Try setting RAILS_ENV
>> environment variable to name of environment you are using:
>>
>> $ RAILS_ENV=development ./script/server


--
Posted via http://www.ruby-forum.com/.
softwareengineer 99 (Guest)
on 2006-02-08 16:48
(Received via mailing list)
Hi �ukasz,

  Thank you very much for your tips/assistance.

  I tried the following and restarted Apache and it works!

  ENV['RAILS_ENV'] ||= 'development'

  Thanks
  Frank

Guest <removed_email_address@domain.invalid> wrote:  Well the environment is 
just
development. Nothing changed there. And the
funny thing is that Webbrick neatly logs everything. Only Apache does
not. And all the permissions are correct. The webserver can write in the
relevant directory.
Puzzlement reigns.

�ukasz Piestrzeniewicz wrote:
> On 07/02/06, Harm  wrote:
>> I do have the same problem. And tried the solution stated here but that
>> did not work. Is there a solution? This is really silly.
>
> Are you using development environment or other? Try setting RAILS_ENV
> environment variable to name of environment you are using:
>
> $ RAILS_ENV=development ./script/server

--
Posted via http://www.ruby-forum.com/.
harm (Guest)
on 2006-02-08 20:47
Just out of curiousity, where did you put
ENV['RAILS_ENV'] ||= 'development' ?

softwareengineer 99 wrote:
> Hi �ukasz,
>
>   Thank you very much for your tips/assistance.
>
>   I tried the following and restarted Apache and it works!
>
>   ENV['RAILS_ENV'] ||= 'development'
>
>   Thanks
>   Frank
softwareengineer 99 (Guest)
on 2006-02-08 21:37
(Received via mailing list)
I put it in config/environment.rb

  Thanks
  Frank

harm <removed_email_address@domain.invalid> wrote:  Just out of curiousity, 
where did you
put
ENV['RAILS_ENV'] ||= 'development' ?
This topic is locked and can not be replied to.