I spent all day Friday trying to prep a company CentOS VPS for a rails app. My first job: get ruby installed. Being more used to Ubuntu flavors of Linux I had no previous experience with YUM, but a package manager is a package manager is a package manager. I went for the gusto:
Oh, ruby installed alright. Version 1.8.1. Ugh. I updated the yum repositories again and updated only to find myself at version 1.8.5. Double Ugh. So, time to install from source. I ended up finding a really good writeup of the process at the fine blog Catapult Creative. The problem was that my CentOS install was ‘hardened’ per company policy so it had no tool chain, extremely outdated (‘approved and tested’) versions of libs and apps, and little-to-no package manager repositories enabled.
openssl-devel\
zlib-devel\
gcc\
gcc-c++\
curl-devel\
expat-devel\
gettext-devel\
mysql-server\
mysql-devel
Now that I had an actual tool chain, I started about building ruby. I won’t go into the gory details (the link above has excellent step-by-step instructions). The only problems I had were that I needed to enable support for readline, etc. in the ruby install and it doesn’t compile by default. Also, to get the install to work with mysql I had to rebuild the native extensions for the mysql gem. After banging my head against the desk for 45 minutes, I realized it was a command-line typo that had done me in (!~CURSES). Ladies and gentlemen, note that, oddly, you need a total of 4 dashes in the instruction:
I was only using 3 dashes. After that, things were up and running quickly.
Post a Comment