Re: File to import not found or unreadable: susy (again!)

3,386 views
Skip to first unread message

Eric Meyer

unread,
Nov 16, 2012, 1:11:52 PM11/16/12
to compas...@googlegroups.com
I'm failry certain the config file has to be at the root of your project. If Compass can't find the config, it won't see the "require" line, and won't be able to find Susy either.

-e

On Tuesday, November 13, 2012 11:30:03 AM UTC-7, gcaplan wrote:
Hi

This seems to come up from time to time but the fixes mentioned haven't worked for me. I'm not a sysadmin or a Ruby user so I'm stuck on a mission-critical project. I would be **very** grateful for any help with this!

I'm running Ruby 1.9.3 (compiled - not a package), and Gem 1.8.23 (does it matter that they're out of sync?).

I installed Compass & Susy as:

> gem install compass
> gem install susy

I removed an old Compass rpm package, but it may have left some legacy data files.

I don't want to use the Compass project directory structure - this is probably the cause of my issue. My directories are:

/css
/css/config.rb
/sass
/sass/my_project.scss

In config.rb I have the line: "require 'susy'"

Compass partials are importing fine. But when I try to import susy into my project I get:

  1 ||  File to import not found or unreadable: susy.
  2 ||                 /var/www/wr.dev
  3 ||                 /var/www/wr.dev/sass
  4 ||                 /var/lib/gems/1.9.1/gems/compass-0.12.2/frameworks/blueprint/stylesheets
  5 ||                 /var/lib/gems/1.9.1/gems/compass-0.12.2/frameworks/compass/stylesheets
  6 ||                 Compass::SpriteImporter

For some reason the paths shown here don't square with the version I see when I run >ruby -v

Susy is installed at:

/var/lib/gems/1.9.1/gems/susy-1.0.4/sass/_susy.scss

I've tried the brute-force config setting: 

add_import_path "/var/lib/gems/1.9.1/gems/susy-1.0.4/sass"

I've also tried the fix of creating a Compass project in the same root directory. 

This is a real roadblock: please help!

Eric Meyer

unread,
Feb 19, 2013, 12:55:26 PM2/19/13
to compas...@googlegroups.com
What is the output of "gem list" in the command line, or are you using a third-party GUI to run Compass? 

On Tuesday, February 19, 2013 3:06:02 AM UTC-7, Clara wrote:
I am having the same problem also, I spent 2 days looking for a solution and tried all the fixes I could find but still nothing...

I did everything with de "default" values, created a new compass project with the default compass project directory structure. I have a config.rb file at the root of my project with "require 'susy'" on it.

But still I get this errors:

