Hi

  I am new to DataMapper. I am trying the examples from getting
started. For some reason I cant access the postgresql database. I
should mention that the ruby I am using is compiled on my computer and
the version is ruby 1.9.1p243. Could any body point the reason I am
unable to see.

Thanks in advance
venkat

$ DataMapper.setup(:default, 'postgres://locahost/dm_practice')

Terminal Output

LoadError: no such file to load -- do_postgres_ext
        from /usr/local/lib/ruby/gems/1.9.1/gems/do_postgres-0.10.0/lib/
do_postgres.rb:20:in `require'
        from /usr/local/lib/ruby/gems/1.9.1/gems/do_postgres-0.10.0/lib/
do_postgres.rb:20:in `<top (required)>'
        from /usr/local/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/dm-core/
adapters/postgres_adapter.rb:3:in `require'
        from /usr/local/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/dm-core/
adapters/postgres_adapter.rb:3:in `<top (required)>'
        from /usr/local/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/dm-core/
adapters.rb:121:in `require'
        from /usr/local/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/dm-core/
adapters.rb:121:in `load_adapter'
        from /usr/local/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/dm-core/
adapters.rb:101:in `adapter_class'
        from /usr/local/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/dm-core/
adapters.rb:13:in `new'
        from /usr/local/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/dm-
core.rb:171:in `setup'
        from (irb):2
        from /usr/local/bin/irb:12:in `<main>'

$ sudo gem install do_postgres

Terminal Output

Building native extensions.  This could take a while...
ERROR:  Error installing do_postgres:
        ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for main() in -lpq... no
checking for main() in -llibpq... 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/local/bin/ruby
        --with-pgsql-server-dir
        --without-pgsql-server-dir
        --with-pgsql-server-include
        --without-pgsql-server-include=${pgsql-server-dir}/include
        --with-pgsql-server-lib
        --without-pgsql-server-lib=${pgsql-server-dir}/lib
        --with-pgsql-client-dir
        --without-pgsql-client-dir
        --with-pgsql-client-include
        --without-pgsql-client-include=${pgsql-client-dir}/include
        --with-pgsql-client-lib
        --without-pgsql-client-lib=${pgsql-client-dir}/lib
        --with-pqlib
        --without-pqlib
        --with-libpqlib
        --without-libpqlib
Could not find PostgreSQL build environment (libraries & headers):
Makefile not created


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/
do_postgres-0.10.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/
do_postgres-0.10.0/ext/do_postgres_ext/gem_make.out

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to