This is the example of using Cocoon.
https://github.com/nathanvda/cocoon
First, You have to edit your Gemfile (as like that), and then, You run this command on CLI, and Cocoon is installed in your Rails project.
$ bundle install
Plz edit anothor files when you've finished up it.