You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

$ rails -v

Rails 4.2.6

$ruby -v

ruby 2.3.1


1.Gemfile

-source 'https://gems.ruby-china.org'

+source 'https://rubygems.org'

.

.

.

-gem 'pg', '~> 0.15'

+gem 'pg', '~> 0.20.0'

.

.

.

2.$bundle install

3.Done

你可能感兴趣的:(You should use PG::Connection, PG::Result, and PG::Error instead, respectively.)