Trying to get this working with Rails 4.0

It's working for me, but I'm not at all sure I updated everything correctly. Feedback welcome.