Posted by Pete McBreen 07 Apr 2011 at 14:32
After installing Ruby 1.9.2 from source on Centos, a few days later got a strange error from rake and gem commands
# gem list <internal:lib/rubygems/custom_require>:29:in `require': No such file or directory - ?? (Errno::ENOENT) from <internal:lib/rubygems/custom_require>:29:in `require' from /usr/bin/gem:8:in `<main>'
Found a fix for this at Ruby Forum Beware prelink and compiling ruby from source. The problem seems to be prelink corrupts ruby, so just need to ban prelink from touching the ruby executables and libraries. Need to ban
/etc/prelink.conf. by adding the line
to the conf file. Hopefully someone else will find this in the search engines and not have to reinstall ruby too many times (but once it has occurred you will need to reinstall to fix the corruption).