Possible Duplicate:
Installing postgres gem when database is on a different server
I'm deploying a Rails app and for the first time I am running PostgreSQL on a separate machine from the app.
Bundler fails while trying to install the pg gem on my app server:
An error occured while installing pg (0.14.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.1'` succeeds before bundling.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
I assume this is because the pg gem can't find the development headers or conf file for PostgreSQL and indeed it won't because PostgreSQL isn't installed on the app server, it's running on a seperate machine.
So what would be the best solution here? Should I install PostgreSQL on the app server purely so that Bundler can build the pg gem? Can I install the pg gem somehow without PostgreSQL being installed? Or can I somehow point Bundler to the PostgreSQL instance on another machine to get what it needs to build the gem?