I have had lots of trouble with deploying my rails 3.0.10 application to Ubuntu 10.04 server with Passenger, Capistrano, nginx and MySQL (and even more trouble with apache2)
I added this line
require 'resolv-replace'
to my controller file where the error was coming from and it worked for me. Hope it works for you too!