当我尝试在构建中添加js和css文件时,我使用middleman命令时收到错误

时间:2017-04-19 14:50:57

标签: ruby backbone.js coffeescript haml middleman

需要以下几点的帮助

1.当我试图运行中间人命令我面临这个问题时,任何人都可以请求帮助 问题 2.我已经在我的js文件夹中添加了slick.js并尝试运行构建我能够看到js文件但是它不是引用的内容 2.还需要添加CSS文件

请在以上几点帮助我

a = raw_input("please type 1 or 0")
while a != 0 or 1:
    print"please retype"
    a = raw_input("please type 1 or 0")
print "thanks"

以下是config.rb,您可以看到以下代码     config.rb

C:\interface_project>middleman
WARN: Unresolved specs during Gem::Specification.reset:
thor (< 2.0, >= 0.17.0)
rack (< 3, >= 1.4.5)
activesupport (< 5.1, >= 3.1, >= 4.2)
addressable (> 2.3)
listen (> 3.0.0)
sass (>= 3.4)
execjs (< 3, >= 0.3.0, > 2.0)
concurrent-ruby (> 1.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
C:/interface_project/config.rb:13:in evaluate_configuration!': undefined methodcompass_config' for #Middleman::ConfigContext:0x000000047f2a70 (NoMethodErro
r)
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/mid
dleman-core/application.rb:329:in instance_eval' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/mid dleman-core/application.rb:329:inevaluate_configuration!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/mid
dleman-core/application.rb:286:in initialize' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/middleman-cli-4.2.1/bin/midd leman:49:innew'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/middleman-cli-4.2.1/bin/midd
leman:49:in ' from C:/Ruby23-x64/bin/middleman:22:inload'
from C:/Ruby23-x64/bin/middleman:22:in `

1 个答案:

答案 0 :(得分:0)

这与Slick.js没有任何关系......错误告诉你compass_config未定义。

试试这个:

gem "middleman-compass"添加到您的Gemfile

运行bundle install

如果没有解决问题,请尝试在activate :compass阻止之前放置compass_config do |config|