【发布时间】:2015-05-06 22:38:03
【问题描述】:
运行 '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'
【问题讨论】:
-
在将那行添加到 Gemfile 之后,您是否运行了
bundle install? -
你跑
bundle install了吗? -
是的,自从添加 gem 后我已经运行了 bundle install
-
在 config/database.yml 中是否指定使用 postgres?
标签: ruby-on-rails ruby windows ruby-on-rails-3 heroku