Tag: postgresql

Heroku和Rails:Postgres的Gem加载错误,但它在GEMFILE中指定

所以我试图将一个小项目部署到Heroku,但是当我部署它并试图运行heroku run rake db:migrate它返回了我以下错误: rake aborted! Gem::LoadError: 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). /app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec’ /app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec’ /app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.6/lib/active_record/connection_handling.rb:50:in `establish_connection’ /app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:120:in `block (2 levels) in ‘ /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval’ /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook’ /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:28:in `block […]