question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`File to import not found or unreadable: gentelella` when running assets:precompile in production

See original GitHub issue

When 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:closed
  • Created 7 years ago
  • Comments:26 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
mwlangcommented, Mar 2, 2017

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.

2reactions
udiudicommented, Mar 2, 2017

@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(?)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found