2
我正在将应用程序从Rails 3.0升级到3.1。我们一直在使用Compass和scss。为什么我无法将资产路径助手与sass-rails和资产管道一起使用?
我得到一个错误,当我做以下两个:
- 使用
sass-rails
帮手,就像image-path
- 使用
config.sass.load_paths
在application.rb
告诉它在哪里可以找到之类的东西蓝图。
例如:
config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets"
,我得到的错误是这样的:
undefined local variable or method `config' for #<Sass::Script::Functions::EvaluationContext::0x00000105102998>
我有这个在我的Gemfile:
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
gem 'compass', '0.11.5'
end
...这是究竟是由Rails 3.1.1生成的。
这里有什么问题?