There is no way. I have a ticket filed for this feature. Patches welcome.

On Dec 9, 2011, at 12:09, Joel VanderWerf <joelvanderwerf / gmail.com> wrote:

>=20
> On one of my systems, the pg gem won't build unless you tell it the non-st=
andard header location:
>=20
>  gem install pg -- --with-pg-dir=3D/usr/pgsql-9.0
>=20
>  gem update pg -- --with-pg-dir=3D/usr/pgsql-9.0
>=20
> Now, how can I set this option once and for all, so that `gem update` alwa=
ys uses it?
>=20
> I tried putting this in my .gemrc:
>=20
> gem: --with-pg-dir=3D/usr/pgsql-9.0
>=20
> but that doesn't work (as expected, since those options are passed to gem r=
ather than the gem's extconf).
>=20
>=20