I recently set up a new Rails environment on Mac OS X 10.5 (Leopard). I googled for various bits and pieces. I have no idea how much of this translates to 10.6 (Snow Leopard).
I leaned on MacPorts to install Git, Ruby, RubyGems, PostgreSQL, and some other stuff that my Rails work depends on.
Xcode and MacPorts
- Install Xcode from OSX DVD.
- Install MacPorts via http://www.macports.org/install.php
- sudo port install git-core +svn+bash_completion+doc
[user]
email = {your@email.com}
name = {Your Name}
[core]
editor = mate -w
[color]
status = auto
diff = auto
branch = auto
[alias]
co = checkout
st = status
ci = commit
df = !git diff | mate
[push]
default = tracking
To enable bash_completion, add the following lines to the end of your .bash_profile or .profile:
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
Ruby 1.8.7 and RubyGems
- sudo port install ruby
- sudo port install rb-rubygems
Symlink /usr/local/bin/ruby to MacPorts install
- sudo ln -s /opt/local/bin/ruby /usr/local/bin/ruby
http://rmagick.rubyforge.org/install-osx.html
- sudo port install imagemagick +gs +q16
- sudo gem install rmagick
http://shifteleven.com/articles/2008/03/21/installing-postgresql-on-leopard-using-macports
- sudo port install postgresql83 postgresql83-server
- sudo mkdir -p /opt/local/var/db/postgresql83/defaultdb
- sudo chown postgres:postgres /opt/local/var/db/postgresql83/defaultdb
- sudo su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/defaultdb'
- sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql83-server.plist
- sudo env ARCHFLAGS="-arch i386" gem install postgres -- --with-pgsql-lib=/opt/local/lib/postgresql83 --with-pgsql-include=/opt/local/include/postgresql83
- sudo port install sphinx +postgresql83
- sudo gem install rails fastercsv redgreen git_remote_branch capistrano capistrano-ext ruby-debug ruby-prof sqlite3-ruby
- ssh-keygen (Enter to select all defaults)
- Add public key to GitHub account.

1 comments:
http://gist.github.com/241915
My .profile
Post a Comment