Logging And Environment

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

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

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 [email protected] wrote:

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


[ munkywrench development ]
http://munkywrench.co.nz
[email protected]
(027) 424 5433

I tried changing the permissions… both the /log/ dir and the files
inside it are 777… no dice

On 4/8/06, Nik W. [email protected] wrote:

production / testing / development) - I’m not sure what RAILS_ENV is

[ munkywrench development ]
http://munkywrench.co.nz
[email protected]
(027) 424 5433


[ munkywrench development ]
http://munkywrench.co.nz
[email protected]
(027) 424 5433