Rails3 / mongoid / heroku / mongohq
经过一番努力,我设法让我的 Rails 3.2 应用程序在 Heroku 上运行。
在heroku上运行rails 3.2 / mongoid应用程序失败
我从 mongolab 更改为 mongohq,因为应用程序在连接到 mongolab 后一直崩溃。
现在仍在运行(手指交叉) 但是当我执行 heroku mongo:push
来传输数据库时,没有任何内容转移到 mongohq
有人有线索吗?
这是我的 config.yml
development:
host: localhost
database: salsacaribecouk_development
test:
host: localhost
database: salsacaribecouk_test
# set these environment variables on your prod server
production:
uri: <%= ENV['MONGOHQ_URL'] %>
# slaves:
# - host: slave1.local
# port: 27018
# - host: slave2.local
# port: 27019
干杯
After quite a bit of struggle i manage to have my rails 3.2 app running on heroku.
running rails 3.2 / mongoid app on heroku fails
I have change from mongolab to mongohq as the app was crashing all the time after connecting it to mongolab.
It is now stil running (fingers crossed)
But when I do heroku mongo:push
to transfer the database, nothing get moved over to mongohq
Anybody has a clue?
here is my config.yml
development:
host: localhost
database: salsacaribecouk_development
test:
host: localhost
database: salsacaribecouk_test
# set these environment variables on your prod server
production:
uri: <%= ENV['MONGOHQ_URL'] %>
# slaves:
# - host: slave1.local
# port: 27018
# - host: slave2.local
# port: 27019
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
https://github.com/pedro/heroku-mongo-sync#config
确保您的数据库名称与heroku上的应用程序名称完全相同,否则使用上述方法更改环境变量。
https://github.com/pedro/heroku-mongo-sync#config
Make sure your database name is exactly same with the application's name on heroku, else change the environment variable using the method above.
您能否验证您是否拥有要传输到在您的计算机上本地运行的 MongoHQ 且未打开身份验证的数据库?另外,你安装了佩德罗的宝石吗?
https://github.com/pedro/heroku-mongo-sync
Can you verify that you have the database you want to transfer to MongoHQ running locally on your machine with no auth turned on? Also, do you have Pedro's gem installed?
https://github.com/pedro/heroku-mongo-sync