"use MyMiddleware" inside of a "configure" block in development mode
0 views
Skip to first unread message
Chris Sepic
unread,
Aug 7, 2009, 12:16:12 PM8/7/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sinatrarb
Some sample code:
configure :development, :stage do
use Rack::ShowExceptions
end
configure :production do
use Rack::MailExceptions { ... }
end
Calling 'use' inside of a configure block in development mode (works
with other envs) will not include the middleware. Could someone
explain why? I'm not sure if this is even the way to go about it, as I
did see in the docs that 'use' should be top level.
Thanks, Chris
Simon Rozet
unread,
Aug 7, 2009, 3:52:21 PM8/7/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sina...@googlegroups.com
I didn't try but I think that's because Rack::ShowExceptions gets overridden by Sinatra::ShowExceptions which is enabled in development env.