Skip to content

Instantly share code, notes, and snippets.

@NewAlexandria
Created February 13, 2012 21:11
Show Gist options
  • Save NewAlexandria/1820533 to your computer and use it in GitHub Desktop.
Save NewAlexandria/1820533 to your computer and use it in GitHub Desktop.
Installing Ruby Enterprise Edition into rbenv
########
# This file script wil show you how to install Ruby Enterprise Edition (REE) 1.8.7-2011-12 with
# rbenv, rails 3 and homebrew. Bundler is also used.
########
#setup the installer environment
brew install wget
wget -q http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.12.tar.gz
tar xzf ruby-enterprise-1.8.7-2011.12.tar.gz
brew install libiconv
brew link libiconv
brew install readline
brew link readline
brew install libxml2
brew link libxml2
brew install libxslt
brew link libxslt
# If this whole script fails, come back here and do the following dylib steps located here:
# http://www.refresherate.com/2010/01/08/fixing-ld-warning-in-usrlocalliblibz-dylib-file-is-not-of-required-architecture/
# make the install. The magis here is "--disable-option-checking" which will allow the libs to link
cd ruby-enterprise-1.8.7-2011.12/installer/
CC=/usr/bin/gcc-4.2 ./configure --prefix=/Users/ZacharyStarkJones/.rbenv/versions/ree-1.8.7-2011.12 -C --enable-shared --disable-option-checking --with-readline-dir=$(brew --prefix readline) --with-iconv-dir=$(brew --prefix libiconv)
make
make install
#proof it worked. Please double-check.
ls -al ~/.rbenv/versions/
# reset rbenv
rbenv rehash
# setup ruby with gems and bundler
ruby ~/Sites/ruby-enterprise-1.8.7-2011.12/rubygems/setup.rb
gem install rubygems-update
update_rubygems
# got gems?
bundle install
@thewatts
Copy link

This is legit!

Though, I'm getting some errors with 1.8.7-2012.02 and even the default in your script.

/Users/watts/Desktop/./rbenv_ree_install.sh: line 24: cd: /Users/watts/ruby-enterprise-1.8.7-2012.02/installer/: Not a directory
/Users/watts/Desktop/./rbenv_ree_install.sh: line 25: ./configure: No such file or directory

@mrgordon
Copy link

I think he must have meant source/ instead of installer/ (installer is a shell script)

That said, I got no errors but the new ree version did not show up in ~/.rbenv/versions/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment