Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Create rbenv

  • Loading branch information...
commit d4efe3af80a5c5da7877ebbcfbec13f95353ca3f 1 parent 10be30b
@parkr authored
Showing with 46 additions and 0 deletions.
  1. +46 −0 rbenv
View
46 rbenv
@@ -0,0 +1,46 @@
+#!/bin/sh
+##############################################################
+#
+# rbenv installation script for ubuntu
+# Author: Parker Moore, http://parkermoore.de
+# GitHub: https://github.com/parkr
+#
+##############################################################
+
+set -e
+
+#
+# System dependencies
+#
+sudo apt-get -y install git-core curl
+
+#
+# Install rbenv
+#
+curl https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
+rbenv bootstrap-ubuntu-12-04
+rbenv bootstrap
+
+#
+# Install versions
+#
+
+declare -a RBVERS=("1.9.3-p362" "1.9.3-p194" "1.9.3-p0" "1.9.2-p320" "1.8.7-p371")
+
+for ruby_version in "${RBVERS[@]}"; do
+ ~/.rbenv/plugins/ruby-build/bin/ruby-build $RBVER ~/.rbenv/versions/${ruby_version} --with-openssl-dir=/usr/local
+ # Install shims for all Ruby binaries
+ ~/.rbenv/bin/rbenv rehash
+done
+
+~/.rbenv/bin/rbenv global ${RBVERS[0]}
+
+#
+# Load into shell at login
+#
+echo "export RBENV_ROOT=\"\${HOME}/.rbenv\"
+
+if [ -d \"\${RBENV_ROOT}\" ]; then
+export PATH=\"\${RBENV_ROOT}/bin:\${PATH}\"
+eval \"\$(rbenv init -)\"
+fi" >> ~/.profile
Please sign in to comment.
Something went wrong with that request. Please try again.