I prefere not using the Gem installer, just:
$ npm i @hotwired/turbo-rails
import * as Turbo from '@hotwired/turbo' Turbo.start()
How to check if Turbo works? see Turbo/TurboDrive aproximately on the middle of the page
=> Turbo should work. Check it by browser > developer tools > Network Tab
Page Initialization Event
Like described on Foundation Frontend setup needs a Initialization Event.
Full List of Turbo Events are on Turbo/reference/events
Page Initialization is done with
Attention: If you work inside a frame, like so:
= turbo_frame_tag 'mainFrame' do %h1 TurboFrame#first_content
=> none of that events will work! And it also not updates the Browser History
If you need an initialization Event, check Handbook/Stimulus, MutationObserver.
Changing the same frame to
= turbo_frame_tag 'mainFrame', 'data-turbo-action': :advance do %h1 TurboFrame#second_content
=> mentioned events are firing and Browser History is changed