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生成的。
這裏有什麼問題?