Odd behavior when serving static content with Merb

While running up my latest Merb app in staging I was seeing some odd behaviour serving stylesheets. Specifically I was getting the following exception:

Not Acceptable 406
A format (css) that isn't provided (html) has been 
requested. Make sure the action provides the format, 
and be careful of before filters which won't recognize 
formats provided within actions.

Looking through the logs it looked as though Merb was routing requests to all things under public/ to actual controllers:

 ~ Start: Sat May 31 06:03:05 EDT 2008
 ~ Routed to: {:action=>"foobar", :controller=>"stylesheets", :format=>"css", :id=>nil}
 ~ Controller 'Stylesheets' not found - (Merb::ControllerExceptions::NotFound)

Trawling the tubes managed to yield this fix. Add the following line to the beginning of your config/rack.rb and you'll be right as rain.

# comment this out if you are running merb behind a load balancer
# that serves static files
use Merb::Rack::Static, Merb.dir_for(:public)

Update: Katz has pointed out that it's a problem with Merb 0.9.3 apps that were generated with 0.9.2. Copy the boot.rb from a clean 0.9.3 app and the problem is resolved.