I have encountered a nasty quirk in a Rails project today, where two HTML elements would have a gap between them in development environment, but no gap in production. The problem seems to be HTML whitespace.
Haml has a so called 'ugly' rendering mode, which renders HTML with no indentation. Ugly rendering is on by default in production environments and off in development. The truth is, you don't really need nice HTML indentation in development mode: both Safari and Chrome Web inspectors will indent HTML for you automatically. Therefore the only thing you are likely to notice after turning ugly rendering on is faster HTML rendering speed!
So go ahead and put this in your
Haml::Template.options[:ugly] = true