Hi, I got some problems getting the postgres installed in Ruby. This is the output I get: # gem install postgres Building native extensions. This could take a while... ruby extconf.rb install postgres checking for cygwin32_socket() in -lwsock32... no checking for socket() in -lsocket... no checking for gethostbyname() in -linet... no checking for gethostbyname() in -lnsl... yes checking for sys/un.h... yes checking for socket()... yes checking for hsterror()... no checking for gethostname()... yes checking for PQsetdbLogin() in -lpq... yes checking for PQsetClientEncoding()... yes checking for pg_encoding_to_char()... yes checking for PQescapeString()... yes creating Makefile make gcc -fPIC -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -DHAVE_SYS_UN_H -DHAVE_SOCKET -DHAVE_GETHOSTNAME -DHAVE_PQSETCLIENTENCODING -DHAVE_PG_ENCODING_TO_CHAR -DHAVE_PQESCAPESTRING -c postgres.c gcc -shared -L"/usr/lib" -o postgres.so postgres.o -lruby -lpq -lnsl -ldl -lcrypt -lm -lc make install make: Nothing to be done for `install''. make clean Successfully installed postgres-0.7.1 It ends sucessfully so it looks ok except for the fact that make install doesnt do anything. But when I test it I get: # ruby -e ''require "rubygems"; require_gem "postgres";'' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'': no such file to load -- postgres (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:229:in `activate'' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:228:in `activate'' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:66:in `active_gem_with_options'' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:59:in `require_gem'' from -e:1 Can anyone here help me out? Regards, Torkel -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 9/26/06, Torkel Mathisen <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Hi, > > I got some problems getting the postgres installed in Ruby. This > is the output I get: > > # gem install postgres > Building native extensions. This could take a while... > ruby extconf.rb install postgres > checking for cygwin32_socket() in -lwsock32... no > checking for socket() in -lsocket... no > checking for gethostbyname() in -linet... no > checking for gethostbyname() in -lnsl... yes > checking for sys/un.h... yes > checking for socket()... yes > checking for hsterror()... no > checking for gethostname()... yes > checking for PQsetdbLogin() in -lpq... yes > checking for PQsetClientEncoding()... yes > checking for pg_encoding_to_char()... yes > checking for PQescapeString()... yes > creating Makefile > > make > gcc -fPIC -I. -I/usr/lib/ruby/1.8/i386-linux > -I/usr/lib/ruby/1.8/i386-linux -I. -DHAVE_SYS_UN_H -DHAVE_SOCKET > -DHAVE_GETHOSTNAME -DHAVE_PQSETCLIENTENCODING -DHAVE_PG_ENCODING_TO_CHAR > -DHAVE_PQESCAPESTRING -c postgres.c > gcc -shared -L"/usr/lib" -o postgres.so postgres.o -lruby -lpq -lnsl > -ldl -lcrypt -lm -lc > > make install > make: Nothing to be done for `install''. > > make clean > Successfully installed postgres-0.7.1 > > > It ends sucessfully so it looks ok except for the fact that make install > doesnt do anything. > > But when I test it I get: > # ruby -e ''require "rubygems"; require_gem "postgres";'' > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'': no such file to load -- postgres (LoadError) > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' > from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:229:in `activate'' > from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:228:in `activate'' > from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:66:in > `active_gem_with_options'' > from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:59:in `require_gem'' > from -e:1 > > Can anyone here help me out? > > Regards, > Torkel > > -- > Posted via http://www.ruby-forum.com/. > > > >have you considered using the "pure ruby" version? gem install postgres-pr --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Aaron Kulbe wrote:> > have you considered using the "pure ruby" version? > > gem install postgres-prYes. I did try that earlier and I got that installed and working with the test from above. However I did not get it to work from the program that I want this for so I don''t know if its supported. Is postgres and postgres-pr different in any case or should both work from any program? Its the new Metasploit I want to try if anyone got any more tips then. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Tue, 26 Sep 2006 14:33:39 +0200, Torkel Mathisen wrote:> It ends sucessfully so it looks ok except for the fact that make install > doesnt do anything.I just had exactly the same problem installing the ruby-postgres-0.7.1 gem, which I -believe- is the latest version of what used to just be called the "postgres" gem. It seemed to install, yet ''require "postgres''" failed. I''m using Postgres 8.1 on Ubuntu 6.06. I''d previously used Postgres 8.0 on Mandrake 10 with no problems. Torkel, which Postgres and what OS? Can anyone confirm my recollection that ruby-postgres is the rightful descendant of postgres? The postgres gem itself wouldn''t build on my system, as it depends on libpq-fe.h which is apparently missing from 8.1 (or at least Ubuntu''s packaging of it). Jay Levitt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jay Levitt wrote:> I''m using Postgres 8.1 on Ubuntu 6.06. I''d previously used Postgres 8.0 > on Mandrake 10 with no problems. > > Torkel, which Postgres and what OS?Postgres 8.1.4-1 and Fedora Core 5 Did you do "gem install postgres" or "gem install ruby-postgres" ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Thu, 28 Sep 2006 09:33:48 +0200, Torkel Mathisen wrote:> Postgres 8.1.4-1 and Fedora Core 5Interesting.> > Did you do "gem install postgres" or "gem install ruby-postgres" ?I tried both. "gem install postgres" failed to build the native extension; it depends on libpq-fe.h which is apparently gone in 8.1. "gem install ruby-postgres", which I believe is the updated replacement for the former, appeared to succeed but then was still "missing". Maybe someone will have the answer... Jay --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
frameloss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-30 20:15 UTC
Re: Problems installing postgres in Ruby
Looks like it gets installed, but not built on my FC5 setup: How I got it to work: gem install postgres cd /usr/lib/ruby/gems/1.8/gems/postgres-0.7.1/ make --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
frameloss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Looks like it gets installed, but not built on my FC5 setup: > > How I got it to work: > > gem install postgres > cd /usr/lib/ruby/gems/1.8/gems/postgres-0.7.1/ > makeThank you. It works now! Regards, Torkel -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
gigaday-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2006-Oct-07 08:01 UTC
Re: Problems installing postgres in Ruby
Torkel Mathisen wrote:> frameloss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > Looks like it gets installed, but not built on my FC5 setup: > > > > How I got it to work: > > > > gem install postgres > > cd /usr/lib/ruby/gems/1.8/gems/postgres-0.7.1/ > > make > > Thank you. It works now! > > Regards, > Torkel >This fixed my install of ruby-postgres on Ubuntu Dapper as well. The extra make put files postgres.o and postgres.so into the /usr/local/lib/site_ruby/gems/gems/ruby-postgres-0.7.1.2006.04.06 directory. Tony --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---