Google Groups Home
Help | Sign in
Small change to config/rack.rb for latest merb-core HEAD
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Ezra Zygmuntowicz  
View profile
 More options May 13, 9:41 pm
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Tue, 13 May 2008 18:41:19 -0700
Local: Tues, May 13 2008 9:41 pm
Subject: Small change to config/rack.rb for latest merb-core HEAD
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
- Ezra Zygmuntowicz
-- Founder & Software Architect
-- e...@engineyard.com
-- EngineYard.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google