How to use Bootstrap with Webpack & Rails
Why Stack Overflow recommends it
Stack Overflow users link it when answering questions about getting Bootstrap to work in a Rails 6 app with Webpacker, where older asset pipeline guides no longer apply.
Recommended by 2 people across 2 different months, 2020 to 2022.
What it is
A short GoRails tutorial showing how to add Bootstrap to a Rails app that uses Webpacker, including installing the packages and wiring up the CSS and JavaScript. It is presented by the GoRails channel and targets the Rails 6 era setup.
What people said
Recommends Joost F van der Linden · 2020-11 · Stack Overflow · on “Why does my bootstrap in Rails 6 not work?”
Thanks a lot! It took me a while to find out that all other manuals were actually written for another Rails version. This one says quite similar things like you described. [this video]
Recommends Julio Cesar Gonzalez Ortega · 2022-03 · Stack Overflow · on “How to add Bootstrap v5 to your Ruby On Rails app”
After a while looking for an answer to make Bootstrap work on my app, I realized I was missing the line: " *= require bootstrap "; by adding this and following the steps on this tutorial [this video] , finally I could do it! Thanks! app/assets/stylesheets/application.css /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's * vendor/assets/stylesheets directory can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the bottom of the * compiled file so the styles you add he
Cites Zex13 · 2020-01 · Stack Overflow · on “Rails 6 App links not working until refresh”
I tried to follow this tutorial by GoRails to add EasyAutoComplete to my Rails app: [LINK] Although the search bar functions as the GoRails guy demonstrates, I keep seeing this page whenever I click on any link: [LINK] If I refresh this page, then it takes me to the user sign in page that I originally clicked on. I don't notice anything out of the ordinary in my Rails server console throughout this process. I added the css files and the js files for EasyAutoComplete to my Assets pipeline, because I was having a hard time using webpacker correctly. For jquery, I followed this article to install it: [LINK] and I used this video as reference as well: [this video] My Gemfile looks like: source ' [LIN