I have switched to warble based deployment, which fixed the problem for me.
My conclusion is that there is a bug in the Ruby Container of Glassfish v3, in the code that handles the request environment variables.
[Message sent by forum member 'pmma']
http://forums.java.net/jive/thread.jspa?messageID=403520