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

后端 未结 7 1255
梦如初夏
梦如初夏 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:43

    I was getting this error.

    I changed this line in my application.rb from:

    Bundler.require(:default, Rails.env) if defined?(Bundler)
    

    to:

    Bundler.require(*Rails.groups(:assets => %w(development test))) if defined?(Bundler)
    

    Also, make sure the files are names something.css.sass NOT something.sass

    And one other thing, I had an old compass.rb file in my config directory which isn't needed in Rails 3.2. Deleting that also solved this problem for me.

提交回复
热议问题