我在将开发数据库中的数据推送到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
我也运行了bundle install和bundle update。
Johann