Mariano Kamp
2006-May-18 19:03 UTC
[Rails] SOLVED: Re: How to debug the rendering in Rails?
It seems to be working now. I used "puts" debug statement that were rendered to the webrick console in the dev environment, but that made fastcgi trip ... Cheers, Mariano On 5/18/06, Mariano Kamp <mariano.kamp@gmail.com> wrote:> > Hi, > > I have some controller code like this: > > def mailing_lists > @ml = MailingList.find_by_identifier(@params[:id]) > @messages = @ml.messages > @headers["Content-Type"] = "application/atom+xml" > @response.headers[''Last-Modified''] = @ > messages.last.created_on.httpdate unless @messages.empty? > > minTime = Time.rfc2822(@request.env["HTTP_IF_MODIFIED_SINCE"]) rescue > nil > if minTime and @ messages.first.created_on <= minTime > render :text => ''Not Modified'', :status => 304 > end > end > > This works fine in development, but not in production. The funny thing > is that tailing production.log I can see that http status code 200 or 304 > is returned, but in the apache access log I can see that 500 is returned. > The latter is what I can also see in the browser. > > I am wondering how to debug that... Putting rescues anywhere in the > above mentionend code has no effect. So I guess it is in the render method > that is called when no other explicit render invocation happend before? > > I also don''t see anything I print with puts. In the dev environment and > webrick I can see this output in the webrick console, but in production > (apache, fastcgi) I don''t know where to find this output. access.log , > error.log, production.log and the fastcgi logs don''t contain my puts > output. > > Any ideas? > > Cheers, > Mariano >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060518/5c47d198/attachment-0001.html
Seemingly Similar Threads
- How to debug the rendering in Rails?
- Best Forum? Was: Migration doesn''t seem to preserve create_table options in schema
- Does TMail support Nested Multipart Messages? (Repost)
- Interesting differences between Windows and Linux
- Rails Plugins: Why to register your own functionality with send()?