I had this exact same issue recently, and the fix I found is to re-run Prism after the page loads. I used the Turbolinks page:load event to trigger this.
In Coffeescript:
$(document).on 'ready page:load', ->
Prism.highlightAll()
Or in plain JS:
$(document).on('ready page:load', function() {
Prism.highlightAll();
});