slim
slim copied to clipboard
Embedded sass: won’t work with sass-embedded
Reproduction
Gemfile:
source "https://rubygems.org"
gem "sass-embedded", "1.54.5" # newest on 2022/08/29
gem "slim", "4.1.0" # newest on 2022/08/29
test code:
require "bundler"
Bundler.require
template = Slim::Template.new{ <<~SLIM }
doctype html
meta charset="utf-8"
title test sass: in Slim
sass:
body
background: orange
h1 Hello
SLIM
Result
/Users/XXXXX/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sass-embedded-1.54.5/lib/sass/embedded.rb:187:in `compile_string': unknown keyword: :cache (ArgumentError)
from /Users/XXXXX/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sass-embedded-1.54.5/lib/sass/embedded.rb:47:in `compile_string'
from /Users/XXXXX/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/tilt-2.0.11/lib/tilt/sass.rb:37:in `evaluate'
from /Users/XXXXX/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/tilt-2.0.11/lib/tilt/template.rb:109:in `render'
from /Users/XXXXX/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/slim-4.1.0/lib/slim/embedded.rb:157:in `tilt_render'
Cause
Slim::Embedded::SassEngine#tilt_render uses cache
option.
Sass::Embedded#compile_string does not accept cache
option.