Installing Ruby and RubyGems on Centos 5
I got around to setting up Ruby on our new Centos 5 server today and ran into a snag. I ran:
And went on to installing rubygems. However in installing rubygems I got an error that rdoc was not installed. Now I don’t remember ever having to install RDoc on my mac so I did a quick google search. Seems that RDoc is part of the standard ruby install but my package didnt have it. So I uninstalled my my rpm and went on about compiling from source. However when I went to install rubygems this time I got an error about zlib. After another quick google search I realized that I had not installed the other ruby packages. So I killed my compiled source for ruby and reinstalled from rpms this time running
yum install -y ruby
yum install -y ruby-devel ruby-docs ruby-ri ruby-irb ruby-rdoc
Then my rubygems package installed correctly and I am on my way.
21 Aug 2007 Simeon

Thanks! This saved me a ton of time!
Glad you found it helpful nick.
[…] http://blog.simb.net/2007/08/21/installing-ruby-and-rubygems-on-centos-5/ […]
I’ve installed the ruby packages (including the extra ones you mentioned, thanks for that), but still get the following error when trying in install rubygems from the automated install script:
“./setup.rb: line 271: syntax error: unexpected end of file”
Suggestions?
Thanks!
G
ohhh - nevermind.
Found it in the rubygems docs;
it’s
>ruby ./setup.rb
duh.
Extremely helpful, thanks a million. Worked like a charm.