extract the app into public(out of rails)