I start a new rails app with this starter template and when i add a simple navbar from bootstrap.
The principal problem is that JS is not working, the dropdown menus doesn't work and the searchnar is not in his correct position.
I'm using rails 7.0.4 and ruby 3.1.2p20 and
Ok, thast's a bit shame but all the problem was that i was using the wrong version of bootstrap template. I'm not working in this project anymore so don't have access to the versions that makes me write this help request but i remember what was causing the "problem".
Let's supose that we start a new application:
rails new YOUR_APP_NAME --css=bootstrap
Rails will generate a .package.json File where you can see the bootsrap version
My problem was that i went to bootstrap page with the wrong version and if you do this some styles and js features that comes with the bootstrap library won't work correctly.
Always remember to check what version do you have in your package.json and search this version in bootsrap page.