At Iteration F2, Pag 157 we have this code:
$('#cart').html("<%=j render(@cart) %>");
For those who are starting, this code could not work, because new rails does not come with jquery by default. So what you need to do is add jquery.
First add jquery using yarn:
$ bin/yarn add jquery
//= require rails-ujs
//= require turbolinks
//= require jquery
//= require_tree .