Hey Bruno,
Thanks for using NI Forums to ask your questions. As for the correct forum subject, I would say that your problema is more related to the Instrument Control Forum, since you guys are trying to use NI-VISA to control a non-NI device.
One question I have: Is this post related to this another one?
Regarding your specific question you had, it is hard for us here to give any hint since we do not know how this library works (from what I could learn, it is a set of ruby wrapers around NI-VISA shared library functions). Considering that, I can't tell how they are handling the VISA sessions. In LabVIEW, for example, this problem may occur when you do not close the VISA Session calling the Visa Close function and then trying to run the VI once again. For LabVIEW, this problem is addressed by the following KB article
Error -1073807346: The Given Session or Object Reference Is Invalid in NI VISA
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LPESA2&l=en-US
Go ahead and review the article above to see whether you can take something out of it. In addition to that, I encourage you to contact the developer of this library. Apparently, you can contact him using this profile page. In case it is a bug, for instance, it you would be contributing for the project and helping it to become even better.
I hope that helps!
Cheers,
Felipe Flores
Technical Support Engineer
National Instruments