Merger help with Ruby dependencies

I’m a little stuck on an attempted merger of two Discourse instances.

I’ve documented the troubles on the merger post (see below) but didn’t think that anyone would see it (and it will get deleted in a month):

https://meta.discourse.org/t/how-to-merge-two-discourse-sites/95435/34