Linux

超メモ:一発rubyインストールなスクリプト

一発rubyインストールなスクリプト

メモ的に
Centos6.6にruby 2.1.4 をインストール時につかったスクリプト

#!/bin/bash

sudo yum -y install git
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
rbenv install 2.1.4
sudo yum -y install gcc make openssl-devel libxml2-devel libxslt-devel
rbenv install 2.1.4
rbenv global 2.1.4
rbenv exec gem install bundler
rbenv rehash
rbenv exec gem list
echo "source 'https://rubygems.org'" >> Gemfile
echo "gem 'ec2ctl'" >> Gemfile
echo "gem 'aws-sdk'" >> Gemfile
gem install nokogiri -- --use-system-libraries=true --with-xml2-include=/usr/include/libxml2/
bundle install

-Linux
-,