Tag archives: troubleshooting

Rails, Postgres, Snow Leopard and 64bit: a word of warning

After zipping through a painless upgrade to OSX 10.6 Snow Leopard on both my Macs, I found myself banging my head against the wall trying to get my Rails + Postgres stack running again.

There is a lot of great information out there on how to get everything up to 64bit goodness, and I merrily began the uninstall/recompile/reinstall dance. What followed was an excruciating eight hours of trying to get Postgres to compile to 64bit, and the pg gem — or any Postgres adapter for that matter — to link against it.

Long story short: make sure you actually have a 64bit Mac. Let me say that again: make sure your Mac is actually running Snow Leopard in 64bit.

As embarrassing as this, at some point I finally realized that both my Macs used Core Duo chips, not Core 2 Duos – which makes my Snow Leopard a plain-old 32bit installation. Markus Winter on A hat full of sky has a lot of great information on the subject matter, as well as a program that shows you exactly what mode your system is running in, and why.

So, us 32bit cat owners still have to compile pg with

sudo env ARCHFLAGS='i386' gem install pg -- --with-pgsql-dir=/usr/local/pgsql

- just as we had to on 10.5 Leopard.

What I hope to have learned from this:

  1. Postgres is a fifteen year old project, crafted in ten thousands of man hours by countless programmers all smarter than me
  2. Next time it tells me it does not want to compile in 64bit, I’ll listen.

How to fix your 3G USB stick in Snow Leopard

I bough a UMTS stick from O2 / Tchibo mobil just two weeks ago, and so far it’s been great – love the new-found freedom. Alas, it didn’t survive my otherwise smooth and painless upgrade to OSX 10.6 Snow Leopard – its ugly “Mobile Partner” application kept crashing on me.

This is how I got my Huawei E160 (rolls right off the tongue, doesn’t it?) UMTS stick back to work:

  1. forget about the crashing software – the dialer included in Snow Leopard is all you need
  2. open Terminal.app and login as root user by typing sudo -sand entering your user account password
  3. as the user root, open a text editor to create a new file by typing nano /etc/ppp/options
  4. put these two lines in the file:
    +pap
    -chap

    then save by pressing CTRL-O and exit with CTRL-X. You can now close Terminal.app
  5. open Snow Leopards network preferences pane. There should already be an entry in there for your 3G USB stick named HUAWEI… – select it to see its settings
  6. “Telephone number” should be *99#, “Account name” and “Password” should be blank:OSX network preference pane for the Huawei E160 3G UMTS stick
  7. Click “Advanced” and make sure Other / Huawei Mobile Connect 3G is the selected modem:OSX network preference pane for the Huawei E160 3G UMTS stick - advanced configuration

That’s it! If you’ve fiddled around before trying this, you might want unplug and replug the stick once, but after that, you should be able to connect just fine.

Thanks to horrie66 from the Whirlpool user forums for the info!