Sass import error in Rails 3 app - “File to import not found or unreadable: compass”

后端 未结 7 1265
梦如初夏
梦如初夏 2020-12-03 07:23

I have a Rails 3 app on which I successfully ran compass init rails ./ --using blueprint. I can @import files from the /stylesheets directory, but

7条回答
  •  天涯浪人
    2020-12-03 07:41

    Okay, after help from the amazing Chris Eppstein I was able to find the offending line. In config/environments.rb I had this line:

    Sass::Plugin.options[:template_location] = {
    "#{RAILS_ROOT}/app/stylesheets" => "#{RAILS_ROOT}/public/stylesheets"
    }
    

    With the currently versions of Rails (I have 3.0.7) and Compass (0.11.1) this line is not necessary. I added it after following a tutorial. If sass can't find compass, it might be because this line is messing up your Sass::Plugin.options[:template_location].

提交回复
热议问题