how to properly build a rails web app