This assumes you don't commit your app's Gemfile.lock into your repository, which you generally should.
Most deploy scripts will look at your Gemfile.lock and update if necessary during the deploy (or just run bundle install every time, which won't give you a locked version error if your Gemfile.lock matches your Gemfile).