current directory: /home/vagrant/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4/ext /home/vagrant/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160415-7139-1cu08ba.rb extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Gem files will remain installed in /home/vagrant/.rvm/gems/ruby-2.3.0/gems/pg-0.18.4 for inspection. Results logged to /home/vagrant/.rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/pg-0.18.4/gem_make.out . . . An error occurred while installing pg (0.18.4), and Bundler cannot continue. Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
步骤2: 按住shift + g 将光标定位的文件底部,按i进入编辑模式,修改METHOP为md5验证。 完成后按shift + : 进入命令模式,输入wq完成编辑。 下面给出修改后效果
1 2 3 4 5 6 7 8 9 10 11 12
. . . # TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5
步骤3: 重启postgresql服务
1
$ service postgresql restart
type “json” does not exist
问题重现: 执行rake db:migrate时出现错误,错误代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ rake db:migrate . . . == 20151208044806 CreateShops: migrating ====================================== -- create_table(:shops) rake aborted! StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedObject: ERROR: type "json" does not exist LINE 1: ...ying NOT NULL, "logo" character varying, "images" json, "reg... . . .