To get a random record from MySQL in Ruby on Rails use:

User.find(:all, :order => 'rand()')