parm530
2/4/2020 - 1:30 PM

Manually Including Jquery and Bstrap v4.3.1

Download the files


Placing the files

  • Place both the bootstrap.min.js & jquery-3.4.1.min.js in vendor/assests/javascript
  • Place bootstrap.mini.css in vendor/assets/stylesheets

Include the files

  • In config/initializers/assets.rb, add all 3 files to the precompile list
  • Because they are loaded into the vendor/assets file directory, you will need to manually include them in both the css and js manifest files
# application.js
//= require jQuery-3.4.1.min.js
  • Or, you manually include these files in the head of layouts/application.html.erb
<%= stylesheet_link_tag 'bootstrap.min' %>

# last element before the closing body tag:
# Use the script to access popper.js, needed for bootstrap 4.3.1
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<%= javascript_include_tag 'bootstrap.min' %>

Restart your server!