4
votes

I'm running a Rails 4 app and trying to get compass and susy running. I'm getting the following error:

File to import not found or unreadable: susy.

My gemfile group:

group :assets do
  gem 'sass-rails',   '~> 4.0.0.beta1'
  gem 'compass-rails'
  gem 'susy'
  ...
end

The only CSS line I have (_base.sass)

@import susy

I've run Bundle Install, and my app is using:

Using compass-rails (1.0.3) 
Using susy (1.0.7) 

Completely lost. I don't have a config.rb file for compass, but from what I gather it isn't necessary after like Rails 3.1/3.2. Any ideas?

1
Did you require "susy" anywhere in your application?silvenon
Shouldn't be needed with a rails application, but I did try under config/compass.rb. No changeuser1769426
@NicolasMcCurdy that issue does not appear to be rails related and is 2 years old.Joshua Kolden

1 Answers

0
votes

You can found the solution in the compass-rails gem documentation:

You have to add the gem compass-susy-plugin instead of susy, like this:

# Gemfile
…
gem 'compass-rails'
gem 'compass-susy-plugin'
…

If you are using Rails 4 do not use group :asset, it has been removed, simply add the previous lines to the Gemfile.

Then run:

$ bundle
$ bundle exec compass install susy

These previous lines will generate files that require susy for you.

And finally add this to your application.rb:

# config/application.rb
config.compass.require "susy"