I was wondering what the differences are between using a Ruby gem to include a JavaScript library into a Rails project versus including the JavaScript file yourself.
I do know that you can lock down a version of the js library using bundler or alternatively, update all of your js libraries through bundler with one command instead of manually coping and pasting js files into your project. How much overhead does the Rails::Engine class add and is this the only way to get the asset files from a gem available in a Rails app? Are there any other notable differences that shows which way is “the best” way to include these libraries?
Great post from olaf_from_norweden on reddit with the answer: