prepare rails