Add jquery turbolinks and jquery masonry gems to gemfile, run bundle install