Skip to content

Instantly share code, notes, and snippets.

@tomohiro
Last active December 15, 2015 22:59
Show Gist options
  • Save tomohiro/5337100 to your computer and use it in GitHub Desktop.
Save tomohiro/5337100 to your computer and use it in GitHub Desktop.
Ruby development environment on CentOS 5.9

Requirements

Getting Started

Install dependency packages

$ sudo yum groupinstall "Development Tools" -y
$ sudo yum --enablerepo=remi update -y
$ sudo yum --enablerepo=remi install git vim-enhanced -y
$ sudo yum --enablerepo=remi install libxml2-devel libxslt-devel libcurl-devel sqlite-devel readline-devel openssl-devel -y

Setup the rbenv

sstephenson/rbenv · GitHub

$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ exec $SHELL -l

Install rbenv plugins

$ mkdir .rbenv/plugins
$ cd .rbenv/plugins
$ git clone git://github.com/sstephenson/ruby-build.git
$ git clone git://github.com/sstephenson/rbenv-default-gems.git
$ git clone git://github.com/sstephenson/rbenv-gem-rehash.git
$ git clone git://github.com/rkh/rbenv-update.git

Run rbenv update

$ cd ~/
$ rbenv update

Install the Ruby

$ rbenv install 2.0.0-p0
$ rbenv global 2.0.0-p0

Install RubyGems

$ gem update --system
$ gem install rake
$ gem install bundler
$ gem cleanup
@ipatch
Copy link

ipatch commented Sep 1, 2013

thanks for the write up man, this saved me a great deal of time.

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