Steffen Hi, the name's Steffen and I'm writing about the Web, programming and all those things coming to my mind. Enjoy your stay.

I'm currently working on fabidoo.com - 3D Printing for everyone!

Archive for the ‘Coding’ Category

Redirecting $stdout to Logger with Ruby on Rails

Thursday, November 16th, 2006

Ruby on Rails on FastCGI on Apache is a pretty fast and robust combination. Unfortunately FastCGI do doesn’t like output on “standard out”, i.e. $stdout in Ruby. Brian Pontarelli has an article concerning the problem. His suggestion is to simply have no puts in your code. The standard lib of Ruby however sometimes prints exceptions to the console - REXML is one popular example.

Brian also mentions the idea to redirect anything printed to $stdout to a logger. That means however, that all output given by web servers like Webrick would also end up in some log file - which isn’t the best thing for your development and debugging sessions.

Eric Hodel on the other hand found a pretty nice way to redirect $stdout for only some Ruby threads.

Using those two techniques I came up with a solution that turns on $stdout redirection with the beginning of an HTTP request and turns it off once the Rails controller finished its work. Problem solved ;-) - everything printed to $stdout in your controllers will end up in your development/production/test.log. (more…)

RUZEE.LayoutManager v0.1 goes public

Friday, November 3rd, 2006

A new JavaScript jewel: RUZEE.LayoutManager lets you build web applications that have the style of a desktop application. You don’t need any JavaScript knowledge to use it. Just include the script, add some CSS class definitions to your HTML source or stylesheet and you’re ready to do Java like border layouts inside the browser.
Have a look at the example and download the MIT licensed source code here.

Tags: , , , ,

RUZEE.Borders version 0.16

Saturday, September 30th, 2006

Version 0.15 had some trouble in IE where it let the content of a bordered element jumped when using “onhovered” elements. That even happend on my page - cheers Russ for the bug report.

The new version 0.16 fixes that. It was an issue with the relative positioning that RUZEE.Borders use since version 0.14. Peekaboo!

The new version also got some major refactorings. Most of the methods are private now - please tell me when something you’ve used previously is no longer public. Due to the refactorings I’ve managed to reduce the size of RUZEE.Borders by approx. 700 bytes.

Tags: , , , , ,

You are currently browsing the archives for the Coding category.

53733