upgrade Rails script