简体   繁体   English

Heroku db:Push-未找到续集适配器

[英]Heroku db:Push - Sequel Adapter NOt Found

I know there a number of posts similar to this one and yet I still seem to be unable to solve my problem. 我知道有很多与此类似的帖子,但我似乎仍然无法解决我的问题。 So if I have missed something, feel free to explain it like you would to a child. 因此,如果我错过了任何事情,请像孩子一样随意解释。 :) :)

I am trying to push data from my local machine which uses Mysql to Heroku which uses Postgres. 我试图将数据从使用Mysql的本地计算机推送到使用Postgres的Heroku。

The command heroku db:push sometable -t generates the error message below: 命令heroku db:push sometable -t生成以下错误消息:

Failed to connect to database Sequel::AdapterNotFound -> LoadError cannot load such file

I have also tried: 我也尝试过:

heroku db:push -t sometable mysql://user:password@localhost/db_name

Added info: 添加的信息:

  1. Using Windows 7 使用Windows 7
  2. Using Rails 3.2.8 使用Rails 3.2.8
  3. Using Ruby 1.9.3 使用Ruby 1.9.3
  4. Mysql gem is installed and works with Rails 安装了Mysql gem并与Rails一起使用
  5. Heroku client is up to date Heroku客户端是最新的
  6. Database is running 数据库正在运行
  7. Heroku db schema is running. Heroku数据库模式正在运行。
  8. Rails was installed with RailsInstaller 1.92 Rails已随RailsInstaller 1.92一起安装

Any suggestions would be greatly appeciated. 任何建议将不胜感激。 Thanks in advance. 提前致谢。

I had a similar issue and was able to get it working using standard heroku gem. 我遇到了类似的问题,并且能够使用标准的heroku gem使其正常工作。

I installed Heroku through their site downloader - 'Heroku Toolbelt' package for windows. 我通过其站点下载器-Windows的“ Heroku Toolbelt”包安装了Heroku。 That didn't work so in addition I also installed 没有工作,所以除了我也装

Heroku gem and all dependencies. Heroku gem和所有依赖项。 (ignore deprecation warning) (忽略弃用警告)

sqlite3 gem for taps (i don't use sqlite, but heroku needs it) sqlite3 gem for taps(我不使用sqlite,但是heroku需要它)

then it worked! 然后成功了!

Heroku uses PostgreSQL as database. Heroku使用PostgreSQL作为数据库。 You should not get this error if you install pg. 如果安装pg,则不应出现此错误。

Try to run: gem install pg 试运行: gem install pg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM