first remove boostrap and jquery-rails gem from the gemfile if it is installed.
run cmd,
yarn add bootstrap jquery popper.js
add following code in the config/webpack/environment.js
In your app/javascript/packs/application.js file, add
import ‘bootstrap’
rename app/assets/stylesheets/application.css to app/assets/stylesheets/application.scss
remove existing code and add
@import “bootstrap/scss/bootstrap”;
if thats gives problem, try adding ~,
@import “~bootstrap/scss/bootstrap”;
And that should integrate bootstrap in your rails 6 application.