On Edge Merb? You'll need to Rack Up

May 14, 2008 | Reporter: hassox

The config/rack.rb file has been updated in edge Merb. You'll need to upgrade if you like it on the edge.

I’ve reproduced Ezra’s original announcement for your convenience.

Hey Folks- 

Small change to the way merb uses rack internally. We've split apart   
the rack app into a bunch of middleware rather then a monolithic   
adapter. THis means you will need to update your config/rack.rb in   
yoru app or you won't get any statis assets served when you hit merb   
directly. 

So either update your rack.rb to look like this: 

# use PathPrefix Middleware if :path_prefix is set in Merb::Config 
if prefix = ::Merb::Config[:path_prefix] 
  use Merb::Rack::PathPrefix, prefix 
end 

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

# this is our main merb application 
run Merb::Rack::Application.new 

Or remove the config/rack.rb  altogether from your app. 

Cheers- 

- Ezra Zygmuntowicz 
-- Founder & Software Architect 
-- e...@engineyard.com 
-- EngineYard.com 

Comment On On Edge Merb? You'll need to Rack Up

Sign in to make your voice heard