Rails 4 compatibility

I'm not too sure how to do this, so would gladly welcome some help :)