Small change to config/rack.rb for latest merb-core HEAD

2 views
Skip to first unread message

Ezra Zygmuntowicz

unread,
May 13, 2008, 9:41:19 PM5/13/08
to me...@googlegroups.com
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
-- ez...@engineyard.com
-- EngineYard.com
- Ezra Zygmuntowicz
-- Founder & Software Architect
-- ez...@engineyard.com
-- EngineYard.com

Reply all
Reply to author
Forward
0 new messages