correctly set env vars and ensure rails generator copies over migrations