Skip to content

Instantly share code, notes, and snippets.

@cwsaylor
Created September 14, 2009 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cwsaylor/186878 to your computer and use it in GitHub Desktop.
Save cwsaylor/186878 to your computer and use it in GitHub Desktop.
Snow Leopard Developer Setup
== Install the Developer Tools from the Snow Leopard DVD
I mostly follow HiveLogic except for paths. I use the Mac OS X way of setting paths. I also compile everything into it's own folder for easy upgrading.
mate /etc/paths
[ Add the following to the TOP ]
---------------------------------------
~/bin
/usr/local/bin
/usr/local/ruby/bin
/usr/local/mysql/bin
/usr/local/git/bin
---------------------------------------
== Restart your terminal to pickup the new paths.
== Setup your src directory now.
mkdir /usr/local/src
chmod 777 /usr/local/src
cd /usr/local/src
== MySQL
== I follow HiveLogic's instructions for MySQL except for three exceptions.
http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/
1. You've already setup the path, so ignore that part.
2. There is a slightly newer version of MySQL
3. When you're done running 'sudo make install', version the folder
cd /usr/local
sudo mv mysql mysql-5.1.38
sudo ln -s mysql-5.1.38 mysql
== Ruby with Readline
cd /usr/local/src
curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.0.tar.gz
tar xzvf readline-6.0.tar.gz
cd readline-6.0
./configure
make
sudo make install
cd /usr/local/src
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz
tar xzvf ruby-1.8.7-p174.tar.gz
cd ruby-1.8.7-p174
./configure --prefix=/usr/local/ruby --enable-shared --enable-pthread --with-readline-dir=/usr/local CFLAGS=-D_XOPEN_SOURCE=1
make
sudo make install
cd /usr/local
sudo mv ruby ruby-1.8.7-p174
sudo ln -s ruby-1.8.7-p174 ruby
== Double check to make sure you have the right ruby before moving on.
which ruby
$ /usr/local/ruby/bin/ruby
== Gems
cd /usr/local/src
curl -O http://files.rubyforge.vm.bytemark.co.uk/rubygems/rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo /usr/local/ruby/bin/ruby setup.rb
sudo gem install rake rails capistrano mongrel_cluster sqlite3-ruby ruby-debug
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
sudo gem install engineyard-eycap --source=http://gems.github.com
== Git
I follow http://hivelogic.com/articles/compiling-git-on-snow-leopard/, except for the path, again. Compile with a new prefix and version the folder.
cd /usr/local/src
curl -Ohttp://kernel.org/pub/software/scm/git/git-1.6.4.2.tar.bz2
tar xzvf git-1.6.4.2.tar.bz2
cd git-1.6.4.2
./configure --prefix=/usr/local/git
make
sudo make install
cd /usr/local
sudo mv git
sudo ln -s git-1.6.4.2 git
== Sphinx
cd /usr/local/src
curl -O http://www.sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar xzvf sphinx-0.9.8.1.tar.gz
cd sphinx-0.9.8.1
./configure --prefix=/usr/local/ --with-mysql=/usr/local/mysql
make
sudo make install
== ImageMagick
cd /usr/local/src
mkdir imagemagick
cd imagemagick
curl -Ohttp://github.com/maddox/magick-installer/raw/41a4dc46c2a1db6bab456eb6feaeef75480858ac/magick-installer.sh
shmagick-installer.sh
sudo gem install rmagick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment