RSA signing with Ruby OpenSSL

hi all -

I'm not sure if this is the correct forum but i was wondering if
anyone has successfully done RSA-SHA1 signing with Ruby OpenSSL and
interoperated with Java Servers.

I'm using the following code but i'm not sure if the "sign" method on
works properly -

@key =
@key.send("sign",, "text to sign")

The expected signature from above "sign" is not what i know the Java
crytpo api likes.

Thanks in advance.