failed to connect to any given host:port - RoR Error?

Posted by Sam Hursey on Stack Overflow See other posts from Stack Overflow or by Sam Hursey
Published on 2010-03-27T13:01:05Z Indexed on 2010/03/27 13:03 UTC
Read the original article Hit count: 411

Filed under:
|
|

Hi all

I'm very new to Ruby on Rails so please go easy! I've uploaded the whole application to the server (Dreamhost) and gone through the steps. But when I try to run it I get the following error:

failed to connect to any given host:port (Mongo::ConnectionFailure)

I have installed the Mongo gem; but maybe I haven't got it configured correctly? I know you can't use localhost for describing where a Dreamhost mysql database is; might it be something like that?

These are the first five lines of the backtrace if that helps?:

    /home/user/.gem/ruby/1.8/gems/mongo-0.19.1/lib/../lib/mongo/connection.rb   440 in `connect_to_master'
1   /home/user/.gem/ruby/1.8/gems/mongo-0.19.1/lib/../lib/mongo/connection.rb   131 in `initialize'
2   /home/user/.gem/ruby/1.8/gems/magent-0.3/lib/magent.rb  19  in `new'
3   /home/user/.gem/ruby/1.8/gems/magent-0.3/lib/magent.rb  19  in `connection'
4   /home/user/.gem/ruby/1.8/gems/magent-0.3/lib/magent.rb  27  in `database='
5   /home/user/.gem/ruby/1.8/gems/magent-0.3/lib/magent.rb  35  

Any help much appreciated and apologies for my n00bishness! Thanks.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about rubygems