gpt4 book ai didi

ruby-on-rails - Sinatra 中的 SASS : couldn't set custom directory

转载 作者:太空宇宙 更新时间:2023-11-03 16:53:04 25 4
gpt4 key购买 nike

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

最佳答案

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

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

关于ruby-on-rails - Sinatra 中的 SASS : couldn't set custom directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16545799/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com