-
-
Save Tyralion/1be4e286b19da3215c7e to your computer and use it in GitHub Desktop.
Revisions
-
milmih created this gist
Aug 23, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ #!/usr/bin/env bash if [ "$UID" -ne 0 ] then echo "Please run this script as root user" exit fi apt-get -y update apt-get -y upgrade apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev git sqlite3 libsqlite3-dev git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv mkdir /usr/local/rbenv/plugins git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins cat <<EOF >> /etc/skel/.bashrc #### begin rbenv configuration #### ## Remove these lines if you wish to use your own ## clone of rbenv (with your own rubies) export RBENV_ROOT=/usr/local/rbenv export PATH="$RBENV_ROOT/bin:$PATH" eval "$(rbenv init -)" # Allow local Gem management export GEM_HOME="$HOME/.gem" export GEM_PATH="$HOME/.gem" export PATH="$HOME/.gem/bin:$PATH" #### end rbenv configuration #### EOF cat <<EOF >> ~/.bashrc #### begin rbenv configuration #### ## Remove these lines if you wish to use your own ## clone of rbenv (with your own rubies) export RBENV_ROOT=/usr/local/rbenv export PATH="$RBENV_ROOT/bin:$PATH" eval "$(rbenv init -)" #### end rbenv configuration #### EOF source ~/.bashrc rbenv install 2.1.2 rbenv rehash rbenv global 2.1.2 gem install rbenv-rehash --no-ri --no-rdocp This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ echo "gem: --no-rdoc --no-ri" > ~/.gemrc