[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

postgres API problems

Nick Black

1/29/2007 6:21:00 PM

I keep having similar problems with the ruby postgres API (the c api,
not postgres-pr). I have now installed it on three different machines
- two running Ubuntu server 6.06 and most recently on Xubuntu Edgy.

I have libpq-dev and ruby1.8-dev installed. I only have one version
of ruby 1.8 installed - from the Xubuntu repository.

gem install postgres

leads to a lot of terminal output, ending with:

Successfully installed postgres-0.7.1

But if I try:

# irb1.8
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'postgres'
LoadError: no such file to load -- postgres
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from (irb):2

I have also tried:

# POSTGRES_INCLUDE=/usr/include/postgresql gem install postgres

I just can't figure out what the difference is between the different
boxes I'm trying to do this on.

Any help appreciated.





--
Nick Black
--------------------------------
http://www.black...

1 Answer

Tom Copeland

1/29/2007 7:51:00 PM

0

On Tue, 2007-01-30 at 03:20 +0900, Nick Black wrote:
> I have libpq-dev and ruby1.8-dev installed. I only have one version
> of ruby 1.8 installed - from the Xubuntu repository.
>
> gem install postgres
>
> leads to a lot of terminal output, ending with:
>
> Successfully installed postgres-0.7.1

I bet it didn't compile properly. Try going into the postgres gem build
directory (on my computer
it's /usr/local/lib/ruby/gems/1.8/gems/postgres-0.7.1/) and run make
and see if that fixes it.

Yours,

Tom