The buoyancy-driven dynamics of a pair of gas bubbles released in line is investigated numerically, focusing on highly inertial conditions under which isolated bubbles follow non-straight paths. In an early stage, the second bubble always drifts out of the wake of the leading one. Then, depending on the ratios of the buoyancy, viscous and capillary forces which define the Galilei ($Ga$) and Bond ($Bo$) numbers of the system, five distinct regimes specific to such conditions are identified, in which the two bubbles may rise independently or continue to interact and possibly collide in the end. In the former case, they usually perform large-amplitude planar zigzags within the same plane or within two distinct planes, depending on the oblateness of the leading bubble. However, for large enough $Ga$ and low enough $Bo$, they follow nearly vertical paths with small-amplitude erratic horizontal deviations. Increasing $Bo$ makes the wake-induced attraction toward the leading bubble stronger, forcing the two bubbles to realign vertically one or more times along their ascent. During such sequences, wake vortices may hit the trailing bubble, deflecting its path and, depending on the case, promoting or hindering further possibilities of interaction. In some regimes, varying the initial distance separating the two bubbles modifies their lateral separation beyond the initial stage. Similarly, minute initial angular deviations favour the selection of a single vertical plane of rise common to both bubbles. These changes may dramatically affect the fate of the tandem as, depending on $Bo$, they promote or prevent future vertical realignments.