エラーログ
「ruby-{version}.tar.gz」の{version}が空なのでRubyのダウンロードに失敗しています。
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
113 226 113 226 0 0 164 0 0:00:01 0:00:01 --:--:-- 164
--2014-05-02 11:33:37-- http://ftp.ruby-lang.org/pub/ruby/ruby-.tar.gz
Resolving ftp.ruby-lang.org... 221.186.184.75
Connecting to ftp.ruby-lang.org|221.186.184.75|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2014-05-02 11:33:38 ERROR 404: Not Found.
error: line 1: Unknown tag: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
error: File not found by glob: /root/rpmbuild/RPMS/x86_64/ruby-2.1.0*.rpm
最終的にApacheの起動が失敗しました。
inst-script/rhel6/post-install: line 11: passenger-config: command not found
SELinuxが無効化されました
tcp 80番ポートのアクセスを許可しました
tcp 443番ポートのアクセスを許可しました
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/redmine.conf: Cannot load /usr/lib64/ruby/gems/2.1.0/gems/passenger-/buildout/apache2/mod_passenger.so into server: /usr/lib64/ruby/gems/2.1.0/gems/passenger-/buildout/apache2/mod_passenger.so: cannot open shared object file: No such file or directory
[FAILED]
修正内容
inst-script/rhel6/ruby2.1-installの「raw.github.com」を「raw.githubusercontent.com」へ修正しました。
#!/bin/sh
CHKRUBY=`rpm -qa|grep ^ruby-2.1`
RET=-1
if [ "$CHKRUBY" = "" ]
then
pushd .
rpmdev-setuptree
cd ~/rpmbuild/SPECS
# wget's bug, certificate Server Common Name
curl -L -O https://raw.githubusercontent.com/hansode/ruby-2.1.x-rpm/master/ruby21x.spec
RET=$?
if [ "$RET" -ne "0" ]
then
echo "download error. 'ruby21x.spec'"
exit 1
fi
RUBYVER=`grep "%define rubyver" ruby21x.spec | awk '{print $3}'`
cd ~/rpmbuild/SOURCES
wget http://ftp.ruby-lang.org/pub/ruby/ruby-${RUBYVER}.tar.gz
cd ~/rpmbuild/SPECS
rpmbuild -bb ruby21x.spec
ARCH=`uname -m`
rpm -Uvh ~/rpmbuild/RPMS/${ARCH}/ruby-2.1.0*.rpm
popd
fi

