From: Saeed Bhuta on
Hi All,

I want to save data from a ruby script into a table in a PostGreSQL 8.4
database.

After looking into PostGreSQL connectivity in Ruby, I have come accross
the 'pg' gem.

I attempted to install the gem with the command: 'sudo gem install pg'
but got the following error:
sudo gem install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for main() in -lpq... no
checking for main() in -llibpq... no
checking for main() in -lms/libpq... no
*** 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=/usr/bin/ruby1.8
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Could not find PostgreSQL build environment (libraries & headers):
Makefile not created


Gem files will remain installed in /var/lib/gems/1.8/gems/pg-0.8.0 for
inspection.
Results logged to /var/lib/gems/1.8/gems/pg-0.8.0/ext/gem_make.out

Would appreciate it if someone could point me in the right direction.

Saeed.
--
Posted via http://www.ruby-forum.com/.

From: Shashank Tiwari on
[Note: parts of this message were removed to make it a legal post.]

Are you installing this on a mac, windows or a linux environment? You may
need to make sure your C/C++ compiler is configured on the platform for the
native extensions to compile and install.

Thanks, Shashank

On Fri, Feb 26, 2010 at 9:16 AM, Saeed Bhuta <saeed.bhuta(a)placr.co.uk>wrote:

> Hi All,
>
> I want to save data from a ruby script into a table in a PostGreSQL 8.4
> database.
>
> After looking into PostGreSQL connectivity in Ruby, I have come accross
> the 'pg' gem.
>
> I attempted to install the gem with the command: 'sudo gem install pg'
> but got the following error:
> sudo gem install pg
> Building native extensions. This could take a while...
> ERROR: Error installing pg:
> ERROR: Failed to build gem native extension.
>
> /usr/bin/ruby1.8 extconf.rb
> checking for main() in -lpq... no
> checking for main() in -llibpq... no
> checking for main() in -lms/libpq... no
> *** 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=/usr/bin/ruby1.8
> --with-pg-dir
> --without-pg-dir
> --with-pg-include
> --without-pg-include=${pg-dir}/include
> --with-pg-lib
> --without-pg-lib=${pg-dir}/lib
> --with-pqlib
> --without-pqlib
> --with-libpqlib
> --without-libpqlib
> --with-ms/libpqlib
> --without-ms/libpqlib
> Could not find PostgreSQL build environment (libraries & headers):
> Makefile not created
>
>
> Gem files will remain installed in /var/lib/gems/1.8/gems/pg-0.8.0 for
> inspection.
> Results logged to /var/lib/gems/1.8/gems/pg-0.8.0/ext/gem_make.out
>
> Would appreciate it if someone could point me in the right direction.
>
> Saeed.
> --
> Posted via http://www.ruby-forum.com/.
>
>

From: Saeed Bhuta on
Shashank Tiwari wrote:
> Are you installing this on a mac, windows or a linux environment? You
> may
> need to make sure your C/C++ compiler is configured on the platform for
> the
> native extensions to compile and install.
>
> Thanks, Shashank

Hi Shashank,

Thanks for replying. I'm using Linux Ubuntu Karmic Koala.

Saeed.
--
Posted via http://www.ruby-forum.com/.

From: Reid Thompson on
On Fri, 2010-02-26 at 23:16 +0900, Saeed Bhuta wrote:

> Could not find PostgreSQL build environment (libraries & headers):

you need to install the postgresql development packages




From: Saeed Bhuta on
> you need to install the postgresql development packages

I think I've done this already. Nonetheless, I'm going to try and
install it again. Do you know the name of the development packages?

Thanks,

Saeed.
--
Posted via http://www.ruby-forum.com/.

 |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: Counting a string
Next: Execute a stub written in plsql