Skip to content

Instantly share code, notes, and snippets.

@jcanfield
Created July 26, 2012 23:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcanfield/3185273 to your computer and use it in GitHub Desktop.
Save jcanfield/3185273 to your computer and use it in GitHub Desktop.
Install Ruby and Homebrew on Mac OSX 10.7.3
#!/bin/bash
# We are going to install the latest version of Ruby on OSX
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
# Now load RVM into your shell
cd ~/
sudo vim .bash_profile
# Now add this to your .bash_profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Now restart your terminal and test
rvm
# Next step requires that you open up your Apple Store and install XCode
# Now install the latest version of Ruby
rvm install 1.9.3
# Let's make that default
rvm --default use 1.9.3
# Go ahead and install some Gems
gem install rails
gem install sinatra
#
# Alright, now you have Ruby up to date so let's get rid of Mac Ports 100%
sudo port -fp uninstall --follow-dependents installed
# This next step is optional but could be helpful if your running into errors. If you have personal apps installed here, be careful!
rm -rf \
/opt/local \
/Applications/DarwinPorts \
/Applications/MacPorts \
/Library/LaunchDaemons/org.macports.* \
/Library/Receipts/DarwinPorts*.pkg \
/Library/Receipts/MacPorts*.pkg \
/Library/StartupItems/DarwinPortsStartup \
/Library/Tcl/darwinports1.0 \
/Library/Tcl/macports1.0 \
~/.macports
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
# Let's install something like WGET with Homebrew
brew install wget
#
# And that is that. Hope that helps a little bit?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment