The more simplistic way to access Alfresco from a ruby application using a web service is to use Soap4r, but the actual implementation does not offer the WS-Security standards feature directly. The following example use Wss4r that adds their security. You'll have to have this library installed in order to run these examples.
In addition to installing this library, and because this library is not fully implemented, you will have to patch it with the patch containing MessageText code instead of the default MessageDigest. This patch is actually a subclass of wss4r's SOAP::Header:impleHeader which is defined in the sample code that ships with Alfresco's Ruby library: testWebServices.rb