I have installed mongo and bson_ext now I have created a .rb file with the following contents ::
require \'rubygems\' require \'mongo\' db = Mongo::Connecti
I just encountered this due to my /etc/hosts file not containing an entry for "localhost" - consequently Ruby couldn't resolve "localhost". I suppose you can hardcode 127.0.0.1 into your code rather than "localhost" - or fix /etc/hosts to contain:
127.0.0.1 localhost