David Kimura PRO said almost 6 years ago on Upgrading a ruby on rails application :
Yes. You would upgrade the application locally and test everything to ensure that it is working properly. If you have a staging environment, it would then be best to test within there to make sure that you're not breaking functionality. This step is really important because we sometimes have services that are not "available" during development. For example, if you do file uploads to S3 in production, but in development, you use local disk, then all of your local development tests will not be touching the S3 APIs or code. This would be considered a risk when going to production, but a staging environment may catch any potential issues. This is partly why I always try to mimic my production environment as closely as possible when developing. So in the previous example with S3 file uploads, I would use minio locally to mimic the S3 APIs for file uploads. It makes the development environment a bit more complicated, but would expose any potential breaking changes earlier on in the upgrade process.