我读过Sinatra SASS custom directory和Sinatra custom SASS directory。
但这对我不起作用。我写了这个应用程序:
require 'sinatra'
require 'sass'
require 'slim'
configure do
set :views, :scss => 'assets/css'
end
get '/css/*.css' do
scss params[:splat].first.to_sym
end
get '/' do
slim :index
end
当我运行它时,我得到一个错误:
http://localhost:3000/css/style.css
TypeError at /css/style.css
no implicit conversion of Hash into String