Skip to content

Instantly share code, notes, and snippets.

@wickathou
Created November 24, 2023 05:34
Show Gist options
  • Save wickathou/08a5a590082d26b6d991bb3ae8e89afc to your computer and use it in GitHub Desktop.
Save wickathou/08a5a590082d26b6d991bb3ae8e89afc to your computer and use it in GitHub Desktop.
Rails 7 + Bootstrap 5 — Are you getting an error saying: ‘The asset “application.css” is not present in the asset pipeline’ ? This is the solution

Problem:

Your app build with Rails 7 + Bootstrap 5 is showing an error saying

The asset “application.css” is not present in the asset pipeline

You might be getting this error when you clone a rails app with bootstrap or other assets which need to be compiled first, which bundle install can’t do.

Solution:

All you need is to precompile the assets of your rails app, which is done using

rails assets:precompile

Happy coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment