Adding Bootstrap To Rails 7 Using Import map And Solve The Dropdown Problem

preview_player
Показать описание
Adding Bootstrap library to Ruby on Rails 7 application which uses by default now Importmap to handle javascript. Also, solving the problem of the dropdown not working correctly after adding the Bootstrap due to popperjs problem.
Рекомендации по теме
Комментарии
Автор

It's clean and it's better than articles out there.👏

gmaheshbabu
Автор

This was super helpful and I ran into just this issue with bootstrap 5/Rails 7.0.4 and importmaps. Thank you for your help!

NinjaBranDizzzle
Автор

Thanks for everything
this video is also self-explanatory
good luck brother💯

Asadbek_Senior
Автор

thanks man, you helped a lot! Cheers from Brazil!

ellore
Автор

I have waited patiently all the way to the end to see the actual dropdown in action but it got overlapped with other video cards.

murtykorada
Автор

finally it is working :-:
Thanks a lot!

srijitasarkar
Автор

You don't need the Bootstrap GEM at all, I just pull in the Bootstrap CSS via a link in the application.html.erb file. All the gem does is provide the CSS and a bunch of other things you don't need. You also need to import bootstrap as such "import * as bootstrap from "bootstrap";" as otherwise I didn't have the bootstrap object available so when I would initialize the popovers it wouldn't work but everything else worked fine. Here is the JS I used in application.js to initialize the pop overs in case anyone else runs into this. Oh you also don't have to rename your application.css to application.scss, I renamed mine back and it works just fine, not using the gem either as I said at the start and everything works.

scottmilella
Автор

Could you please tell me how to add css after?. I am following with bootstrap 5.2.2 in Rails 7.0.4.

prajayarya
Автор

The bootstrap gem already contains the JS files from Bootstrap. I like the idea of importmaps but somehow this feels like it's not saving much.

KommaAchtKommaEins
Автор

Still doesn’t work for me. (Drop-down)
Bootstrap 5.2.3
Rails 7.0.6
With same cdn link and even the latest popper

aidankieffer
Автор

put more videos based on ruby on rails

maheshbaburaguraman
Автор

can you please do ruby tutorials in arabic ?

atfaltv
Автор

do something with your voice, it's tiring. The content is good

nasossoulis
Автор

hello mostafa
it's really good job
i need to contact you but can't find any email or linkedin
could you share your linkedin :)

yousefmohamed