rails engine not working on rails 4. Fixes #28