Skip to content

text/x-handlebars MIME Type not supported in sprocket #148

@imechemi

Description

@imechemi

Hi, after upgrading rails from 4.2.4 to 4.2.5.1, the sprocket gem also got updated from 3.4.0 to 3.5.2. And my application broke while rendering .hamlbars file from assets.

The backtrace from app ends at this line from sprocket when the text/x-handlebars mime type is not found.

Below are the MIME types I found using puts from sprockets at that line and it doesn't have "text/x-handlebars" in the list.

{"application/javascript"=>{:extensions=>[".js"], :charset=>#<Method: Module(Sprockets::EncodingUtils)#detect_unicode>}, 
"application/json"=>{:extensions=>[".json"], :charset=>#<Method: Module(Sprockets::EncodingUtils)#detect_unicode>}, 
"application/xml"=>{:extensions=>[".xml"]}, 
"text/css"=>{:extensions=>[".css"], :charset=>#<Method: Module(Sprockets::EncodingUtils)#detect_css>}, 
"text/html"=>{:extensions=>[".html", ".htm"], :charset=>#<Method: Module(Sprockets::EncodingUtils)#detect_html>}, 
"text/plain"=>{:extensions=>[".txt", ".text"], :charset=>#<Method: Module(Sprockets::EncodingUtils)#detect>}, 
"text/yaml"=>{:extensions=>[".yml", ".yaml"], :charset=>#<Method: Module(Sprockets::EncodingUtils)#detect_unicode>}, 
"image/x-icon"=>{:extensions=>[".ico"]}, 
"image/bmp"=>{:extensions=>[".bmp"]}, 
"image/gif"=>{:extensions=>[".gif"]}, 
"image/webp"=>{:extensions=>[".webp"]}, 
"image/png"=>{:extensions=>[".png"]}, 
"image/jpeg"=>{:extensions=>[".jpg", ".jpeg"]}, 
"image/tiff"=>{:extensions=>[".tiff", ".tif"]}, 
"image/svg+xml"=>{:extensions=>[".svg"]}, 
"video/webm"=>{:extensions=>[".webm"]},
"audio/basic"=>{:extensions=>[".snd", ".au"]}, 
"audio/aiff"=>{:extensions=>[".aiff"]}, 
"audio/mpeg"=>{:extensions=>[".mp3", ".mp2", ".m2a", ".m3a"]}, 
"application/ogg"=>{:extensions=>[".ogx"]}, 
"audio/midi"=>{:extensions=>[".midi", ".mid"]}, 
"video/avi"=>{:extensions=>[".avi"]}, 
"audio/wave"=>{:extensions=>[".wav", ".wave"]}, 
"video/mp4"=>{:extensions=>[".mp4", ".m4v"]}, 
"application/vnd.ms-fontobject"=>{:extensions=>[".eot"]}, 
"application/x-font-ttf"=>{:extensions=>[".ttf"]}, 
"application/font-woff"=>{:extensions=>[".woff"]}}

I am not sure if this is handlebars_assets or sprocket issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions