BlogLogBlog

Fix - No CSS or Bootstrap in Rails deployment on Heroku.

July 02, 2020

When you deploy a Rails application to Heroku, you might be surprised to see that your app does not have any styles that you could see locally.

Check the file application.html.erb inside app/views/layouts and notice how you are importing your stylesheets.

Screenshot 1

Change stylesheet_link_tag into stylesheet_pack_tag. Re-deploy your application and it should work.

Screenshot 2

We use _pack_tag to import CSS into Webpack.


© 2021, BlogLogBlog