4
我上傳了一個Sinatra應用到heroku。在那之前,我在那裏安裝了免費的MongoHQ
插件。但是,我有一個錯誤的Heroku來自:無法連接到heroku的任何輔助或主節點
Moped::Errors::ConnectionFailure - Could not connect to any secondary or primary nodes for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>
這裏是我的mongoid.yml
development:
sessions:
default:
database: my_db
hosts:
- localhost:27017
options:
timeout: 10
production:
sessions:
default:
uri: <%= ENV['MONGOHQ_URL'] %>
那麼,爲什麼會發生?