improve rails server scripts