Forum: Ruby on Rails Logging And Environment

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.
Nik W. (Guest)
on 2006-04-07 17:56
(Received via mailing list)
Hi All,

Couple easy questions:

1. How do I view what environment my app is running under (i.e
production / testing / development) - I'm not sure what RAILS_ENV is
set at, how to I take a look at it?

2. Somehow (?) I have turned logging "off". I'd like to have it back
on :s I have files called production.log, test.log, server.log,
development.log in  /myapp/log/ but they are all 0 byte files. Doing a
"tail -f production.log" just brings up nothing as nothing seems to be
being added to it.

Help?

Thanks,

Nik
Jeff C. (Guest)
on 2006-04-07 18:03
Nik W. wrote:
> Hi All,
>
> Couple easy questions:
>
> 1. How do I view what environment my app is running under (i.e
> production / testing / development) - I'm not sure what RAILS_ENV is
> set at, how to I take a look at it?

Nik,

Not sure about your logging problem, but the environment can be found
with:

ENV["RAILS_ENV"]

Jeff C.man
Nik W. (Guest)
on 2006-04-07 18:18
(Received via mailing list)
Ok cool so that fixed that... I now know I'm running in production...
so what happened to my logs?

On 4/8/06, Jeff C.man <removed_email_address@domain.invalid> wrote:
>
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
[ munkywrench development ]
http://munkywrench.co.nz
removed_email_address@domain.invalid
(027) 424 5433
Nik W. (Guest)
on 2006-04-07 18:18
(Received via mailing list)
I tried changing the permissions.. both the /log/ dir and the files
inside it are 777... no dice

On 4/8/06, Nik W. <removed_email_address@domain.invalid> wrote:
> > > production / testing / development) - I'm not sure what RAILS_ENV is
> >
> [ munkywrench development ]
> http://munkywrench.co.nz
> removed_email_address@domain.invalid
> (027) 424 5433
>


--
[ munkywrench development ]
http://munkywrench.co.nz
removed_email_address@domain.invalid
(027) 424 5433
This topic is locked and can not be replied to.