我正努力让Zurb基金会工作。我尽力遵循所有指示无济于事。我已经安装了Ruby,Node和Compass.APP(生成在任务栏上的指南针) 无论我做什么,罗盘都不会看到我保存到计算机的CMS项目中的默认文件夹。 (的httpdocs / App_Themes文件/默认)
是否需要将所有内容保存到同一目录/文件夹中?我不知道该怎么做。这是一个来自Monox CMS Compass / Sass / Zurb的项目......
当我要求罗盘观看文件夹时出现错误:
Could not find 'zurb-foundation' (= 4.3.1) among 9 total gem(s)
Checked in 'GEM_PATH=', execute `gem env` for more information
/D:/compass.app.windows.1.29/compass.app/lib/java/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/dependency.rb:315:in `to_specs'
/D:/compass.app.windows.1.29/compass.app/lib/java/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/dependency.rb:324:in `to_spec'
/D:/compass.app.windows.1.29/compass.app/lib/java/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_gem.rb:64:in `gem'
D:/Default/config.rb:1:in `parse_string'
org/jruby/RubyKernel.java:1107:in `eval'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/configuration/serialization.rb:24:in `parse_string'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/configuration/serialization.rb:15:in `_parse'
org/jruby/RubyIO.java:1181:in `open'
org/jruby/RubyKernel.java:349:in `open'
/D:/compass.app.windows.1.29/compass.app/lib/java/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/1.9/open-uri.rb:35:in `open'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/configuration/serialization.rb:14:in `_parse'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/configuration/file_data.rb:7:in `new_from_file'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-core-1.0.3/lib/compass/configuration/inheritance.rb:207:in `with_defaults'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/configuration/file_data.rb:6:in `new_from_file'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/configuration/helpers.rb:19:in `configuration_for'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/configuration/helpers.rb:69:in `add_project_configuration'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/commands/project_base.rb:37:in `add_project_configuration'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/commands/project_base.rb:25:in `configure!'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/commands/project_base.rb:15:in `initialize'
D:/compass.app.windows.1.29/compass.app/lib/ruby/compass_1.0/compass-1.0.3/lib/compass/commands/update_project.rb:41:in `initialize'
file:/D:/compass.app.windows.1.29/compass.app/compass-app.jar!/ui/tray.rb:431:in `watch'
file:/D:/compass.app.windows.1.29/compass.app/compass-app.jar!/app.rb:230:in `try'
file:/D:/compass.app.windows.1.29/compass.app/compass-app.jar!/ui/tray.rb:424:in `watch'
file:/D:/compass.app.windows.1.29/compass.app/compass-app.jar!/ui/tray.rb:178:in `open_dir_handler'
anon_class25912567_585038332.gen:13:in `handleEvent'
file:/D:/compass.app.windows.1.29/compass.app/compass-app.jar!/ui/tray.rb:70:in `run'
file:/D:/compass.app.windows.1.29/compass.app/compass-app.jar!/main.rb:129:in `run_tray'
file:/D:/compass.app.windows.1.29/compass.app/compass-app.jar!/main.rb:145:in `(root)'
org/jruby/RubyKernel.java:1071:in `require'
/D:/compass.app.windows.1.29/compass.app/lib/java/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
/D:/compass.app.windows.1.29/compass.app/lib/java/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54:in `require'
以下是config.rb文件中的代码:
gem 'zurb-foundation', '=4.3.1'
require 'zurb-foundation'
require 'rgbapng'
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "javascripts"
# You can select your preferred output style here (can be overridden via the command line):
#output_style = :compressed #:expanded or :nested or :compact or :compressed
output_style = :compressed
# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
# Make a copy of sprites with a name that has no uniqueness of the hash.
on_sprite_saved do |filename|
if File.exists?(filename)
FileUtils.cp filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, '.png')
# Note: Compass outputs both with and without random hash images.
# To not keep the one with hash, add: (Thanks to RaphaelDDL for this)
FileUtils.rm_rf(filename)
end
end
# Replace in stylesheets generated references to sprites
# by their counterparts without the hash uniqueness.
on_stylesheet_saved do |filename|
if File.exists?(filename)
css = File.read filename
File.open(filename, 'w+') do |f|
f << css.gsub(%r{-s[a-z0-9]{10}\.png}, '.png')
end
end
end