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

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.

Answers


It looks like you are trying to connect to a MySQL database using Mongo (since you mentioned that Dreamhost uses MySQL), so there is something wrong with your database configuration.

I am not aware of the correct information for Dreamhost, but make sure that your config/database.yml looks like this:

production:
  adapter: mysql
  database: <insert database name>
  host: <insert database host>
  user: <insert database username>
  password: <insert database password>

Need Your Help

SSRS one toggle item for expanding multiple groups

ssrs-2008 reporting-services

i have an SSRS (2008 R2) report with matrix which contains multiple row groups. I need to expand all other groups while having only one toggle item for that. I Hide all necessary groups, and set to...

How do I add plugins to my Ionic project?

cordova npm ionic-framework ionic phonegap-plugins

I'm trying to add ionic-native-transitions to my app by following the instructions outlined on the page. The steps they online: