试图让Ruby2.0.0在CentOS 6.5上运行,并使用nginx和客运。到目前为止,由于错误而没有运气:http://prntscr.com/3egoca
这是我用于安装用于Ruby的PostgreSQL服务器的过程:
sudo vi /etc/yum.repos.d/CentOS-Base.repo
# In both [base] and [updates] sections I added the following line to the file above:
# exclude=postgresql*
sudo rpm -Uvh http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
sudo yum install postgresql93 postgresql93-devel postgresql93-server postgresql93-libs postgresql93-contrib
sudo /etc/init.d/postgresql-9.3 initdb
sudo service postgresql-9.3 start
sudo chkconfig --levels 235 postgresql-9.3 on
# At the bottom of this file I changed authentication method to md5:
sudo vi /var/lib/pgsql/9.3/data/pg_hba.conf
sudo service postgresql-9.3 restart到目前为止,在测试时,PostgreSQL运行得很好,但这是它失败的地方:
bundle install这给了我一个错误:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/deploy/.rvm/rubies/ruby-2.0.0-p451/bin/ruby 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.因此,我遵循了这个建议,尝试分别安装PG宝石,如下所示:
gem install pg -- --with-pg-config=/usr/pgsql-9.3/bin/pg_config当我尝试的时候,我得到了这个输出:
Building native extensions with: '--with-pg-config=/usr/pgsql-9.3/bin/pg_config'
This could take a while...
Successfully installed pg-0.17.1
invalid options: -f fivefish
(invalid options are ignored)
Parsing documentation for pg-0.17.1
unable to convert "\xF0" from ASCII-8BIT to UTF-8 for ../../extensions/x86_64-linux/2.0.0/pg-0.17.1/pg_ext.so, skipping
unable to convert "\xF0" from ASCII-8BIT to UTF-8 for lib/pg_ext.so, skipping
1 gem installed尽管说它安装成功,但我还是收到了我发布的截图中的乘客错误,我仍然无法让bundle install成功运行。
顺便说一句,我是SSH作为用户“部署”,这也是nginx在nginx.conf文件中设置的用户。
发布于 2014-04-29 04:34:55
尝试:
export PATH=/usr/pgsql-9.3/bin:$PATH
bundle installhttps://stackoverflow.com/questions/23355477
复制相似问题