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
Rails 3.1 - Has_And_Belongs_To_Many Deprecated
Faulty Ruby Compilation with Rvm: Getting 'Undefined Symbol: Rb_Digest_Md5_Init' While Running Racku
Ruby on Rails Send_File Doesn't Work Until I Refresh the Page
Extract All Email Addresses from Some .Txt Documents Using Ruby
How to Run a Single Test/Spec File in Rspec
How to Install Ruby 2.1.4 on Ubuntu 14.04
Ruby Design Pattern: How to Make an Extensible Factory Class
How to Elegantly Rename All Keys in a Hash in Ruby
Rails - Redirecting Console Output to a File
Undefined Namespace Prefix in Nokogiri and Xpath
Why Won't a Longer Token in an Alternation Be Matched
How to Configure Ruby to Enter the Debugger on Ctrl-C (Sigint)
Remove from the Array Elements That Are Repeated
Downloading Existing Paypal Payments with Rest API
How to Make 'Whenever' Gem Work on Windows