Can you use the Rex version to decode base64 instead of the Ruby one?  Here's an example:

Rex::Text.decode_base64(pass)