安装pg gem用于通过heroku(windows)部署rails app

时间:2015-05-06 22:38:04

标签: ruby-on-rails ruby windows ruby-on-rails-3 heroku

运行'heroku run rails console'我收到以下错误:

Running `rails console` attached to terminal... up, run.7453
    /app/vendor/bundle/ruby/2.1.0/gems/activerecord4.2.1/lib/active_record/connection_adapters/connection_specification.rb:177:in
 `rescue in spec': Specified 'postgresql' for database adapter, but the gem is
 not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the
 minimum required by ActiveRecord). (Gem::LoadError)

这是我的Gemfile:

gem 'pg', '~> 0.18.1'

1 个答案:

答案 0 :(得分:0)

您需要使用pg gem在配置文件中指定以及运行bundle install