Fixes for rails 4

Ran into these problems trying to run against a rails 4 app.