Sinatra的SASS:无法设置自定义目录

时间:2013-05-14 14:24:37

标签: ruby-on-rails ruby sinatra sass rack

我看过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

1 个答案:

答案 0 :(得分:0)

反之亦然,首先是:scss符号,然后是:views

configure do
  set :scss, :views => 'assets/css'
end