Skip to content

Instantly share code, notes, and snippets.

@dammer
Forked from jnx/rbenv-install-system-wide.sh
Last active December 18, 2015 09:18
Show Gist options
  • Select an option

  • Save dammer/5760056 to your computer and use it in GitHub Desktop.

Select an option

Save dammer/5760056 to your computer and use it in GitHub Desktop.

Revisions

  1. dammer revised this gist Sep 3, 2015. 1 changed file with 0 additions and 7 deletions.
    7 changes: 0 additions & 7 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +0,0 @@
    https://github.com/sstephenson/ruby-build/wiki#187-p302-and-lower-segfaults-for-https-requests-on-os-x-107

    Ruby 1.8.7 patchlevel 302 (and below, possibly above, including ruby enterprise edition) have a known compiler bug, however compiling Ruby will finish without errors. The bug will cause a segmentation fault whenever an SSL connection is opened, like .../timeout.rb:60: [BUG] Segmentation fault.

    Try setting the following flags and recompiling Ruby:

    CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" rbenv install 1.8.7-p302
  2. dammer revised this gist Sep 3, 2015. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    https://github.com/sstephenson/ruby-build/wiki#187-p302-and-lower-segfaults-for-https-requests-on-os-x-107

    Ruby 1.8.7 patchlevel 302 (and below, possibly above, including ruby enterprise edition) have a known compiler bug, however compiling Ruby will finish without errors. The bug will cause a segmentation fault whenever an SSL connection is opened, like .../timeout.rb:60: [BUG] Segmentation fault.

    Try setting the following flags and recompiling Ruby:

    CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" rbenv install 1.8.7-p302
  3. dammer revised this gist Aug 8, 2013. 2 changed files with 5 additions and 7 deletions.
    3 changes: 1 addition & 2 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,7 @@
    # 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
    apt-get -y install build-essential libreadline-dev git-core

    # Install rbenv
    git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
    9 changes: 4 additions & 5 deletions rbenv-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,7 @@
    # 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
    apt-get -y install build-essential libreadline-dev git-core

    # Install rbenv:
    git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
    @@ -19,9 +18,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.2-p429:
    rbenv install 1.9.3-p429
    rbenv global 1.9.3-p429

    # Rehash:
    rbenv rehash
  4. dammer revised this gist Jul 17, 2013. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions rbenv-install-system-wide.sh
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,8 @@ 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
    # puppet
    chattr +a /etc/profile.d/rbenv.sh
    source /etc/profile.d/rbenv.sh

    # Install ruby-build:
    @@ -23,9 +25,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.2-p429:
    rbenv install 1.9.3-p429
    rbenv global 1.9.3-p429

    # Rehash:
    rbenv rehash
  5. @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
  6. @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
  7. @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
  8. @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
  9. @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
  10. @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