2

我读过Sinatra SASS custom directorySinatra 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
4

1 回答 1

0

反之亦然,第一个:scss符号,然后:views

configure do
  set :scss, :views => 'assets/css'
end
于 2014-10-23T08:52:16.873 回答