You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Padrino app (I don't know if it's important) and I added a css asset. When running in development mode, everything is fine, when running in production, it gives an error:
ArgumentError - unknown encoding name - TEXT/CSS:
/home/sashee/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-assetpack-0.3.2/lib/sinatra/assetpack/package.rb:112:in `force_encoding'
/home/sashee/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-assetpack-0.3.2/lib/sinatra/assetpack/package.rb:112:in `block in combined'
/home/sashee/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-assetpack-0.3.2/lib/sinatra/assetpack/package.rb:108:in `map'
/home/sashee/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-assetpack-0.3.2/lib/sinatra/assetpack/package.rb:108:in `combined'
/home/sashee/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-assetpack-0.3.2/lib/sinatra/assetpack/package.rb:94:in `minify'
/home/sashee/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-assetpack-0.3.2/lib/sinatra/assetpack/class_methods.rb:32:in `block (3 levels) in add_compressed_routes!'
...
I have a Padrino app (I don't know if it's important) and I added a css asset. When running in development mode, everything is fine, when running in production, it gives an error:
I've traced down the error till this:
https://github.com/rstacruz/sinatra-assetpack/blob/master/lib/sinatra/assetpack/package.rb#L112 . Here, the response_encoding is TEXT/CSS, and result.content_type is text/css . I think it should have a charset, and for the javascript files it indeed has.
The workaround I use is to set the utf-8 encoding to every css files:
It's bit of a hack, but it's working this way.
The text was updated successfully, but these errors were encountered: