title: Sass import error in Rails 3 app - "File to import not found or unreadable: compass"
body: <p>I have a Rails 3 app on which I successfully ran <code>compass init rails ./ --using blueprint</code>.  I can <code>@import</code> files from the /stylesheets directory, but I get an error when I try to <code>@import compass</code>.   </p>
  
  <p>Right now the app has two simple sass files:</p>
  
  <p><strong>common.scss</strong></p>
  
  <pre><code>$body-background: blue;
  </code></pre>
  
  <p><strong>main.scss</strong></p>
  
  <pre><code>@import "common";
  //@import "compass";
  
  body { 
    background: $body-background; 
  }
  </code></pre>
  
  <p>With the <code>@import "compass"</code> line commented out, this works -- I get a blue background, so I know Sass is working.</p>
  
  <p>If I uncomment the line, and try to import <code>compass</code> or <code>blueprint</code> or anything else, I get an error like this.</p>
  
  <pre><code>Syntax error: File to import not found or unreadable: compass.
                Load paths:
  
                  /Users/eric/path/to/myrailsapp/app/stylesheets
          on line 2 of /Users/eric/path/to/myrailsapp/app/stylesheets/main.scss
  
  1: @import "common";
  2: @import "compass";
  3: 
  4: body { 
  5:  background: $body-background; 
  6: }
  </code></pre>
  
  <p>I had through maybe I had to explicitly tell Sass where to find the Compass gem, so I added an <code>add_import_path</code> line to config/compass.rb:</p>
  
  <pre><code>require 'compass'
  require 'html5-boilerplate'
  
  project_type = :rails
  project_path = RAILS_ROOT if defined?(RAILS_ROOT)
  add_import_path "/Library/Ruby/Gems/1.8/gems/"  # unfortunately this has no effect
  
  http_path = "/"
  css_dir = "public/stylesheets"
  sass_dir = "app/stylesheets"
  images_dir = "public/images"
  javascripts_dir = "public/javascripts"
  cache_dir = "tmp/sass-cache"
  
  http_images_path = "/images"
  http_stylesheets_path = "/stylesheets"
  http_javascripts_path = "/javascripts"
  </code></pre>
  
  <p>I have been googling for two days, and can't determine why I'm having this problem with basic <code>@import</code> statements.   How do I tell Sass where to find the Compass and Blueprint libraries?</p>