error sass/_base.scss (Line 4: File to import not found or unreadable: susy.
Load paths:
  /Users/clara/Documents/git/Susy/SusyProject
  /Users/clara/Documents/git/Susy/SusyProject/sass

It's really a pity because I would like to start using Susy so much and I can't because of that misterious error no-one seems to know about...

Clara

unread,
Feb 20, 2013, 4:51:46 AM2/20/13
to compas...@googlegroups.com
I am not using a third-party GUI, I tried to install and run everything from the command line. The "gem list" output is:

*** LOCAL GEMS ***

chunky_png (1.2.7, 1.2.6)
compass (0.12.2)
compass-boilerplate-plugin (0.1.0)
compass-rails (1.0.3)
fssm (0.2.10, 0.2.9)
rubygems-update (1.8.25)
salsa (0.0.1)
sass (3.2.5, 3.2.1)
susy (1.0.5)
zen-grids (1.3)


Thanks for your help, I hope the problem is that I'm just missing something and can be easily solved.

kashyap k

unread,
Feb 20, 2013, 8:03:28 AM2/20/13
to compas...@googlegroups.com
Okay, this might be a silly question. If this error is being thrown when running "compass watch", are you running the command from where ever the "config.rb" file is present? I ran across this error while using foundation gem and this _might_ be the same. Running the command inside the folder in which the config file was present fixed it for me. 


--
Kashyap KMBC

Clara

unread,
Feb 20, 2013, 10:07:25 AM2/20/13
to compas...@googlegroups.com
Hey Kashyap, thanks for answering. 

No question is silly if it helps and yours made me realize I was actually running "sass --watch" instead of "compass watch". As it's my first project with Compass I didn't really thought about it. Silly me! So I tried running "compass watch" and "compass compile" though the command line, inside the same folder where the "config.rb" is present. Both compass commands output no errors and everything seems to be working now! I feel both happy and ashamed ^^


Just to mention it, though, I started to use Codekit just in case using a third-party GUI helped solving the problem, and when Codekit compiles my project I'm still getting the same error:

Compass was unable to compile one or more files in the project: 

LoadError on line 161 of /Applications/CodeKit.app/Contents/Resources/engines/compass/bin/../lib/compass/configuration/data.rb: no such file to load -- susy
Run with --trace to see the full backtrace

I know maybe it's a Codekit issue so I'm just pointing it.

Eric Meyer

unread,
Feb 21, 2013, 12:44:20 PM2/21/13
to compas...@googlegroups.com
Third party GUI's are all funny about plugins. They don't use the gems installed in your command line. I think many of them do come with Susy pre-packaged, and some allow you to set up external plugins, but I don't really know the details.

-e

2la...@ianhobbs.net

unread,
Feb 21, 2013, 7:15:04 PM2/21/13
to compas...@googlegroups.com
Hi, Codekit doesn't come pre packaged with Susy. You need to install the gem command style. Then point to the install with the line below in your config.rb file in the root of your project.
require "/somewhere in your machine/Gems/1.8/gems/susy-1.0.3/lib/susy.rb"

Never had any problems using this method.

Cheers i

--
You received this message because you are subscribed to the Google Groups "Compass" group.
To unsubscribe from this group and stop receiving emails from it, send an email to compass-user...@googlegroups.com.
To post to this group, send email to compas...@googlegroups.com.
Visit this group at http://groups.google.com/group/compass-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ron Jonk

unread,
Jun 13, 2013, 5:00:07 AM6/13/13
to compas...@googlegroups.com
Sublime-text2 live reload package generates a new css file in the same directory as the sass file and if he cannot find a config.rb in the same folder it will be generated too. It is not looking in the root settings of your project. So it will look for the extra gems in the default paths for searching for partials.
You can fix the extra error by adding the path to the newly generated config.rb : add_import_path "/Library/Ruby/Gems/1.8/gems/zen-grids-1.4/stylesheets". But it will generate an extra css file in the same folder as the sass file still and not in the folder you defined in the main project folder. Maybe somebody knows how to set the search folder to the extra gems to prevent live reload to generate the unnecessary files.


2013/6/8 Frontendplace <chat.r...@gmail.com>
I had the same problem with importing Zen-grids to my project. With the exact same error message.
But strangely I get a generated CSS with errors in my Sass folder with this error and a correct one in my stylesheets folder.
Syntax error: File to import not found or unreadable: zen.
              Load paths:
                /Users/myprojectfolder/sass
                /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/blueprint/stylesheets
                /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets
                Compass::SpriteImporter
 I tried reinstalling all gems and go back reinstalling the Ruby folder from my timemachine and that did not work for me. I was also using Codekit. What I tried was stopping Codekit and using watch via command line and that did not solve it. Then I stopped the watching on my folder so in my opinion nothing was generating my css file and changed the scss file and again a css with this same error was generated. What the xxx who was generating my error css??.
The solution for me was in my editor. Sublime Text2. I had installed the "Sass", "SASS Build" and "Compass" package inside my Sublime Text2 editor and my editor was generating the error file every time. Editing the scss file with any other editor and using Codekit or just a watch on the folder did NOT generate the error file anymore. So I tried to uninstall all sass related packages and still the error file was generated somehow.. It turned out to be the "live reload" package inside Sublime Text2 that generated the error file. Why? I don't know yet. But only when importing the extra zen gem. Using only compass and sass doesn't give me problems? Anybody know what can cause livereload to give this problem ? is there a problem with authorisation ?

Op dinsdag 13 november 2012 19:30:03 UTC+1 schreef gcaplan het volgende:

--
You received this message because you are subscribed to a topic in the Google Groups "Compass" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/compass-users/HGIj-VuntGs/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to compass-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages