automating building rails resources