1.安装驱动
gem install postgres-pr
2.测试连接
3.ORM代码
require 'sequel' DB = Sequel.postgres('test',:user=>'postgres',:password=>'123456',:host=>'192.168.0.239',:port=>5432,:max_connections=>10) DB.create_table :mytable do primary_key :id String :name end