我在将数据从我的开发数据库推送到 Heroku 时遇到问题。我决定切换到 PostgreSQL 作为我的开发数据库,并更新了 database.yml 并从 gemfiles 中删除了 sqlite gem。
该应用程序在 PostgreSQL 上运行良好,但是当我尝试运行命令时:
heroku db:push
我得到一个令人费解的 SQLite 错误,因为我的项目中没有对 sqlite 的引用:
! 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
这是我的 database.yml 文件:
development:
adapter: postgresql
encoding: unicode
database: xxxx
pool: 5
timeout: 5000
username: xxxx
password: xxxx
test:
adapter: postgresql
encoding: unicode
database: test
pool: 5
timeout: 5000
username: xx
password: xx
production:
adapter: postgresql
encoding: unicode
database: test
pool: 5
timeout: 5000
我正在使用 RVM,并且没有任何运气就创建了一个新的 gemset。
我什至试过这个,但得到了同样的 SQLite 错误:
heroku db:push postgres://xx:xx@localhost/xx
! 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
我还运行了捆绑安装和捆绑更新。
约翰