Update gems, and update code as needed

I use Rails 4.2 and rspec 3 and updated the example code.