more rails4 fixes

Hi, here are a few more rails4 fixes.  With these changes both rspec and cucumber run cleanly on my machine, although there are still quite a few deprecation warnings.