我创建了一个非常简单的博客应用程序,其中包含几个条目,而我正在尝试将其推送到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'
答案 0 :(得分:3)
我遇到了与db:pull相同的问题。在确定我已经安装了所有宝石之后,它就起作用了(用帽子提示:heroku db:pull not working)。
gem install pg heroku taps sequel