RoR - MD5 generation
You can use Digest::MD5
from the Ruby standard library for this.
irb(main):001:0> require 'digest/md5'=> trueirb(main):002:0> Digest::MD5.hexdigest('foobar')=> "3858f62230ac3c915f300c664312c63f"
And one more thing: MD5 is a hash algorithm. You don't "encrypt" anything with a hash algorithm.