ruby-on-rails – 当我使用PostgreSQL作为开发数据库时,使用hero
发布时间:2020-12-16 19:42:36 所属栏目:百科 来源:网络整理
导读:我将数据从我的开发数据库推送到Heroku有问题.我决定切换到PostgreSQL作为我的开发数据库,??并更新了 database.yml并从gemfiles中删除了sqlite gem. 该应用程序对PostgreSQL运行正常,但是当我尝试运行命令时: heroku db:push 我得到一个令人困惑的SQLite错
我将数据从我的开发数据库推送到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 我也运行捆绑安装和捆绑更新. 约翰 解决方法
我遇到同样的问题,并通过在我的gemfile中移动一个开发组来解决这个问题,需要sqlite,这是导致问题的原因.
group :development do gem 'taps',:require => false # has an sqlite dependency,which heroku hates end (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |