Created
August 15, 2011 18:35
-
-
Save mayoral/1147391 to your computer and use it in GitHub Desktop.
A script to set up my Ruby development environment on Lion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Homebrew | |
echo "Installing Homebrew..." | |
sudo mkdir /usr/local | |
sudo chown -R $USER /usr/local | |
curl -Lsf http://github.com/mxcl/homebrew/tarball/master | \ | |
tar xvz -C/usr/local --strip 1 | |
# Install Git | |
echo "Install Git..." | |
brew install git | |
# Make sure Homebrew is up to date | |
echo "Updating Homebrew..." | |
brew update | |
# Install WGET | |
echo "Installing WGET..." | |
brew install wget | |
# Install MySQL | |
echo "Installing MySQL..." | |
brew install mysql | |
# Setup the LaunchAgents directory | |
echo "Creating the LaunchAgents directory..." | |
mkdir -p ~/Library/LaunchAgents | |
# Configure MySQL | |
echo "Configuring MySQL..." | |
unset TMPDIR | |
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
# Launch MySQL at startup | |
echo "Adding MySQL to LaunchAgents..." | |
cp /usr/local/Cellar/mysql/5.5.14/com.mysql.mysqld.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist | |
# Install ImageMagick | |
echo "Installing ImageMagick..." | |
brew install imagemagick | |
# Install RVM | |
echo "Installing RVM..." | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >> ~/.zshrc | |
source ~/.zshrc | |
# Install REE | |
echo "Installing REE..." | |
CC=/usr/bin/gcc-4.2 rvm install ree | |
# Install global gems | |
echo "Installing global gems for REE..." | |
rvm ree@global | |
env ARCHFLAGS="-arch x86_64" gem install mysql --no-ri --no-rdoc | |
gem install rmagick --no-ri --no-rdoc | |
# Install 1.9.2 | |
echo "Installing 1.9.2..." | |
CC=/usr/bin/gcc-4.2 rvm install 1.9.2 | |
# Install global gems | |
echo "Installing global gems for 1.9.2..." | |
rvm 1.9.2@global | |
env ARCHFLAGS="-arch x86_64" gem install mysql --no-ri --no-rdoc | |
gem install rmagick --no-ri --no-rdoc | |
gem install bundler --no-ri --no-rdoc | |
# Set default RVM | |
echo "Setting default RVM Ruby..." | |
rvm use ree --default | |
# Install POW! | |
echo "Installing POW!..." | |
curl get.pow.cx | sh | |
# Install oh-my-zsh | |
echo "Installing oh-my-zsh..." | |
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh | |
source ~/.zshrc | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment