`File to import not found or unreadable: gentelella` when running assets:precompile in production
See original GitHub issueWhen I run this:
RAILS_ENV=production bin/rails assets:precompile
I see this error:
Sass::SyntaxError: File to import not found or unreadable: gentelella.
Load paths:
/home/ubuntu/.rvm/gems/ruby-2.4.0/gems/bootstrap-sass-3.3.7/assets/stylesheets
/home/ubuntu/.rvm/gems/ruby-2.4.0/gems/font-awesome-sass-4.7.0/assets/stylesheets
Any idea why?
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (15 by maintainers)
Top Results From Across the Web
rake assets:precompile error: File to import not found or ...
The bootstrap-clubicle.css.erb file does exist, in the stylesheets directory. I am running Rails 3.1.1 on OSX 10.6.8. It is also worth noting ...
Read more >File to import not found or unreadable: select2 : r/rails - Reddit
Hi, everyone I've inherited a Rails app and am currently being defeated by the above error. The weird thing is this codebase is...
Read more >The Asset Pipeline - Rails Edge Guides
Raise an Error When an Asset is Not Found; Turning Digests Off; Turning Source Maps On. In Production. Precompiling Assets; Local Precompilation ......
Read more >Stop Missing Files in Your Assets Precompile - TXI
This way, the assets.precompile settings are always specified (not only for the production environment, but for development and test environments also). With ...
Read more >the asset application.js is not present in the asset pipeline ...
Remember to run rake assets:precompile before deploying on the server. ... Error: File to import not found or unreadable: bootstrap/scss/bootstrap. on line ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
groans Now that’s a frustrating tidbit. CSS doesn’t wring the code through the SASS rendering system. But CSS has it’s own @import functionality, so it’s just trying to include the file directly and not finding it. SASS on the other hand, will import and churn that file into a proper CSS resulting output, and that means dipping into the assets pipeline as needed.
I’ve been using
application.scss
for so long, it did not even occur to me that this might be your issue. Usually, the first thing I try when setting up a project won’t work even in development until I rename that file and it’s one of the very first things I do in new projects.@mwlang so this is the facepalm moment. I switched my application.css to application.scss, and it worked. In CSS it would expect a path to existing file, but with scss it just knows to use the gem’s files(?)