heroku db:拉不工作
heroku db:pull postgresql://root:@localhost/db_name
此命令后显示此消息
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:50: warning: Parenthesize argument(s) for future version 加载水龙头 v0.3.13 警告:数据库“postgresql://root:@localhost/db_name”中的数据将被覆盖且不可恢复。 您确定要继续吗? (是/否)? y 无法连接到数据库: 续集::AdapterNotFound -> LoadError: no such file to load --sequel/adapters/postgresql
如何使用 db:pull
heroku db:pull postgresql://root:@localhost/db_name
After this command display this message
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:50: warning: parenthesize argument(s) for future version
Loaded Taps v0.3.13
Warning: Data in the database 'postgresql://root:@localhost/db_name' will be overwritten and will not be recoverable.
Are you sure you wish to continue? (y/n)? y
Failed to connect to database:
Sequel::AdapterNotFound -> LoadError: no such file to load -- sequel/adapters/postgresql
How to use db:pull
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先,您需要修复连接字符串:使用
postgres
而不是postgresql
。您需要安装
pg
数据库适配器才能使用 Sequel 的 postgresql 适配器:您可能还想确保您的 Taps、Sequel 和 Heroku Gem 是最新的:
然后再次尝试
heroku db:pull
。如果这不起作用,请发表评论或跳到 Freenode 上的#heroku,我们可以尽力提供帮助。First, you need to fix your connection string: use
postgres
instead ofpostgresql
.You will need to have the
pg
db adapter installed to use Sequel's postgresql adapter:You may also want to make sure your taps, sequel, and heroku gems are up to date:
Then try your
heroku db:pull
again. If that doesn't work, post a comment or hop in #heroku on Freenode and we can try to help.您的连接字符串错误。尝试:
Your connection string is wrong. Try:
一旦我将“pg”gem从版本“0.11.0”升级到“0.12.2”,就开始正常工作。
Started working fine once I upgraded the "pg" gem from version "0.11.0" to "0.12.2".