2012-03-04 58 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