Skip to content

Instantly share code, notes, and snippets.

@chiraggude
Last active December 14, 2018 07:14
Show Gist options
  • Save chiraggude/11128087 to your computer and use it in GitHub Desktop.
Save chiraggude/11128087 to your computer and use it in GitHub Desktop.
Install Ruby 2.1.1 and RubyGems 1.8.25 on CentOS 6.5
# Install Ruby
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
tar xvzf ruby-2.1.1.tar.gz
cd ruby-2.1.1
./configure --prefix=/usr
make
make install
# remove "ruby-2.1.1" folder in /root
# Install RubyGems
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.25.tgz
tar xvzf rubygems-1.8.25.tgz
cd rubygems-1.8.25
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
# remove "rubygems-1.8.25" folder in /root
@bondo01
Copy link

bondo01 commented May 20, 2014

Finally a method that actually works. Thanks!

@sdoumbia-r7
Copy link

Yes , it works and if you meet the following error

ruby setup.rb config
/usr/local/lib/ruby/1.9.1/yaml.rb:84:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).

then run the following command

rvm pkg install libyaml
and
rvm reinstall ruby-(version)

@sfchrisgleason
Copy link

On CentOS 6 this works too...

$ sudo rpm -i http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-6.noarch.rpm
$ sudo yum install puppet puppet-server

@rizplate
Copy link

rizplate commented Aug 9, 2016

Thanks man! cant believe its so hard to install ruby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment