Error: File to import not found or unreadable: fancy-buttons


I am seting up an existing rails project. But found an error below on installation.

Error: File to import not found or unreadable: fancy-buttons.

ActionView::Template::Error (File to import not found or unreadable: fancy-buttons.
Load paths:
(in  /home/cis/Desktop/manish1/hamlncompass/app/assets/stylesheets/partials/_buttons.sass)):
Problem courtesy of: Manish Shrivastava


I had a similar problem, and the change involved changing:

@import filename to @import filename.css.sass

Solution courtesy of: Jonathan


I had trouble getting a production server to work (both a local Apache/Passenger setup and the built-in WEBrick server).

The browser was redirected to the 500.html error page, and the log kept saying [GET /] miss. When I reloaded the page repeatedly, eventually I would receive an output similar to what Manish reported.

My Sass files each contained an @import 'base' statement to load common color and font definitions. Changing this to @import 'base.css.scss' and having config.assets.compile = true in config/environments/production.rb made both production servers work.

Discussion courtesy of: bovender

Given that your system is looking for the partial file, either the manifest for your stylesheets isn't getting precompiled, or this isn't your answer:

I just had a similar problem with a system that worked fine in development, but not in production with assets precompiled. I had used a secondary layout for my sign up/in pages that included it's own manifest file for the stylesheets. Since rake assets:precompile only compiles application.css by default, my signup.css wasn't precompiled and I got an error similar to yours when I hit the sign in page.

I fixed this by adding the following line to config/application.rb:

config.assets.precompile += %w(signup.css)
Discussion courtesy of: Doug

This recipe can be found in it's original form on Stack Over Flow.