Problem installing ruby rails on CentOS 5.5

I try to install ruby on rails using a repository CentOS 5.5 rubyworks:

[rubyworks]
name=RubyWorks
baseurl=http://rubyworks.rubyforge.org/redhat/$releasever/RPMS/$basearch
enabled=1
gpgcheck=1
gpgkey=http://rubyworks.rubyforge.org/RubyWorks.GPG.key
priority=1

I using yum to install ruby and rubygems

# yum install ruby ruby-devel ruby-libs ruby-irb ruby-rdoc ruby-mysql rubygems

And I need to install rails using gem

# gem install rails

But I had the following error that can’t solve :(

# gem install rails –source http://gems.opscode.com
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
ERROR:  could not find rails locally or in a repository
# gem source -a http://gems.opscode.com
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
http://gems.opscode.com added to sources
# gem install rails
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
ERROR:  could not find rails locally or in a repository
# gem update –system
Updating RubyGems…
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
Attempting remote update of rubygems-update
ERROR:  could not find rubygems-update locally or in a repository
ERROR:  While executing gem … (NoMethodError)
undefined method `version’ for nil:NilClass
# gem –source http://gems.github.com
ERROR:  Invalid option: –source.  See ‘gem –help’.
# gem –source http://gemcutter.org/
ERROR:  Invalid option: –source.  See ‘gem –help’.
# gem source -a http://gemcutter.org/
ERROR:  While executing gem … (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gemcutter.org/yaml
# gem source -a http://gems.github.com
Bulk updating Gem source index for: http://gems.github.com
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
http://gems.github.com added to sources
# gem install rails
Updating metadata for 11 gems from http://rubyworks.rubyforge.org/redhat/5/GEMS/x86_64/
………..
complete
Updating metadata for 59 gems from http://gems.opscode.com
…………………………………………………..
complete
Bulk updating Gem source index for: http://gems.github.com
ERROR:  could not find rails locally or in a repository

search results suggest to reinstall rubygems from source:

# wget wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz

# tar -zxvf rubygems-1.3.7.tgz

# cd rubygems-1.3.7

# ruby setup.rb

# gem update –system

# update_rubygems

# gem sources -a http://gems.opscode.com
# gem sources -a http://rubygems.org

# gem update –system

# gem install rails

And I still get the following error message:

ERROR:  could not find gem rails locally or in a repository

How can fix it?


Solved PHP execution via fcgid requires the Apache mod_fcgid module

Kemarin saya menambahkan virtualmin GPL di web server blog ini, namun siapa yang menyangka hal ini malah menimbulkan masalah sehingga server tidak dapat diakses. Sekitar jam 3 pagi saya tidak juga menemukan letak permasalahannya, dan akhirnya tadi siang (8/9/10) saya melanjutkan project tersebut. Notifikasi “PHP execution via fcgid requires the Apache mod_fcgid module” muncul karena mod_fcgid tidak di load oleh apache.

mod_fcgid adalah alternatif untuk mod_cgi atau mod_cgid yang mempunyai kinerja tinggi, mod_fcgid mampu melayani permintaan secara bersamaan dan tetap berjalan untuk melayani permintaan-permintaan lebih lanjut. mod_fcid disukai oleh pengembang PHP misalnya untuk mnjalankan proses yang di handle oleh mod_php dan memberikan kinerja yang sangat mirip.

“PHP execution via fcgid requires the Apache mod_fcgid module” dapat diatasi dengan membuat file /etc/httpd/conf.d/fcgid.conf dan menambahkan beberapa paramerter berikut:

LoadModule fcgid_module modules/mod_fcgid.so
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>
SocketPath run/mod_fcgid
SharememPath run/fcgid_shm
Jika dengan cara itu problem mod_fcgid belum dapat diatasi, silahakan dowload dan reinstall mod_fcgid seperti dibawah ini:
# wget ftp://mirror.switch.ch/pool/1/mirror/epel/5/x86_64/mod_fcgid-2.2-10.el5.x86_64.rpm
# rpm -e –nodeps mod_fcgid
# rpm -Uvh mod_fcgid-2.2-10.el5.x86_64.rpm
Kemudian sesuaikan file /etc/httpd/conf.d/fcgid.conf seperti diatas, dan semoga apache di virtualmin bisa normal kembali menggunakan mod_fcgid.