Oct 18
Now this is seriously cool.
The developer Levi Cook has taken the domain lvh.me (short for: local virtual host me), that resolves to the localhost IP address 127.0.0.1 and supports wildcards (accommodating dynamically created subdomains). No network configuration needed!
Especially useful when developing an application with dynamically created subdomains. I found out about this from http://github.com/fortuity/rails3-subdomain-devise/
Oct 17
Greg Benedict’s steps got me most of the way.
However, where he says that this worked for him:
sudo env ARCHFLAGS=”-arch x86_64″ gem install pg
… I had to put this in my .bashrc:
export ARCHFLAGS=’-arch x86_64′
Then run:
$ gem install pg –include dependencies
At that point I was good to go. Not sure why his suggestion didn’t work for me, but it kept giving me this error:
$ sudo env ARCHFLAGS=”-arch x86_64″ gem install pg
Password:
Building native extensions. This could take a while…
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/mm/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for pg_config… no
MacOS X build: fixing architecture flags:
using the value in ARCHFLAGS environment variable (“-arch x86_64″).
checking for libpq-fe.h… no
Can’t find the ‘libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/Users/mm/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
–with-pg
–without-pg
–with-pg-config
–without-pg-config
–with-pg-dir
–without-pg-dir
–with-pg-include
–without-pg-include=${pg-dir}/include
–with-pg-lib
–without-pg-lib=${pg-dir}/lib
–enable-static-build
–disable-static-build
Gem files will remain installed in /Users/mm/.rvm/gems/ruby-1.9.2-p0/gems/pg-0.9.0 for inspection.
Results logged to /Users/mm/.rvm/gems/ruby-1.9.2-p0/gems/pg-0.9.0/ext/gem_make.out
Otherwise