我有两种类型的错误.我在本地创建了一个sqlite数据库,并尝试使用此命令提取数据:
(sudo) heroku db:pull sqlite://Users/username/folder/testbackup.db
要么
(sudo) heroku db:pull sqlite://username:password@localhost/Users/username/folder/testbackup.db
但不管怎样,我得到了这个:
Failed to connect to database:
Sequel::DatabaseConnectionError -> sqlite3::CantOpenException: could not open database: unable to open database file
或者,我尝试让Taps在我的应用程序中自动检测开发数据库并重写它,尽管这不是我想要的.然后我开始得到如下错误:
/opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:777:in
report_activate_error': RubyGem version error: sequel(3.15.0 not ~> 3.13.0) (Gem::LoadError)
activate’
from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:211:in
from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:1056:in `gem’
from /Library/Ruby/Gems/1.8/gems/taps-0.3.10/bin/schema:4
并最终
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/lib/sqlite3/errors.rb:62:in `check’: sqlite3::sqlException: PRIMARY KEY must be unique (Sequel::DatabaseError)
非常感谢,我开始尽快备份这些数据非常重要!