when you use link_to or button_to tag, be sure the trigger remote setted to true, like <%=linke_to "Button", contrl_path, remote: true%>.
then you should write a template contrl_action.js.erb in that view folder and name same as the action, that will be your ajax scriptting template for that very acction.
Ajax is the default functionality from rail no need of extra packages, ensure following things you have included
2) use :remote=> true in the link_for or form tags
ex:- <%=link_to 'Remote Link', home_path,:remote=>true%>
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to email@example.com.
> To unsubscribe from this group, send email to
> For more options, visit https://groups.google.com/groups/opt_out.