Its problem with turbolinks gem so its creating error
So in app\views\layouts\application.html.erb change this
<%= stylesheet_link_tag 'application.css', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application.js', 'data-turbolinks-track': 'reload' %>
from
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
and uncomment the line no.15 in app\assets\javascripts\application.js
require turbolinks
and copy it into app\assets\stylesheets\application.css at the end of file
From this your css and js will be run