-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathREADME.OS_X
19 lines (10 loc) · 1012 Bytes
/
README.OS_X
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
= Compiling on MacOS X
If you are building/installing ruby-pg on MacOS X, and the installation doesn't work at first, here are a few things you can try.
== Compiling With the Correct Architecture
OS X supports both architecture-specific binaries (e.g. i386), as well as universal binaries (i.e. i386 & ppc). If ruby is built as a universal binary and postgresql is not, you need to specify the path to the appropriate pg_config binary or set the environment variable ARCHFLAGS appropriately.
For example, if you're using the stock Ruby binary, and PostgreSQL 8.4.x installed from MacPorts (without specifying the {{{+universal}}} variant), do:
gem install -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
Alternatively, if the build system can't figure out which architectures it should include, you may need to set the 'ARCHFLAGS' environment variable explicitly:
sudo env ARCHFLAGS='-arch i386' gem install pg
or, if you're building from source:
rake compile ARCHFLAGS="-arch i386"