1

我创建了一个非常简单的博客应用程序,其中包含几个条目,我要做的就是将其推送到 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 并安装了 sequel 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'
4

1 回答 1

3

我对 db:pull 有同样的问题。在确保我安装了所有的 gems 之后,它工作了(帽子提示:heroku db:pull not working)。

gem install pg heroku taps sequel

于 2013-06-20T12:32:45.297 回答