我正在尝试使用ruby on rails和postgres设置我的VPS(CentOS 6.4).
我安装了ruby(2.1.0p0),rails(4.1.0)和postgresql(9.3.4)没有问题.
当我尝试创建新的rails应用程序(rails new new_app -d postgresql)时,它会在安装pg gem时停止.我查看了有关此错误的所有SO帖子,并尝试了我能找到的所有内容.最建议的是运行"yum install postgresql-devel"并仍然无法正常工作.
您可以在下面找到ssh输出和mkmf.log.如果需要更多信息,请告诉我......
Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /home/deploy/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb checking for pg_config... yes Using config values from /usr/bin/pg_config checking for libpq-fe.h... *** 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. Provided …