heroku push Mongo::ConnectionFailure: Failed to connect to a master node at 127.0.0.1:27017

37 views
Skip to first unread message

xstaz

unread,
Jul 23, 2014, 1:05:41 PM7/23/14
to rubyonra...@googlegroups.com

Hi.my problem is Mongo::ConnectionFailure: Failed to connect to a master node at 127.0.0.1:27017 when im pushing on heroku

im using mongomapper

defaults: &defaults host: 127.0.0.1 port: 27017 options: w: 1 pool_size: 1 slave_ok: false ssl: false

development: <<: *defaults database: devname

test: <<: *defaults database: testname w: 0

production: <<: *defaults

database: devname

MongoMapper.connection = Mongo::Connection.new('localhost', 27017)

MongoMapper.database = "appname-#{Rails.env}"

Frederick Cheung

unread,
Jul 24, 2014, 8:22:45 AM7/24/14
to rubyonra...@googlegroups.com


On Wednesday, July 23, 2014 6:05:41 PM UTC+1, xstaz wrote:

Hi.my problem is Mongo::ConnectionFailure: Failed to connect to a master node at 127.0.0.1:27017 when im pushing on heroku


Mongo isn't running on your heroku instance. The way heroku works you need to use an addon such as mongohq.

Fred
Reply all
Reply to author
Forward
0 new messages