I have a full post on this very topic somewhere way back in history (I can’t find it now) however:
1) Do you mean you want to simply record the MIDI notes (not the sounds) that you generate via MIDI Guitar 2 using your guitar, or do you mean
2) I want to record the sound generated by MIDI Guitar 2 and my chosen VSTi ‘s I’ve set up in MG2?
In the first case, since RB will NOT see MG2 as a “MIDI device” you need an additional item a software MIDI router (you could even route out of PC from MG2 to an external MIDI router and back into PC and into RB via this external router –but that’s way overkill).
You can use something like the FREE Loopmidi, or the (commercial) Loopbe 30, or other similar multi-in/multi-out software MIDI interface devices. You play guitar into MG2, then have MG2 send its MIDI out to this midi router MIDI “device,” then use that device to route that MG2 MIDI output to RB. Or more simply: set RB’s midi-in to that MIDI device (e.g., Loopmidi) and MG2’s midi out to that same device (again e.g., Loopmidi)
https://www.tobias-erichsen.de/software/loopmidi.html (not pushing loopmidi – just first thing that comes to mind)
In the second case, that’s actually more complex AUDIO (not MIDI) issue- and requires you knowing what audio devices (ASIO and non-ASIO) you and your computer can use at same time. Besides if you record the MIDI performance, as MIDI, you can at a later date, in RB, change the MIDI VSTi instruments (maybe a Wurlitzer was better than a Rhodes after all - LOL)