Installing Rails on CentOS 5
Note: Since this post originally went up, someof the packages have changed/updated. I’ve kept things pretty wellup-to-date, but you might want to double check the latest versions andalter the bash commands accordingly. Be aware that as of this writing,the Ruby team has made 1.9.1 the latest stable and only Rails itself isdeemed compatible with Ruby 1.9x. I.e., Rails passes all its own testson 1.9.1, but most plugins, libraries, etc are likely to give youproblems right now. So your best bet is to use 1.8.7 for awhile untilyour favorite libraries jump on board the 1.9 wagon. –Trevor(August 17, 2009)I recently had to roll a new VM for work in order to run Rails and Sinatra apps on Apache/Passenger.My company favorsCentOS as the default distro for all our boxes, so I wasn’t able to useall the super-up-to-date packages that Ubuntu makes available, and Iended up building everything from source. For posterity and for anyoneelse who needs it, here’s a list of what to do and how to do it.
Dependencies
You’ll need several libraries and the MySQL server, and you can useyum to install them all at once. This set includes the gcc compiler,the gcc-c++ compiler, and the zlib development headers for Ruby. Remember:not all libraries are the same — you’re going to need to make sure thatyou’re compiling Ruby w/ 32 or 64-bit development headers asappropriate for your architecture.
<div style="overflow: auto; white-space: nowrap; width: 620px;" class="codecolorer-container text blackboard">1
2
3
4
5
6
7
8
9
10
页:
[1]