From what I know you can retrive chat history from a room only if that room was configured to be persisted and set to log converstions. There is also a limitation on how many days back the server returns history for. The limit used to be 2 days but there has been a longstanding discussion and some patches to fix that limitation.
According to another question here on SO it's not possible to retrive the history via a straight HTTP request without proxying the history through a separate XMMP server first, it that what you trying to do, or are you talking to the Openfire server?
In closing it looks like what you want would be possible. According to the XMPP spec. any new user would receive the full history of a room when joining, provided that the room was configured to send it. So, simply joining a properly configured room as a randomly created user would give you the history you are looking for.
So depending on if this is for a service you run or if you are trying to archive someone else's server your milage may wary. If you set up the server it looks to be possible, even if not by a specific API call. If the service is without your control however you might be out of luck since the history might simply not be there ...
Hope that helped you a bit even if I can not give a specific solution.
Service discovery
According to the documentation for service discovery your request is not complete:
<iq type='get'
from='[email protected]/orchard'
to='plays.shakespeare.lit'
id='info1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Maybe you should read up a bit on how to make a basic connection to an XMPP service using the gem? This looks to be what you need to get started. They have a lot of examples that should help you out quite a bit with the gem specifics ...