What steps should I take to successfully load Bootstrap 4 on my web app?
Here is the contents of my Gemfile:
gem 'rails', '~> 5.1.5'
gem 'devise'
gem 'bootstrap-sass', '~> 3.3.7'
gem 'sass-rails', '>= 3.2'
gem 'coffee-script', '~> 2.4', '>= 2.4.1'
gem 'sqlite3'
gem 'puma', '~> 3.7'
gem 'autoprefixer-rails', '~> 8.1'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'sprockets-rails', '~> 3.2', '>= 3.2.1'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
This snippet is from Application.html.erb file:
<!DOCTYPE html>
<html>
<head>
<title>Itonatalaga Official Website</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<!-- Navigation Menu -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="#">Start Bootstrap</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Services</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact Us</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Page Content Section -->
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<%= yield %>
</div>
</div>
<!-- row ends here -->
</div>
<!-- container ends here -->
<style>
body {
padding-top: 70px;
}
</style>
</body>
</html>
Screenshot captured from localhost:3000 can be found here.
I have previously faced issues related to coffee-script-source while trying to avoid the Exec.js error. To troubleshoot this, I installed Node.js on my computer, but unfortunately, Bootstrap didn't load as expected.