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

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