簡體   English   中英

無法連接到數據庫 - 無法將PostgreSQL數據庫推送到heroku

[英]Failed to connect to database - can't push PostgreSQL database to heroku

我創建了一個非常簡單的博客應用程序,其中有幾個條目,我想要做的就是將它推送到heroku,但是我收到以下錯誤:

$ heroku db:push [git@github.com:appname/blog.git]
Loaded Taps v0.3.24
Auto-detected local database: postgres://benjaminw@127.0.0.1/blog_development?en
coding=WIN1252
Warning: Data in the app 'afternoon-taiga-2755' will be overwritten and will not
be recoverable.

!    WARNING: Destructive Action
!    This command will affect the app: afternoon-taiga-2755
!    To proceed, type "afternoon-taiga-2755" or re-run this command with --conf
irm afternoon-taiga-2755

> afternoon-taiga-2755
Failed to connect to database:
Sequel::AdapterNotFound -> LoadError: cannot load such file -- pg

但是我已經安裝了pg gem並安裝了續集gem。 這是我的寶石文件。 我排除了幾行,因為它們被注釋掉了。 有人遇到過這個問題嗎?

source 'https://rubygems.org'

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

 gem 'pg'
 gem 'activerecord-postgresql-adapter'
 gem 'sequel'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

我遇到了與db:pull相同的問題。 在確定我安裝了所有寶石之后,它工作了(用帽子提示: heroku db:拉不工作 )。

gem install pg heroku taps sequel

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM