Last active
December 24, 2015 21:19
-
-
Save ryoppy/6865129 to your computer and use it in GitHub Desktop.
rbenv-install-1.9.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Author
ryoppy
commented
Oct 7, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment