I tried working with Rails 2.2, and I started getting an undefined method `transaction_status' for #<PGconn:0x32ec0cc>
error on my MacBook. Turns out that the Postgres gem had been updated and was now called ruby-pg
. I tried installing it, but the compile kept failing. The instructions told me to set the ARCHFLAGS
environment variable, but:
export ARCHFLAGS='-arch i386' sudo gem install ruby-pg
didn't work. Eventually I clued in that root's environment was different than mine. So, I tried:
bash-3.2# export ARCHFLAGS='-arch i386' bash-3.2# gem install ruby-pg Building native extensions. This could take a while... Successfully installed ruby-pg-0.7.9.2008.01.28 1 gem installed Installing ri documentation for ruby-pg-0.7.9.2008.01.28... Installing RDoc documentation for ruby-pg-0.7.9.2008.01.28...
This works. Finally.