# Snow leopard + pg gem

**URL:** <https://www.ruby-forum.com/t/snow-leopard-pg-gem/174640>\
**Category:** Rails\
**Created:** [August 30, 2009, 4:58pm UTC](https://www.ruby-forum.com/t/snow-leopard-pg-gem/174640 "2009-08-30T16:58:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5f9b8f/32.png) [@jai](https://www.ruby-forum.com/u/jai)\
**Post date:** [August 30, 2009, 4:58pm UTC](https://www.ruby-forum.com/t/snow-leopard-pg-gem/174640/1 "2009-08-30T16:58:15Z")

</div>

Hi,

I installed snow leopard on my machine and my ruby on rails project  
stopped working… When I tried

script/server

I this error

Booting WEBrick  
=\> Rails 2.3.3 application starting on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:76:in  
`establish_connection': Please install the postgresql adapter: `gem  
install activerecord-postgresql-adapter`(dlopen(/Library/Ruby/Gems/1.8/gems/pg-0.8.0/lib/pg.bundle, 9): no suitable image found. Did find: (RuntimeError) /Library/Ruby/Gems/1.8/gems/pg-0.8.0/lib/pg.bundle: no matching architecture in universal wrapper - /Library/Ruby/Gems/1.8/gems/pg-0.8.0/lib/pg.bundle) from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in`establish\_connection’  
from  
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.3/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:55:in  
`establish_connection' from /Library/Ruby/Gems/1.8/gems/rails-2.3.3/lib/initializer.rb:438:in `initialize\_database’  
from  
/Library/Ruby/Gems/1.8/gems/rails-2.3.3/lib/initializer.rb:141:in  
`process' from /Library/Ruby/Gems/1.8/gems/rails-2.3.3/lib/initializer.rb:113:in `send’  
from  
/Library/Ruby/Gems/1.8/gems/rails-2.3.3/lib/initializer.rb:113:in `run' from /Users/{redacted}/Development/ROR Apps/{redacted}/Source/{redacted}/config/environment.rb:9 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem\_original\_require’  
from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:31:in  
`require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require’  
from  
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active\_support/dependencies.rb:521:in  
`new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require’  
from  
/Library/Ruby/Gems/1.8/gems/rails-2.3.3/lib/commands/server.rb:84  
from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’  
from script/server:3

Obviously there is no gem with such a name so I tried sudo gem install  
pg and I the following error message

NFO: `gem install -y` is now default and will be removed  
INFO: use --ignore-dependencies to install only the gems you list  
Building native extensions. This could take a while…  
ERROR: Error installing pg:  
ERROR: Failed to build gem native extension.  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby  
extconf.rb  
mkmf.rb can’t find header files for ruby at  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/pg-0.8.0  
for inspection.  
Results logged to /Library/Ruby/Gems/1.8/gems/pg-0.8.0/ext/gem\_make.out

So I uninstalled XCode and Postgresql 8.3 and installed Xcode from the  
snow leopard disk and installed postgresql 8.4. I tried to install the  
pg gem again and got this error

Building native extensions. This could take a while…  
ERROR: Error installing pg:  
ERROR: Failed to build gem native extension.  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby  
extconf.rb  
checking for main() in -lpq… yes  
checking for libpq-fe.h… yes  
checking for libpq/libpq-fs.h… yes  
checking for PQconnectionUsedPassword()… no  
checking for PQisthreadsafe()… no  
checking for PQprepare()… no  
checking for PQexecParams()… no  
checking for PQescapeString()… no  
checking for PQescapeStringConn()… no  
checking for lo\_create()… no  
checking for pg\_encoding\_to\_char()… no  
checking for PQsetClientEncoding()… no  
creating Makefile  
make  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0  
-I. -DHAVE\_LIBPQ\_FE\_H -DHAVE\_LIBPQ\_LIBPQ\_FS\_H  
-I/Library/PostgreSQL/8.4/include -D\_XOPEN\_SOURCE -D\_DARWIN\_C\_SOURCE  
-fno-common -arch i386 -arch x86\_64 -g -Os -pipe -fno-common  
-DENABLE\_DTRACE -fno-common -pipe -fno-common -c compat.c  
In file included from compat.c:16:  
compat.h:38:2: error: #error PostgreSQL client version too old, requires  
7.3 or later.  
In file included from compat.c:16:  
compat.h:69: error: conflicting types for â€˜PQconnectionNeedsPasswordâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:293: error: previous  
declaration of â€˜PQconnectionNeedsPasswordâ€™ was here  
compat.h:70: error: conflicting types for â€˜PQconnectionUsedPasswordâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:294: error: previous  
declaration of â€˜PQconnectionUsedPasswordâ€™ was here  
compat.h:121: error: redefinition of typedef â€˜PQnoticeReceiverâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:144: error: previous  
declaration of â€˜PQnoticeReceiverâ€™ was here  
compat.h:125: error: redeclaration of enumerator â€˜PQERRORS\_TERSEâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:105: error: previous  
definition of â€˜PQERRORS\_TERSEâ€™ was here  
compat.h:126: error: redeclaration of enumerator â€˜PQERRORS\_DEFAULTâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:106: error: previous  
definition of â€˜PQERRORS\_DEFAULTâ€™ was here  
compat.h:128: error: redeclaration of enumerator â€˜PQERRORS\_VERBOSEâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:108: error: previous  
definition of â€˜PQERRORS\_VERBOSEâ€™ was here  
compat.h:128: error: conflicting types for â€˜PGVerbosityâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:108: error: previous  
declaration of â€˜PGVerbosityâ€™ was here  
compat.h:132: error: redeclaration of enumerator â€˜PQTRANS\_IDLEâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:96: error: previous  
definition of â€˜PQTRANS\_IDLEâ€™ was here  
compat.h:133: error: redeclaration of enumerator â€˜PQTRANS\_ACTIVEâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:97: error: previous  
definition of â€˜PQTRANS\_ACTIVEâ€™ was here  
compat.h:134: error: redeclaration of enumerator â€˜PQTRANS\_INTRANSâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:98: error: previous  
definition of â€˜PQTRANS\_INTRANSâ€™ was here  
compat.h:135: error: redeclaration of enumerator â€˜PQTRANS\_INERRORâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:99: error: previous  
definition of â€˜PQTRANS\_INERRORâ€™ was here  
compat.h:137: error: redeclaration of enumerator â€˜PQTRANS\_UNKNOWNâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:101: error: previous  
definition of â€˜PQTRANS\_UNKNOWNâ€™ was here  
compat.h:137: error: conflicting types for â€˜PGTransactionStatusTypeâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:101: error: previous  
declaration of â€˜PGTransactionStatusTypeâ€™ was here  
compat.h:142: error: conflicting types for â€˜PQtransactionStatusâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:285: error: previous  
declaration of â€˜PQtransactionStatusâ€™ was here  
compat.h:143: error: conflicting types for â€˜PQparameterStatusâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:287: error: previous  
declaration of â€˜PQparameterStatusâ€™ was here  
compat.h:157: error: conflicting types for â€˜PQsetErrorVerbosityâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:309: error: previous  
declaration of â€˜PQsetErrorVerbosityâ€™ was here  
compat.h:169:2: error: #error unsupported postgresql version, requires  
7.3 or later.  
compat.c: In function â€˜PQsetClientEncodingâ€™:  
compat.c:21: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:28: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:35: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:43: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:49: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:55: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:61: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:67: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:73: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:79: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:85: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:93: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:102: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:109: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:115: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:125: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:131: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:137: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:143: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:151: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:159: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:167: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:173: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:179: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:185: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:191: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:197: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:203: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:209: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:215: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:221: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:230: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:237: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:280: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:339: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:386: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:465: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:539: error: old-style parameter declarations in prototyped  
function definition  
compat.c:539: error: expected â€˜{â€™ at end of input  
In file included from compat.c:16:  
compat.h:38:2: error: #error PostgreSQL client version too old, requires  
7.3 or later.  
In file included from compat.c:16:  
compat.h:69: error: conflicting types for â€˜PQconnectionNeedsPasswordâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:293: error: previous  
declaration of â€˜PQconnectionNeedsPasswordâ€™ was here  
compat.h:70: error: conflicting types for â€˜PQconnectionUsedPasswordâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:294: error: previous  
declaration of â€˜PQconnectionUsedPasswordâ€™ was here  
compat.h:121: error: redefinition of typedef â€˜PQnoticeReceiverâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:144: error: previous  
declaration of â€˜PQnoticeReceiverâ€™ was here  
compat.h:125: error: redeclaration of enumerator â€˜PQERRORS\_TERSEâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:105: error: previous  
definition of â€˜PQERRORS\_TERSEâ€™ was here  
compat.h:126: error: redeclaration of enumerator â€˜PQERRORS\_DEFAULTâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:106: error: previous  
definition of â€˜PQERRORS\_DEFAULTâ€™ was here  
compat.h:128: error: redeclaration of enumerator â€˜PQERRORS\_VERBOSEâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:108: error: previous  
definition of â€˜PQERRORS\_VERBOSEâ€™ was here  
compat.h:128: error: conflicting types for â€˜PGVerbosityâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:108: error: previous  
declaration of â€˜PGVerbosityâ€™ was here  
compat.h:132: error: redeclaration of enumerator â€˜PQTRANS\_IDLEâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:96: error: previous  
definition of â€˜PQTRANS\_IDLEâ€™ was here  
compat.h:133: error: redeclaration of enumerator â€˜PQTRANS\_ACTIVEâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:97: error: previous  
definition of â€˜PQTRANS\_ACTIVEâ€™ was here  
compat.h:134: error: redeclaration of enumerator â€˜PQTRANS\_INTRANSâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:98: error: previous  
definition of â€˜PQTRANS\_INTRANSâ€™ was here  
compat.h:135: error: redeclaration of enumerator â€˜PQTRANS\_INERRORâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:99: error: previous  
definition of â€˜PQTRANS\_INERRORâ€™ was here  
compat.h:137: error: redeclaration of enumerator â€˜PQTRANS\_UNKNOWNâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:101: error: previous  
definition of â€˜PQTRANS\_UNKNOWNâ€™ was here  
compat.h:137: error: conflicting types for â€˜PGTransactionStatusTypeâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:101: error: previous  
declaration of â€˜PGTransactionStatusTypeâ€™ was here  
compat.h:142: error: conflicting types for â€˜PQtransactionStatusâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:285: error: previous  
declaration of â€˜PQtransactionStatusâ€™ was here  
compat.h:143: error: conflicting types for â€˜PQparameterStatusâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:287: error: previous  
declaration of â€˜PQparameterStatusâ€™ was here  
compat.h:157: error: conflicting types for â€˜PQsetErrorVerbosityâ€™  
/Library/PostgreSQL/8.4/include/libpq-fe.h:309: error: previous  
declaration of â€˜PQsetErrorVerbosityâ€™ was here  
compat.h:169:2: error: #error unsupported postgresql version, requires  
7.3 or later.  
compat.c: In function â€˜PQsetClientEncodingâ€™:  
compat.c:21: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:28: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:35: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:43: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:49: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:55: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:61: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:67: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:73: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:79: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:85: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:93: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:102: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:109: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:115: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:125: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:131: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:137: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:143: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:151: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:159: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:167: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:173: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:179: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:185: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:191: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:197: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:203: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:209: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:215: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:221: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:230: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:237: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:280: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:339: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:386: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:465: error: expected â€˜=â€™, â€˜,â€™, â€˜;â€™, â€˜asmâ€™ or â€˜\_\_attribute\_\_â€™  
before â€˜{â€™ token  
compat.c:539: error: old-style parameter declarations in prototyped  
function definition  
compat.c:539: error: expected â€˜{â€™ at end of input  
lipo: can’t open input file: /var/tmp//cc4bbetE.out (No such file or  
directory)  
make: \*\*\* [compat.o] Error 1

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/pg-0.8.0  
for inspection.  
Results logged to /Library/Ruby/Gems/1.8/gems/pg-0.8.0/ext/gem\_make.out

I have this in my path  
-bash:  
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Android/android-sdk-mac\_x86-0.9\_beta/tools:/Library/PostgreSQL/8.4/bin/:  
No such file or directory

I also executed these commands before installing the pg gem  
sudo -s  
ARCHFLAGS=‘-arch x86\_64’

However other blog posts ask the user to execute this line  
export PATH=/usr/local/pgsql/bin:${PATH}

but I do not have a local directory under ‘usr’ folder.

Please help… I am completely lost.

Any help is truly appreciated.

Thanks,  
Jai

---

<div class="post-metadata">

**Author:** ![jai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5f9b8f/32.png) [@jai](https://www.ruby-forum.com/u/jai)\
**Post date:** [August 30, 2009, 8:55pm UTC](https://www.ruby-forum.com/t/snow-leopard-pg-gem/174640/2 "2009-08-30T20:55:48Z")

</div>

I tried this command

sudo env ARCHFLAGS="-arch i386" gem install pg

and I was successfully able to install the gem

However, I still cannot start the server… Any ideas anyone

Thanks,  
Jai

---

<div class="post-metadata">

**Author:** ![jai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5f9b8f/32.png) [@jai](https://www.ruby-forum.com/u/jai)\
**Post date:** [August 31, 2009, 12:39am UTC](https://www.ruby-forum.com/t/snow-leopard-pg-gem/174640/3 "2009-08-31T00:39:08Z")

</div>

Do you still get the same error when trying to start script/server, or  
did it change? Because the ARCHFLAGS setting should have worked indeed.  
If it’s still the same, I would try to uninstall the pg gem completely  
first before reinstalling it the same way.

Jai Jk wrote:

> I tried this command
> 
> sudo env ARCHFLAGS="-arch i386" gem install pg
> 
> and I was successfully able to install the gem
> 
> However, I still cannot start the server… Any ideas anyone
> 
> Thanks,  
> Jai
