Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I install a Bootstrap 5 theme with Rails 7

MAELLA asked in Rails

Hello,
I have trouble using a Bootstrap 5 theme (like those we can find on themes.getbootstrap.com, for instance) with a Rails 7 application I'm building. I'm not sure which is the best way to integrate it.
First I intended to install Bootstrap getting rid off nodejs, as explained in this article : https://dev.to/renuo/rails-7-bootstrap-5-and-importmaps-without-nodejs-4g8. It seemed an interesting way of doing it so I wanted to give it a try.
But afterwards, I have a feeling that it make integrating my theme very uneasy. A lot of dependencies like flatpickr or JS features don't work properly.
So at this point, I'm wondering if integrating my theme in a more "classical" maner (as explained there https://eagerworks.com/blog/step-by-step-guide-on-integrating-a-bootstrap-theme-into-rails-7, for instance) wouldn't be a better solution.
Does anyone here is a Bootstrap theme integration warrior and could give some advice, even perhaps a hand?
Off course, I've kept it short but I will gladely share any additional info about all this!
Thanks for reading!

Maëlla

Reply

I also have similar questions and inquiries, hoping to receive answers soon

Reply

I was updating a Rails 7 app to Rails 8 and considered moving to importmaps until I read too many comments of this nature: "Don’t use importmaps if you need to use JavaScript libraries that include CSS." I suggest doing some more searching before jumping to importmap. I have Bootstrap but not themes.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,796+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.