refactor to use a Railtie
update rake file
rebuild