Well, to do everything, you need to enable jquery using yarn that works with the latest version of rails.
In Rails 5.1, this is done with the new JSP package yarn that you must install first
sudo apt-get install yarn
jQuery:
yarn add jquery
jquery,
jquery js.erb
article