views:

115

answers:

2

I've written this HAML:

%script{:src => "http://www.google.com/jsapi?key=mykey" :type => "text/javascript"}

Note the missing comma between :src and :type.

On my Production server (Dreamhost/Linux), I get the following logged exception when I try to view the page:

ActionView::TemplateError (compile error
/home/.kuce/sugarthrill_stage/site/releases/20090927200712/app/views/layouts/standard.haml:6: syntax error, unexpected ':', expecting ')'
haml_temp = _hamlout.push_script(haml_temp, false, false, false, false, false);_hamlout.open_tag("script", false, true, false, false, {}, false, false, nil, nil, :src => "http://www.google.com/jsapi?key=ABQIAAAAynKnt9hv30uxjfbUx9X4DBRU8FW8TmMUFf4GF0BysDPVLHB6-RQwlOJobSWKbilPiM4dB6xk_4JbgQ" :type => "text/javascript");

However, I don't see this error on my Development server (Local OS X, WeBRICK); I see the (correctly-rendered) page.

This is a bit disturbing. Is there any reason that this compilation error would be suppressed on development?

A: 

Well that is confusing. I probably can't help you, but I would suggest that if you want to see closer similarities to the way you develop to production systems you should use a server that is considered production ready, and if you can, the same server as your production box.

railsninja
+1  A: 

I've got a fix for this that I'll submit as soon as GitHub comes back online. It'll be released as part of Haml 2.2.6, which will be sent out some time today or tomorrow.

Thanks for the bug report!

Edit: This is now fixed in commit f1a6cc9.

Edit 2: This has now been released as part of Haml 2.2.6.

nex3
That did it; thanks!
Craig Walker