Sass::Syntaxerror: File to Import Not Found or Unreadable: Compass in Production

Sass::SyntaxError: File to import not found or unreadable: compass in production

adding this to an initializer worked for me

require 'compass'
Sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory

File to import not found or unreadable: compass in production mode

You need to precompile your assets:

bundle exec rake assets:precompile

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

Okay, after help from the amazing Chris Eppstein I was able to find the offending line. In config/environments.rb I had this line:

Sass::Plugin.options[:template_location] = {
"#{RAILS_ROOT}/app/stylesheets" => "#{RAILS_ROOT}/public/stylesheets"
}

With the currently versions of Rails (I have 3.0.7) and Compass (0.11.1) this line is not necessary. I added it after following a tutorial. If sass can't find compass, it might be because this line is messing up your Sass::Plugin.options[:template_location].

File to import not found or unreadable: compass/css3/animation

I'm waiting the good solution, but pending, I use this fix: http://joshbroton.com/quick-fix-sass-mixins-for-css-keyframe-animations/

hope helpful others.

SASS error: can't import Compass

After a month of troubleshooting, the solution ended up being simpler than expected.

I uninstalled all versions of both Sass and Compass, and then I installed the latest Compass and let it install Sass automatically.

So after doing sudo gem uninstall compass and sudo gem uninstall sass, I did sudo gem install compass. That installed both Compass and its dependencies (Sass version 3.2.19). (I'm on a Mac, so I had to use sudo.)

Solved!

Compass file to import not found

Edit your Gemfile and remove , '~> 3.2.3' from the gem 'sass-rails' line. Run 'bundle update sass-rails'. This will update sass-rails to version 3.2.6 (current as of 5/31/2013), which seems to know where to find the compass files.

Error: File to import not found or unreadable: ~bootstrap/scss/bootstrap

When Sass is precompiled by its own CLI, it processes @imports by itself, and sometimes thus doesn’t understand ~ notation. So you can import "node_modules/bootstrap/scss/bootstrap"; in first place and replaced the ~
notation with node_modules/ instead.



Related Topics



Leave a reply



Submit