Mitesh Mynee Mitesh Mynee - 4 months ago 8
Ruby Question

How to change the head section of Index.html in a Ruby on Rails app?

In the head section of my Ruby on Rails app I am only able to see the following CSS and JS file when I view the source code in browser.

<link rel="stylesheet" media="all" href="/stylesheets/default.css" data-turbolinks-track="reload" />

<script src="/javascripts/default.js" data-turbolinks-track="reload">


I have added bootstrap CSS and JS files to the
app/assets/stylesheets
and
app/assets/javascripts
and have changed the
application.css
and
application.js
files. Still I am not able to see those files in source code.

Answer

Added <link rel="stylesheet" type="text/css" href="stylesheets/bootstrap.min.css"> to the application.html.erb file.

Thanks to @Deepak for giving me a lead to find an alternate solution to my problem.

Comments