嗨,我在 rails 3 中使用 jammit 进行 js 和 css 压缩。我收到此错误:
ActionView::Template::Error (assets.yml does not contain a "base" CSS package):
9: <% if @content_keywords %><meta name="keywords" content="<%= @content_keywords %>" /><% end %>
10: <% if @content_description %><meta name="description" content="<%= @content_description %>" /><% end %>
11: <meta name="robots" content="index,follow" />
12: <%= include_stylesheets :base %>
13: <%= csrf_meta_tag %>
14: </head>
15: <body>
文件 assets.yml 包含以下代码:
package_assets: on # (on, off, always)
#embed_assets: on # (on, off, datauri)
compress_assets: on # (on, off)
gzip_assets: on # (on, off)
template_function: _.template # (defaults to the built-in micro-templating)
package_path: packages # (defaults to assets)
javascript_compressor: yui # (yui, closure)
stylesheets:
base:
- public/stylesheets/main_min.css
javascripts:
base_en:
# - public/javascripts/libs.no_min.js
- public/javascripts/jquery.innerfade.js
- public/javascripts/jquery.color.js
- public/javascripts/jquery.timeago.js