choosing the right rubygem mysql2 and ruby version

If this is an existing app then for gems just run bundle install and
it will install the version specified in Gemfile.lock
If you are upgrading then you can look at the gems changelog and see
if you need to update it.

Coln

If I want to use rails 5