Step 1: Download the JS file (example: abc.min.js
).
Step 2: Save it inside vendor/assets/javascripts/
folder.
Step 3: To use it inside specific view, put this tag <%= javascript_include_tag 'abc.min' %>
inside the view (*.html.erb
)
- And put this inside
config/initializers/assets.rb
file:Rails.application.config.assets.precompile += %w( abc.min.js )
Step 4: To use it globally inside the Rails app, put this inside application.js
file:
//= require abc.min
Step 5: Restart your localhost server to continue working.