Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. ijin revised this gist Nov 3, 2012. 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
    @@ -23,8 +23,8 @@ fi

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
    chgrp -R ec2-user ec2-user
    chmod -R g+rwxXs ec2-user
    chgrp -R ec2-user /usr/local/rbenv
    chmod -R g+rwxXs /usr/local/rbenv


    # Check if clone succesful
  2. ijin revised this gist Nov 3, 2012. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -23,6 +23,9 @@ fi

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
    chgrp -R ec2-user ec2-user
    chmod -R g+rwxXs ec2-user


    # Check if clone succesful
    if [ $? -gt 0 ]; then
  3. @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
  4. @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>&- || {
  5. @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 '---------------------------------'
  6. @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 '---------------------------------'
  7. @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 '---------------------------------'
  8. @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.

  9. @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

  10. @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 '---------------------------------'
  11. @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
  12. @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
  13. @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
  14. @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
  15. @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
  16. @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