(from a scratch install). Kinda, I imported my user home (~) from a Time Machine backup.
sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
I've already got /usr/local
in my PATH
.
Now, so we can easily update homebrew later:
brew install git
cd /usr/local
git init
git remote add origin git://github.com/mxcl/homebrew.git
mate ~/.bash_profile
export GEM_HOME="$(brew --prefix)/Cellar/Gems/1.9" export GEM_PATH="$(brew --prefix)/Cellar/Gems/1.9"
gem install brewbygems
gem update --system
The gem update throws an error:
ERROR: While executing gem ... (Errno::EACCES) Permission denied - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem
But it seems to have still updated okay.
gem install rails
gem install passenger
passenger-install-apache2-module
mate ~/sbin/passenger-ruby
#!/bin/bash export GEM_PATH=/usr/local/Cellar/Gems/1.8:/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby/gems/1.8/gems export GEM_HOME=/usr/local/Cellar/Gems/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby $*
chmod +x sbin/passenger-ruby
mate /etc/apache2/users/jasper.conf
LoadModule passenger_module /usr/local/Cellar/Gems/1.8/gems/passenger-2.2.10/ext/apache2/mod_passenger.so PassengerRoot /usr/local/Cellar/Gems/1.8/gems/passenger-2.2.10 PassengerRuby /Users/jasper/sbin/passenger-ruby RailsEnv development
sudo apachectl -k restart
Install Passenger.prefPane http://github.com/alloy/passengerpane
brew install mysql
export ARCHFLAGS="-arch x86_64"
gem install mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/bin/mysql_config
cp /usr/local/Cellar/mysql/5.1.43/com.mysql.mysqld.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.mysql.mysqld.plist
mysql_install_db
# mysql_secure_installation
launchctl start com.mysql.mysqld