Setting up converse.js on the forum

I’ve been looking for a chatroom for my site since my community wanted one for it that didn’t use an external platform. I tried babble and it didn’t seem to work very well, so I started looking for other chatrooms. There is a few that I can set up by putting some javascript in the theme customisation but all the users have to make an account on the chatroom’s website. But I ended up finding something which would work really well with my community called Converse.js. It uses xmpp and most of the people on my forum are already on, so they wouldn’t need to set up any new accounts.

My only issue is I don’t know how I would implement it on my forum. In documentation for converse.js it looks like it can be installed with ruby here, but I don’t know how I would go about doing this in discourse. Any help would be greatly apreciated.