I was having problems pushing data from my development db to Heroku. I decided to switch to PostgreSQL as my development db and have updated database.yml and removed the sqlite gem from the gemfiles.
我在将数据从我的开发数据库推送到Heroku时遇到了问题。我决定切换到PostgreSQL作为我的开发db并更新了database.yml并从gemfiles中删除了sqlite gem。
The app runs fine against PostgreSQL but when I try to run the command:
应用程序运行正常对PostgreSQL,但当我尝试运行命令时:
heroku db:push
I get an SQLite error which is puzzling because there is no reference to sqlite in my project:
我得到一个令人费解的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
Here is my database.yml file:
这是我的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
I'm using RVM and I have created a new gemset without any luck.
我正在使用RVM,我创造了一个没有任何运气的新宝石。
I even tried this but got the same SQLite error:
我甚至试过这个但得到了同样的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
I have also run bundle install and bundle update.
我还运行了bundle install和bundle update。
Johann
约翰
5 个解决方案
#1
10
I was having the same problem and solved it by moving taps into a development group in my gemfile- taps requires sqlite, which is what was causing the problem.
我遇到了同样的问题并通过将我的gem文件中的点击移动到开发组来解决它需要sqlite,这就是导致问题的原因。
group :development do
gem 'taps', :require => false # has an sqlite dependency, which heroku hates
end
#2
8
The solution is to add not only taps
gem but also sqlite3
gem into the :development
group. If you are using in your development sqlite3
already, then just adding taps
gem will be enough. But I am using mysql
on my development so to solve that problem I had to add both.
解决方案是不仅将taps gem和sqlite3 gem添加到:development组中。如果您已经在开发sqlite3中使用,那么只需添加taps gem即可。但我在我的开发中使用mysql所以要解决这个问题,我必须添加它们。
group :development do
gem 'taps'
gem 'sqlite3'
end
#3
4
gem install sqlite3
solved it for me.
为我解决了。
#4
0
On my debian wheezy I needed to install:
在我的debian wheezy上我需要安装:
aptitude install libsqlite3-dev
#5
0
gem install sqlite3
Is all you need. The error is coming locally, not from Heroku
是你所需要的全部。错误来自本地,而不是来自Heroku
#1
10
I was having the same problem and solved it by moving taps into a development group in my gemfile- taps requires sqlite, which is what was causing the problem.
我遇到了同样的问题并通过将我的gem文件中的点击移动到开发组来解决它需要sqlite,这就是导致问题的原因。
group :development do
gem 'taps', :require => false # has an sqlite dependency, which heroku hates
end
#2
8
The solution is to add not only taps
gem but also sqlite3
gem into the :development
group. If you are using in your development sqlite3
already, then just adding taps
gem will be enough. But I am using mysql
on my development so to solve that problem I had to add both.
解决方案是不仅将taps gem和sqlite3 gem添加到:development组中。如果您已经在开发sqlite3中使用,那么只需添加taps gem即可。但我在我的开发中使用mysql所以要解决这个问题,我必须添加它们。
group :development do
gem 'taps'
gem 'sqlite3'
end
#3
4
gem install sqlite3
solved it for me.
为我解决了。
#4
0
On my debian wheezy I needed to install:
在我的debian wheezy上我需要安装:
aptitude install libsqlite3-dev
#5
0
gem install sqlite3
Is all you need. The error is coming locally, not from Heroku
是你所需要的全部。错误来自本地,而不是来自Heroku