A PostgreSQL client library for Ruby https://github.com/ged/ruby-pg
Go to file
Michael Granger ec29fc0c03 Rearranging classes under the PG namespace to be a better Ruby citizen
--HG--
rename : .irbrc => .pryrc
rename : spec/pgconn_spec.rb => spec/pg/connection_spec.rb
rename : spec/pgresult_spec.rb => spec/pg/result_spec.rb
2012-01-24 17:21:30 -08:00
ext Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
lib Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
misc Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
sample Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
spec Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
.gemtest Converted to Hoe 2011-10-07 07:42:14 -07:00
.hgignore Adding binary build dir to the ignorefile 2011-12-07 11:58:43 -08:00
.hgsigs Added signature for changeset f3dfdb6929b7 2012-01-03 15:14:47 -08:00
.hgtags Added tag v0.12.2 for changeset 88bd78632f86 2012-01-03 15:14:48 -08:00
.hoerc Adding rvmrc and gemset 2012-01-19 15:57:13 -08:00
.irbrc Updated build system 2010-01-03 11:40:46 -08:00
.pryrc Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
.rvm.gems Adding rvmrc and gemset 2012-01-19 15:57:13 -08:00
.rvmrc Adding rvmrc and gemset 2012-01-19 15:57:13 -08:00
.tm_properties Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
BSD * tried to make it easier to find the license information 2008-03-11 21:35:52 +00:00
Contributors.rdoc Updated some metadata files in preparation for release. 2011-12-07 14:23:06 -08:00
GPL Split 'ruby-pg' module and 'postgres' module 2008-01-07 22:16:13 +00:00
History.rdoc Bump patch version for release. 2012-01-03 15:14:35 -08:00
LICENSE Split 'ruby-pg' module and 'postgres' module 2008-01-07 22:16:13 +00:00
Manifest.txt Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
README.OS_X.rdoc Documentation update 2011-10-07 13:25:39 -07:00
README.ja.rdoc Documentation update 2011-10-07 13:25:39 -07:00
README.rdoc Rearranging classes under the PG namespace to be a better Ruby citizen 2012-01-24 17:21:30 -08:00
README.windows.rdoc re-add mingw32 cross compilation tasks, updated to current pg,openssl,ruby versions 2011-10-31 20:02:29 +01:00
Rakefile Whitespace consistency fixes 2011-12-27 16:53:18 -08:00
Rakefile.cross Allow native compiles without Mingw tools present 2011-12-27 17:12:25 -08:00

README.windows.rdoc

= Compiling 'pg' on MS Windows

In order to build this extension on MS Windows you will need a couple things.

First, a compiler. For the one click installer this means you should either
use VC++ 6.0 or the compiler that comes with cygwin or mingw if you're
building on that platform.

If you've built Ruby yourself, you should use the same compiler to build
this library that you used to build Ruby.

Second, PostgreSQL. Be sure you installed it with the development header
files if you installed it using the standard PostgreSQL installer for
Windows. If you didn't, you can run the installer again, select "modify",
and then select the 'development headers' option to install them.

I recommend making sure that 'pg_config.exe' is in your PATH. The PostgreSQL
installer for Windows does not necessarily update your PATH when it installs
itself, so you may need to do this manually. This isn't strictly necessary,
however.

In order to build ruby-pg, just run 'rake'. If the pg_config.exe executable
is not in your PATH, you'll need to explicitly point ruby-pg to where your
PostgreSQL headers and libraries are with something like this:

	rake --with-pg-dir=c:/progra~1/postgr~1/8.3

Adjust your path accordingly. BE SURE TO USE THE SHORT PATH NAMES! If you
try to use a path with spaces in it, the nmake.exe program will choke.


== Cross compiling for mswin32

Using rake-compiler a cross compiled pg gem can be build on a Linux or MacOS X
host for the win32 platform. The generated gem is statically linked against
libpq and libssl. OpenSSL and PostgreSQL are downloaded and compiled from the
sources. There are no runtime dependencies to any but the standard Windows
DLLs.

Install mingw32 using the instructions in rake-compiler's README.
For Debian/Ubuntu it is <tt>apt-get install gcc-mingw32</tt> .
Use ruby-1.8.7 for the following commands.

Download and cross compile ruby 1.8 and 1.9 for win32 with:

	rake-compiler cross-ruby VERSION=1.8.7-p352
	rake-compiler cross-ruby VERSION=1.9.2-p290

Download and cross compile pg for win32:

	rake cross native gem

or with custom versions:

	rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.2 \
	    OPENSSL_VERSION=1.0.0e POSTGRESQL_VERSION=9.1.1

If everything works, there should be pg-VERSION-x86-mingw32.gem in the pkg
directory.


== Reporting Problems

If you have any problems you can submit them via
[the project's issue-tracker][bitbucket]. And submit questions, problems, or
solutions, so that it can be improved.