在Sinatra中为数组使用未定义的方法'encode'

时间:2014-02-12 10:04:14

标签: ruby sass sinatra

我正试图在我的Sinatra网站上使用sass,但是在尝试转换文件时出现错误:

对于[]:Array

未定义的方法`encode'

get '/css/:stylesheet.css' do |stylesheet|
  content_type 'text/css', charset: 'utf-8'
  sass :"css/#{stylesheet}" # this is the line that crashes
end

数组被标记为空,因为我请求的文件(site.css)为空,如果我将内容放入文件中,则该数组具有对象ID。

任何想法?

0 个答案:

没有答案