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 had a similar issue, which I worked around by editing the /etc/resolv.conf
before
nameserver 10.0.x.x search example.com
after
#nameserver 10.0.x.x nameserver 8.8.8.8 #search example.com