I am trying to upgrade a rack-based project to use 0.9, and am having
a problem w/ the new MIME_TYPE support. On start up of the app, I get
the following error:
I looked around in the specs, the readme, mime, and utils, and could
not find a definition of this constant. There were references in
Rack::Mime, but that's it.
On the one hand I suspect there is missing source, but OTOH I suspect
that my rack ignorance may be a better culprit. Any advice as to what
I am overlooking would be greatly appreciated.
> I am trying to upgrade a rack-based project to use 0.9, and am having > a problem w/ the new MIME_TYPE support. On start up of the app, I get > the following error:
Hi Tom,
The MIME_TYPES constant got shuffled around in this release. You might be able to work around it by adding the following somewhere in your app:
require 'rack/file' class Rack::File MIME_TYPES = Hash.new { |hash, key| Rack::Mime::MIME_TYPES[".#{key}"] } end
On Wed, Jan 7, 2009 at 12:30 AM, Ryan Tomayko <r...@tomayko.com> wrote:
> On 1/6/09 2:33 PM, Tom M wrote: >> I am trying to upgrade a rack-based project to use 0.9, and am having >> a problem w/ the new MIME_TYPE support. On start up of the app, I get >> the following error:
> Hi Tom,
> The MIME_TYPES constant got shuffled around in this release. You might > be able to work around it by adding the following somewhere in your app:
> require 'rack/file' > class Rack::File > MIME_TYPES = Hash.new { |hash, key| > Rack::Mime::MIME_TYPES[".#{key}"] } > end
> On Wed, Jan 7, 2009 at 12:30 AM, Ryan Tomayko <r...@tomayko.com> wrote:
> > On 1/6/09 2:33 PM, Tom M wrote:
> >> I am trying to upgrade a rack-based project to use 0.9, and am having
> >> a problem w/ the new MIME_TYPE support. On start up of the app, I get
> >> the following error:
> > Hi Tom,
> > The MIME_TYPES constant got shuffled around in this release. You might
> > be able to work around it by adding the following somewhere in your app: