开发者

Rendering sass template from a sinatra app doesn't work. Is this due to v.1 incompatibility? Workaround?

开发者 https://www.devze.com 2022-12-26 23:44 出处:网络
get \'/stylesheets/style.css\' do header \'Content-Type\' => \'text/css; charset=utf-8\' sass :style
get '/stylesheets/style.css' do
  header 'Content-Type' => 'text/css; charset=utf-8'
  sass :style
end

does not produce the stylesheet anymore.

What would be a version 1.0 compatible way to do this? Or, troubleshooting suggestions if you think that the issue is with the code?

The style.sass file is in the /views f开发者_如何学Goolder. Haml files from the same folder render OK.

Thank you.


Got it, seems that the header line is deprecated/unnecessary and causes an error.

So, this worked

get '/stylesheets/style.css' do
  sass :style
end
0

精彩评论

暂无评论...
验证码 换一张
取 消