从Rails 2升级到Rails 3后,运行RAILS_ENV=production bundle exec rake assets:precompile
时出现以下错误:
rake aborted!
Undefined mixin 'linear-gradient'.
配置/ application.rb中:
config.assets.enabled = true
配置/环境/ production.rb:
config.assets.compress = true
config.assets.compile = true
config.assets.digest = true
的Gemfile:
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'uglifier', '>= 1.0.3'
end
gem "compass-rails"
配置/ compass.rb:
project_type = :rails
project_path = Compass::AppIntegration::Rails.root
http_path = "/"
css_dir = "public"
sass_dir = "app/assets/stylesheets"
environment = Compass::AppIntegration::Rails.env
当我尝试使用bundle exec compass compile
编译资产时,它运行时没有任何错误。有没有人有想法?
答案 0 :(得分:0)
您可能需要将以下行添加到application.rb
config.assets.precompile << /(^[^_]|\/[^_])[^\/]*$/