2012-03-04 57 views
12

我在将数据从我的开发数据库推送到Heroku时出现问题。我决定改用PostgreSQL作为我的开发数据库,​​并更新了database.yml并从gemfiles中删除了sqlite gem。当我使用PostgreSQL作为开发时,使用heroku db获取SQLite错误db

该应用程序运行对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和我创建了一个没有任何运气的新宝石。

我甚至试过,但得到了同样的错误的SQLite:

heroku db:push postgres://xx:[email protected]/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-水龙头解决它

回答

10

需要sqlite的,这是什么造成的问题。

group :development do 
    gem 'taps', :require => false # has an sqlite dependency, which heroku hates 
end 
+0

试过,但得到相同的错误(我运行bundle安装和更新,并推动数据库之前推送数据库...获取sqlite错误)。 – gugguson 2012-03-04 19:45:34

+9

解决了它 - tekniklr答案让我在正确的轨道上。问题是,水龙头使用sqlite,并没有安装在客户端机器上(我想我手动手动删除它之前)。我安装sqlite后,它工作正常。 – gugguson 2012-03-04 20:12:50

+3

我有同样的问题。我认为这是一个自制问题,因为我手动安装了heroku,在某些时候使用自制软件来测试某些东西。 'gem install sqlite3'解决了这个问题。 – dicato 2012-05-08 22:39:00

8

的解决方案是,不仅taps宝石也sqlite3宝石加入到:development组。如果您已经在开发sqlite3中使用,那么只需添加taps就足够了。但我在开发中使用mysql,所以为了解决这个问题,我不得不添加这两个。

group :development do 
    gem 'taps' 
    gem 'sqlite3' 
end 
0

在我的Debian喘息我需要安装:

aptitude install libsqlite3-dev 
4
gem install sqlite3 

解决了这个问题对我来说。

0
gem install sqlite3 

是你所需要的。错误来自本地,而不是从Heroku