Skip to content

Instantly share code, notes, and snippets.

@grepwood
Forked from jpfuentes2/rbenv-install-system-wide.sh
Last active August 29, 2015 14:05

Revisions

  1. Michael Dec revised this gist Sep 4, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -74,10 +74,11 @@ pushd /tmp
    fi

    cd ruby-build
    ./install.sh
    ./install.sh > ruby-build.install.log.$JOB_PID
    popd

    echo '---------------------------------'
    echo ' rbenv installed system wide to /usr/local/rbenv'
    echo " For your convenience, ruby-install log is in ruby-build.install.log.$JOB_PID"
    echo ' Remember to restart your shell for the changes to take effect!'
    echo '---------------------------------'
  2. Michael Dec revised this gist Sep 4, 2014. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,13 @@ fi
    # Install pre-requirements
    if [ "$DISTRO" == "Redhat" ]; then
    yum install -y -q gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    make bzip2 autoconf automake libtool bison iconv-devel git-core
    make bzip2 autoconf automake libtool bison iconv-devel git-core > rbenv.yum.$JOB_PID
    if [ `grep -E Package.*'gcc-c\+\+|patch|readline|zlib-|zlib-devel|make|bzip2|autoconf|automake|libtool|bison|git'.*already\ installed\ and\ latest\ version rbenv.yum.$JOB_PID | wc -l` -eq "12" ]; then
    rm -f rbenv.yum.$JOB_PID
    else
    echo "While installing rbenv, yum behaved differently than before groupinstalling devtools"
    echo "Check rbenv.yum.$JOB_PID"
    fi
    elif [ "$DISTRO" == "Debian" ]; then
    # Needs testing
    aptitude install gcc patch readline readline-dev zlib1g zlib1g-dev libyaml-dev libffi-dev openssl-dev \
  3. Michael Dec revised this gist Sep 4, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -12,10 +12,10 @@ elif command -v aptitude >/dev/null 2>&1; then
    fi

    # Install pre-requirements
    if["$DISTRO" == "Redhat"]; then
    if [ "$DISTRO" == "Redhat" ]; then
    yum install -y -q gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    make bzip2 autoconf automake libtool bison iconv-devel git-core
    elif["$DISTRO" == "Debian"]; then
    elif [ "$DISTRO" == "Debian" ]; then
    # Needs testing
    aptitude install gcc patch readline readline-dev zlib1g zlib1g-dev libyaml-dev libffi-dev openssl-dev \
    make bzip2 autoconf automake libtool bison iconv-dev git
  4. Michael Dec revised this gist Sep 4, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -12,10 +12,10 @@ elif command -v aptitude >/dev/null 2>&1; then
    fi

    # Install pre-requirements
    if["$DISTRO" = "Redhat"]; then
    if["$DISTRO" == "Redhat"]; then
    yum install -y -q gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    make bzip2 autoconf automake libtool bison iconv-devel git-core
    elif["$DISTRO" = "Debian"]; then
    elif["$DISTRO" == "Debian"]; then
    # Needs testing
    aptitude install gcc patch readline readline-dev zlib1g zlib1g-dev libyaml-dev libffi-dev openssl-dev \
    make bzip2 autoconf automake libtool bison iconv-dev git
  5. Michael Dec revised this gist Sep 4, 2014. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@

    # rbenv system wide installation script
    # Forked from https://gist.github.com/jpfuentes2/2002954
    JOB_PID=$$

    # Installs rbenv system wide on CentOS 5/6 and Debian, also allows single user installs.
    if command -v yum >/dev/null 2>&1; then
    @@ -12,7 +13,7 @@ fi

    # Install pre-requirements
    if["$DISTRO" = "Redhat"]; then
    yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    yum install -y -q gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    make bzip2 autoconf automake libtool bison iconv-devel git-core
    elif["$DISTRO" = "Debian"]; then
    # Needs testing
    @@ -33,12 +34,14 @@ if [[ -d "/usr/local/rbenv" ]]; then
    fi

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv > git.rbenv.$JOB_PID

    # Check if clone succesful
    if [ $? -gt 0 ]; then
    echo >&2 "Error: Git clone error! See above.";
    exit 1;
    else
    rm -f git.rbenv.$JOB_PID
    fi

    # Add rbenv to the path
    @@ -54,12 +57,14 @@ chmod +x /etc/profile.d/rbenv.sh
    # Install ruby-build:
    pushd /tmp
    rm -rf /tmp/ruby-build
    git clone git://github.com/sstephenson/ruby-build.git
    git clone git://github.com/sstephenson/ruby-build.git > git.ruby-build.$JOB_PID

    # Check if clone succesful
    if [ $? -gt 0 ]; then
    echo >&2 "Error: Git clone error! See above.";
    exit 1;
    else
    rm -f git.ruby-build.$JOB_PID
    fi

    cd ruby-build
  6. Michael Dec revised this gist Aug 27, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -11,10 +11,10 @@ elif command -v aptitude >/dev/null 2>&1; then
    fi

    # Install pre-requirements
    if["$DISTRO" -eq "Redhat"]; then
    if["$DISTRO" = "Redhat"]; then
    yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    make bzip2 autoconf automake libtool bison iconv-devel git-core
    elif["$DISTRO" -eq "Debian"]; then
    elif["$DISTRO" = "Debian"]; then
    # Needs testing
    aptitude install gcc patch readline readline-dev zlib1g zlib1g-dev libyaml-dev libffi-dev openssl-dev \
    make bzip2 autoconf automake libtool bison iconv-dev git
  7. Michael Dec revised this gist Aug 27, 2014. 1 changed file with 16 additions and 5 deletions.
    21 changes: 16 additions & 5 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,24 @@
    #!/bin/bash

    # CentOS rbenv system wide installation script
    # Forked from https://gist.github.com/1237417
    # rbenv system wide installation script
    # Forked from https://gist.github.com/jpfuentes2/2002954

    # Installs rbenv system wide on CentOS 5/6, also allows single user installs.
    # Installs rbenv system wide on CentOS 5/6 and Debian, also allows single user installs.
    if command -v yum >/dev/null 2>&1; then
    DISTRO="Redhat"
    elif command -v aptitude >/dev/null 2>&1; then
    DISTRO="Debian"
    fi

    # Install pre-requirements
    yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    make bzip2 autoconf automake libtool bison iconv-devel git-core
    if["$DISTRO" -eq "Redhat"]; then
    yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    make bzip2 autoconf automake libtool bison iconv-devel git-core
    elif["$DISTRO" -eq "Debian"]; then
    # Needs testing
    aptitude install gcc patch readline readline-dev zlib1g zlib1g-dev libyaml-dev libffi-dev openssl-dev \
    make bzip2 autoconf automake libtool bison iconv-dev git
    fi

    # Check if Git is installed
    hash git 2>&- || {
  8. @Egg-McMuffin Egg-McMuffin revised this gist Feb 2, 2012. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,8 @@
    # Installs rbenv system wide on CentOS 5/6, also allows single user installs.

    # Install pre-requirements
    yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel git-core
    yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
    make bzip2 autoconf automake libtool bison iconv-devel git-core

    # Check if Git is installed
    hash git 2>&- || {
    @@ -23,6 +24,12 @@ fi
    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv

    # Check if clone succesful
    if [ $? -gt 0 ]; then
    echo >&2 "Error: Git clone error! See above.";
    exit 1;
    fi

    # Add rbenv to the path
    echo '# rbenv setup - only add RBENV PATH variables if no single user install found' > /etc/profile.d/rbenv.sh
    echo 'if [[ ! -d "${HOME}/.rbenv" ]]; then' >> /etc/profile.d/rbenv.sh
    @@ -37,6 +44,13 @@ chmod +x /etc/profile.d/rbenv.sh
    pushd /tmp
    rm -rf /tmp/ruby-build
    git clone git://github.com/sstephenson/ruby-build.git

    # Check if clone succesful
    if [ $? -gt 0 ]; then
    echo >&2 "Error: Git clone error! See above.";
    exit 1;
    fi

    cd ruby-build
    ./install.sh
    popd
  9. @Egg-McMuffin Egg-McMuffin revised this gist Feb 1, 2012. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -6,8 +6,7 @@
    # Installs rbenv system wide on CentOS 5/6, also allows single user installs.

    # Install pre-requirements
    yum -y groupinstall "Development Tools"
    yum -y install git-core openssl-devel readline-devel
    yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel git-core

    # Check if Git is installed
    hash git 2>&- || {
  10. @Egg-McMuffin Egg-McMuffin revised this gist Jan 30, 2012. 2 changed files with 19 additions and 6 deletions.
    18 changes: 13 additions & 5 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -6,14 +6,21 @@
    # Installs rbenv system wide on CentOS 5/6, also allows single user installs.

    # Install pre-requirements
    yum groupinstall "Development Tools"
    yum install git-core openssl-devel readline-devel
    yum -y groupinstall "Development Tools"
    yum -y install git-core openssl-devel readline-devel

    # Check Git has been installed
    # Check if Git is installed
    hash git 2>&- || {
    echo >&2 "Error: Git not found. Hint: Try installing the RPMForge or EPEL package repository."; exit 1;
    echo >&2 "Error: Git not found. Hint: Try installing the RPMForge or EPEL package repository.";
    exit 1;
    }

    # Check if /usr/local/rbenv already exists
    if [[ -d "/usr/local/rbenv" ]]; then
    echo >&2 "Error: /usr/local/rbenv already exists. Aborting installation.";
    exit 1;
    fi

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv

    @@ -29,12 +36,13 @@ chmod +x /etc/profile.d/rbenv.sh

    # Install ruby-build:
    pushd /tmp
    rm -rf /tmp/ruby-build
    git clone git://github.com/sstephenson/ruby-build.git
    cd ruby-build
    ./install.sh
    popd

    echo '---------------------------------'
    echo ' rbenv installed system wide to /usr/local/rbenv'
    echo ' Please restart your shell: exec $SHELL'
    echo ' Remember to restart your shell for the changes to take effect!'
    echo '---------------------------------'
    7 changes: 6 additions & 1 deletion rbenv-install.sh
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,11 @@

    # Installs rbenv to user home on CentOS 5/6.

    if [[ -d "${HOME}/.rbenv" ]]; then
    echo >&2 "Error: ${HOME}/.rbenv already exists. Aborting installation.";
    exit 1;
    fi

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git ~/.rbenv

    @@ -14,5 +19,5 @@ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

    echo '---------------------------------'
    echo " rbenv installed to $HOME/.rbenv"
    echo ' Please restart your shell: exec $SHELL'
    echo ' Remember to restart your shell for the changes to take effect!'
    echo '---------------------------------'
  11. @Egg-McMuffin Egg-McMuffin revised this gist Jan 30, 2012. 2 changed files with 9 additions and 9 deletions.
    13 changes: 6 additions & 7 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    #!/bin/bash

    # CentOS rbenv system wide installation script
    # Forked from https://gist.github.com/1237417

    @@ -24,7 +26,6 @@ echo ' eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
    echo 'fi' >> /etc/profile.d/rbenv.sh

    chmod +x /etc/profile.d/rbenv.sh
    source /etc/profile.d/rbenv.sh

    # Install ruby-build:
    pushd /tmp
    @@ -33,9 +34,7 @@ pushd /tmp
    ./install.sh
    popd

    # Install Ruby 1.9.3-p0
    rbenv install 1.9.3-p0
    rbenv global 1.9.3-p0

    # Rehash:
    rbenv rehash
    echo '---------------------------------'
    echo ' rbenv installed system wide to /usr/local/rbenv'
    echo ' Please restart your shell: exec $SHELL'
    echo '---------------------------------'
    5 changes: 3 additions & 2 deletions rbenv-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    #!/bin/bash

    # CentOS rbenv installation script
    # Forked from https://gist.github.com/1237417

    @@ -9,9 +11,8 @@ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
    # Add rbenv to the path
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
    echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
    source ~/.bash_profile

    echo '---------------------------------'
    echo " rbenv installed to $HOME/.rbenv"
    echo " Restart your shell if an existing system wide installation exists!"
    echo ' Please restart your shell: exec $SHELL'
    echo '---------------------------------'
  12. @Egg-McMuffin Egg-McMuffin revised this gist Jan 30, 2012. 2 changed files with 2 additions and 4 deletions.
    1 change: 0 additions & 1 deletion rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    # CentOS rbenv system wide installation script
    # Forked from https://gist.github.com/1237417
    # bash < <( curl -s https://raw.github.com/gist/1699769/rbenv-install-system-wide.sh )

    # Installs rbenv system wide on CentOS 5/6, also allows single user installs.

    5 changes: 2 additions & 3 deletions rbenv-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,14 @@
    # CentOS rbenv installation script
    # Forked from https://gist.github.com/1237417
    # bash < <( curl -s https://raw.github.com/gist/1699769/rbenv-install.sh )

    # Installs rbenv to user home on CentOS 5/6.

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git ~/.rbenv

    # Add rbenv to the path
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile
    echo 'eval "$(rbenv init -)"' >> .bash_profile
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
    echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
    source ~/.bash_profile

    echo '---------------------------------'
  13. @Egg-McMuffin Egg-McMuffin revised this gist Jan 30, 2012. 2 changed files with 2 additions and 0 deletions.
    1 change: 1 addition & 0 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    # CentOS rbenv system wide installation script
    # Forked from https://gist.github.com/1237417
    # bash < <( curl -s https://raw.github.com/gist/1699769/rbenv-install-system-wide.sh )

    # Installs rbenv system wide on CentOS 5/6, also allows single user installs.

    1 change: 1 addition & 0 deletions rbenv-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    # CentOS rbenv installation script
    # Forked from https://gist.github.com/1237417
    # bash < <( curl -s https://raw.github.com/gist/1699769/rbenv-install.sh )

    # Installs rbenv to user home on CentOS 5/6.

  14. @Egg-McMuffin Egg-McMuffin revised this gist Jan 30, 2012. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions rbenv-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,8 @@
    # CentOS rbenv installation script
    # Forked from https://gist.github.com/1237417

    # Installs rbenv to user home on CentOS 5/6.

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git ~/.rbenv

  15. @Egg-McMuffin Egg-McMuffin revised this gist Jan 30, 2012. 2 changed files with 29 additions and 34 deletions.
    36 changes: 23 additions & 13 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,27 @@
    # Update, upgrade and install development tools:
    apt-get update
    apt-get -y upgrade
    apt-get -y install build-essential
    apt-get -y install git-core
    # CentOS rbenv system wide installation script
    # Forked from https://gist.github.com/1237417

    # Installs rbenv system wide on CentOS 5/6, also allows single user installs.

    # Install pre-requirements
    yum groupinstall "Development Tools"
    yum install git-core openssl-devel readline-devel

    # Check Git has been installed
    hash git 2>&- || {
    echo >&2 "Error: Git not found. Hint: Try installing the RPMForge or EPEL package repository."; exit 1;
    }

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv

    # Add rbenv to the path:
    echo '# rbenv setup' > /etc/profile.d/rbenv.sh
    echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
    echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
    echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
    # Add rbenv to the path
    echo '# rbenv setup - only add RBENV PATH variables if no single user install found' > /etc/profile.d/rbenv.sh
    echo 'if [[ ! -d "${HOME}/.rbenv" ]]; then' >> /etc/profile.d/rbenv.sh
    echo ' export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
    echo ' export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
    echo ' eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
    echo 'fi' >> /etc/profile.d/rbenv.sh

    chmod +x /etc/profile.d/rbenv.sh
    source /etc/profile.d/rbenv.sh
    @@ -23,9 +33,9 @@ pushd /tmp
    ./install.sh
    popd

    # Install Ruby 1.9.2-p290:
    rbenv install 1.9.2-p290
    rbenv global 1.9.2-p290
    # Install Ruby 1.9.3-p0
    rbenv install 1.9.3-p0
    rbenv global 1.9.3-p0

    # Rehash:
    rbenv rehash
    27 changes: 6 additions & 21 deletions rbenv-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,27 +1,12 @@
    # Update, upgrade and install development tools:
    apt-get update
    apt-get -y upgrade
    apt-get -y install build-essential
    apt-get -y install git-core

    # Install rbenv:
    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git ~/.rbenv

    # Add rbenv to the path:
    # Add rbenv to the path
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile
    echo 'eval "$(rbenv init -)"' >> .bash_profile
    source ~/.bash_profile

    # Install ruby-build:
    pushd /tmp
    git clone git://github.com/sstephenson/ruby-build.git
    cd ruby-build
    ./install.sh
    popd

    # Install Ruby 1.9.2-p290:
    rbenv install 1.9.2-p290
    rbenv global 1.9.2-p290

    # Rehash:
    rbenv rehash
    echo '---------------------------------'
    echo " rbenv installed to $HOME/.rbenv"
    echo " Restart your shell if an existing system wide installation exists!"
    echo '---------------------------------'
  16. @fesplugas fesplugas revised this gist Sep 23, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
    echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh

    chmod +x /etc/profile.d/rbenv.sh
    /etc/profile.d/rbenv.sh
    source /etc/profile.d/rbenv.sh

    # Install ruby-build:
    pushd /tmp
  17. @fesplugas fesplugas revised this gist Sep 22, 2011. 3 changed files with 37 additions and 11 deletions.
    31 changes: 31 additions & 0 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    # Update, upgrade and install development tools:
    apt-get update
    apt-get -y upgrade
    apt-get -y install build-essential
    apt-get -y install git-core

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv

    # Add rbenv to the path:
    echo '# rbenv setup' > /etc/profile.d/rbenv.sh
    echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
    echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
    echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh

    chmod +x /etc/profile.d/rbenv.sh
    /etc/profile.d/rbenv.sh

    # Install ruby-build:
    pushd /tmp
    git clone git://github.com/sstephenson/ruby-build.git
    cd ruby-build
    ./install.sh
    popd

    # Install Ruby 1.9.2-p290:
    rbenv install 1.9.2-p290
    rbenv global 1.9.2-p290

    # Rehash:
    rbenv rehash
    11 changes: 6 additions & 5 deletions install-rbenv.sh → rbenv-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,26 +1,27 @@
    # Update, upgrade and install development tools:
    apt-get update
    apt-get -y upgrade
    apt-get -y install build-essential
    apt-get -y install git-core

    # And now install rbenv
    # Install rbenv:
    git clone git://github.com/sstephenson/rbenv.git ~/.rbenv

    # Add rbenv to your path
    # Add rbenv to the path:
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile
    echo 'eval "$(rbenv init -)"' >> .bash_profile
    source ~/.bash_profile

    # Install ruby-build
    # Install ruby-build:
    pushd /tmp
    git clone git://github.com/sstephenson/ruby-build.git
    cd ruby-build
    ./install.sh
    popd

    # Install Ruby 1.9.2-p290
    # Install Ruby 1.9.2-p290:
    rbenv install 1.9.2-p290
    rbenv global 1.9.2-p290

    # Rehash!
    # Rehash:
    rbenv rehash
    6 changes: 0 additions & 6 deletions rbenv-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +0,0 @@
    echo '# rbenv setup' > /etc/profile.d/rbenv.sh
    echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
    echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
    echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh

    chmod +x /etc/profile.d/rbenv.sh
  18. @fesplugas fesplugas revised this gist Sep 22, 2011. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions rbenv-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    echo '# rbenv setup' > /etc/profile.d/rbenv.sh
    echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
    echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
    echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh

    chmod +x /etc/profile.d/rbenv.sh
  19. @fesplugas fesplugas revised this gist Sep 22, 2011. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions install-rbenv.sh
    Original file line number Diff line number Diff line change
    @@ -21,3 +21,6 @@ popd
    # Install Ruby 1.9.2-p290
    rbenv install 1.9.2-p290
    rbenv global 1.9.2-p290

    # Rehash!
    rbenv rehash
  20. @fesplugas fesplugas revised this gist Sep 22, 2011. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions install-rbenv.sh
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,12 @@ apt-get -y install build-essential
    apt-get -y install git-core

    # And now install rbenv
    git clone git://github.com/sstephenson/rbenv.git .rbenv
    git clone git://github.com/sstephenson/rbenv.git ~/.rbenv

    # Add rbenv to your path
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile
    echo 'eval "$(rbenv init -)"' >> .bash_profile
    exec
    source ~/.bash_profile

    # Install ruby-build
    pushd /tmp
  21. @fesplugas fesplugas created this gist Sep 22, 2011.
    21 changes: 21 additions & 0 deletions install-rbenv.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    apt-get update
    apt-get -y upgrade
    apt-get -y install build-essential
    apt-get -y install git-core

    # And now install rbenv
    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

    # Install ruby-build
    pushd /tmp
    git clone git://github.com/sstephenson/ruby-build.git
    cd ruby-build
    ./install.sh
    popd

    # Install Ruby 1.9.2-p290
    rbenv install 1.9.2-p290
    rbenv global 1.9.2-p290