Please read for an updated status on RailsCasts:
Learn more or hide this
GitHub User: Torrents
It turns out I have xcode 4.3.2 installed but not the command line tools (xcode-> preferences -> downloads). When I ran brew --config it showed my Clang as: 2.1 build 163. After downloading/installing the xcode command line tools brew --config shows Clang: 3.1 build 318.
Then I reinstalled postgresql (brew uninstall postgresql / brew install postgresql) and restarted my server and BAM my postgres command line tools worked...no more segmentation fault.
Answer found on the homebrew github page: https://github.com/mxcl/homebrew/issues/10979
Thanks for the tip house9!
Unfortunately I've never gotten it to work. I uninstalled the pg gem (I had both 0.13.2 and 0.14.0 installed) and re-installed 0.13.2 with:
sudo gem install pg --version 0.13.2 -- --with-pg-config=/usr/local/Cellar/postgresql/9.1.3/bin/pg_config
to no avail. Still getting "segmentation fault: 11" when I get to the psql prompt with "rails db" or with something like "psql -U [username] [db_name]".
My app requires pg 0.13.2.
Thanks for the episode. I followed along and everything worked as expected (I did have to take aharte's advice to move /usr/local/bin above /usr/bin in /etc/paths to get 9.1.3 recognized).
However when I run "rails db" and try any commands against postgres I get a segmentation fault: 11. I installed postgres with the > brew install postgresql used in the railscast. I'm on Lion and > psql --version returns "psql (PostgreSQL) 9.1.3"
Any thoughts on the segmentation fault?
Helpful for me. It's nice to have a visual walkthrough so I can see it step by step, especially since I'm new.