more work to get everything working well in rails