Error: import file not found or unreadable: fancy-buttons

I am creating an existing rails project. But I found an error below during installation.

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

ActionView::Template::Error (File to import not found or unreadable: fancy-buttons. Load paths: Sass::Rails::Importer(/home/cis/Desktop/manish1/hamlncompass/app/assets/stylesheets/partials/_buttons.sass) /home/cis/Desktop/manish1/hamlncompass/app/assets/stylesheets /home/cis/.rvm/gems/ruby-1.9.2-p290/gems/compass-0.12.alpha.4/frameworks/blueprint/stylesheets /home/cis/.rvm/gems/ruby-1.9.2-p290/gems/compass-0.12.alpha.4/frameworks/compass/stylesheets Compass::SpriteImporter (in /home/cis/Desktop/manish1/hamlncompass/app/assets/stylesheets/partials/_buttons.sass)): 
+4
source share
3 answers

I had a similar problem and the change included a change:

@import filename to @import filename.css.sass

+9
source

I was unable to get the production server to work (both the local installation of Apache / Passenger and the built-in WEBrick server).

The browser was redirected to the page with the error 500.html, and the log kept saying [GET /] miss . When I reload the page again, I end up with an output similar to what Manish reported.

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

+3
source

Given that your system is looking for an incomplete file, either the manifest for your style sheets does not get precompiled, or this is not your answer:

I had a similar problem with a system that worked fine in development, but not in production with precompiled assets. I used a secondary layout for my registration / on pages that included a custom manifest file for style sheets. Since rake assets:precompile only compiles application.css by default, my signup.css not precompiled, and I got an error similar to yours when I got to the login page.

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

 config.assets.precompile += %w(signup.css) 
+1
source

Source: https://habr.com/ru/post/1401171/


All Articles