Skip to content

Instantly share code, notes, and snippets.

@wmakley
Forked from silviorelli/gist:ad8e1d80bdc0245eb7e7
Last active October 7, 2021 09:41
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save wmakley/8dfe436dfe345efae3ddf6756f9766b6 to your computer and use it in GitHub Desktop.
Save wmakley/8dfe436dfe345efae3ddf6756f9766b6 to your computer and use it in GitHub Desktop.
Install Ruby 1.8.7 on Mac OSX 10.12 Sierra with rbenv
#!/bin/sh
# The main issues with Ruby 1.8.7 are that it won't build with Clang,
# and the Net::HTTPS module won't work with modern versions of OpenSSL.
#
# This assumes you have already set up homebrew, and run: xcode-select --install
brew install homebrew/dupes/apple-gcc42
brew install libyaml libffi
brew install https://github.com/Homebrew/homebrew-versions/raw/586b7e9012a3ed1f9df6c43d0483c65549349289/openssl098.rb
export CC=/usr/local/bin/gcc-4.2
export CFLAGS='-g -O2'
export RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/opt/openssl098
export CONFIGURE_OPTS=--with-openssl-dir=/usr/local/opt/openssl098
rbenv install 1.8.7-p375
# Important gems:
# Rake is not installed by default, but you should start with a very old version before installing 10+:
gem install rake -v 0.7.3 # needed for very old Rails sites and some old gems to install
gem install slimgems # needed for Rails 1 + 2 to install
# if you want the latest rdoc for 1.8:
gem install rdoc -v 3.12.2
gem install rdoc-data -v 3.12
rdoc-data --install
# as of this writing, the latest version of bundler, 1.14.5, was still backwards compatible with Ruby 1.8
gem install bundler
# The following gem versions are known to be the last working 1.8 versions:
# gem 'rack', '~> 1.1.0'
# gem 'pg', '~> 0.17.1'
# gem 'i18n', '0.6.11'
# gem 'money', '4.0.2'
# gem 'nokogiri', '~> 1.5.10'
# gem 'activemerchant', '~> 1.43.2'
# gem 'httpclient', '~> 2.7.0'
@wmakley
Copy link
Author

wmakley commented Aug 10, 2019

Thanks @estevaom! My instructions stopped working for me completely and I have just been Docker. To everyone referring to my gist, please note that it certainly does not work any more.

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