我安装了水龙头。我得到以下错误。这是我第一次从Heroku这样拉,所以我不确定的确切格式
$ heroku db:pull postgres://postgres:@localhost/prod_20120717
! Taps Load Error: cannot load such file -- sqlite3
! You may need to install or update the taps gem to use db commands.
! On most systems this will be:
!
! sudo gem install taps
我在postgres中创建了一个空的prod_20120717
来接收数据,但问题似乎是taps在寻找sqlite3,而不是postgres。
我的postgres用户是postgres,没有pw.
我的database.yml文件只定义了postgres适配器。
这似乎是适配器名称问题。在我有postgres
的两个地方,我也都尝试过postgresql
。
只是一种预感,但我认为sqlite是taps:的一个要求
https://github.com/ricardochimal/taps/blob/master/lib/taps/cli.rb第10行:
require 'sqlite3'
我不认为这与你的实际应用程序有关,但更多的是水龙头本身的工作方式,也许安装gem并从那里开始?
答案是我实际上没有安装sqlite3(我在Mac上,我的应用程序只使用postgres),我必须安装它(sqlite3)。
[sudo] gem install sqlite3
我的Gemfile不需要它,我只需要把它安装在我的机器上。
您的gemfile设置是这样的吗?
group :production do
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
end