It depends on where you want to use Bootstrap.
In the case you need it, in a app/views/*/*.html.erb
for instance, you would need the gem, and require it in the Rails assets pipeline in the app/assets/stylesheets/application.scss
and same for JavaScript file.
But as you mentioned you created your Rails application with --webpack=react
, I guess you'd like to use Bootstrap in your client side application, so the app/javascript
folder and not the Rails assets (app/assets
).
In this case you will have to install it using yarn
.
You have to see the app/assets
as the "old way", or the non-javascript framework way (which isn't fully true as you have some gems to install React or AngularJs etc...), and you should see app/javascript
the new way, with webpacker, so using a JavaScript framework and being an app 100% JavaScript (while in the assets you'll use some .erb
files).