Skip to content

Instantly share code, notes, and snippets.

@ryoppy
Last active December 24, 2015 21:19
Show Gist options
  • Save ryoppy/6865129 to your computer and use it in GitHub Desktop.
Save ryoppy/6865129 to your computer and use it in GitHub Desktop.
rbenv-install-1.9.3
#!/bin/bash
set -ex
RUBY_VERSION="1.9.3-p484"
## rbenv
### preinstall
sudo yum -y install git gcc gcc-c++ kernel-devel zlib-devel openssl-devel readline-devel curl-devel libyaml-devel sqlite-devel
### cwd
cd
### download
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
### setting
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
. ~/.bash_profile
### ruby install
rbenv install ${RUBY_VERSION}
rbenv global ${RUBY_VERSION}
## bundler install
gem install bundler
rbenv rehash
### complete!
ruby -v
which ruby
gem -v
which gem
## Should
# bundle install --path vendor/bundle
# rbenv local ${RUBY_VERSION} && rbenv rehash
@ryoppy
Copy link
Author

ryoppy commented Oct 7, 2013

curl https://gist.github.com/ryoppy/6865129/raw/51c401c30efe6f4a70c61e34e5356784be4d1848/rbenv-install-1.9.3.sh | sh

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