How to build last version of Ruby for jailbroken iOS?
If you have OpenSSH, you may want to connect via SSH to a Unix based computer and run a full version of Ruby. For Mac there is MacRuby, for Linux just install Ruby via your package manager.