我遇到了一个奇怪的问题。Rails 似乎没有考虑我在 config/compass.rb 中的任何修改。所有图像都是从 assets (exp assets/image.png) 加载的,而它们应该从 assets/images/ 加载,如下面的 compass.rb 所示:
project_type = :rails
http_path = "/"
project_path = "."
css_dir = "app/assets/stylesheets"
sass_dir = "assets/stylesheets"
images_dir = "assets/images"
javascripts_dir = "assets/javascripts"
fonts_dir = "assets/fonts"
output_style = (environment == :production) ? :compressed : :expanded
谢谢