Sass import error in Rails 3 app - "File to import not found or unreadable: compass" Sass import error in Rails 3 app - "File to import not found or unreadable: compass" ruby-on-rails ruby-on-rails

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


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.


I fixed this problem by switching to the compass-rails gem instead of the compass gem in my Gemfile (don't forget to reboot your server). Just in case someone might come across here.


I fixed this error after banging my head over it

I commented this line in my application.rb from:

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

and uncommented:

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

I am using Rails 3.2.11