Modify Gemfile and lock

So I’m working on making my own heroku like stack. I have everything
except the hooks done now. My problem is that when I modify the Gemfile
to include MySQL2 if it’s not already included, that I have to also
modify the Gemfile lock. Is there any library that can help with this?