I am trying to get Rails working with my Postgresql installation in XP. This is the line that I am trying to execute: "gems install postgres" I installed the include files, etc from the Postgres installer, Cygwin is installed...but I keep getting the same error: Attempting local installation of ''postgres'' Local gem file not found: postgres*.gem Attempting remote installation of ''postgres'' Building native extensions. This could take a while... ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. Gem files will remain installed in c:/dev/tools/ruby/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. ruby extconf.rb install postgres\nchecking for cygwin32_socket() in wsock32.lib... no checking for socket() in socket.lib... no checking for gethostbyname() in inet.lib... no checking for gethostbyname() in nsl.lib... no checking for sys/un.h... no checking for socket()... no checking for cygwin32_socket()... no Any idea? Thanks, Andres -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005
Attempting local installation of ''postgres'' Local gem file not found: postgres*.gem Attempting remote installation of ''postgres'' Building native extensions. This could take a while... ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. Gem files will remain installed in c:/dev/tools/ruby/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. ruby extconf.rb install postgres\nchecking for cygwin32_socket() in wsock32.lib... no checking for socket() in socket.lib... no checking for gethostbyname() in inet.lib... no checking for gethostbyname() in nsl.lib... no checking for sys/un.h... no checking for socket()... no checking for cygwin32_socket()... no -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005
On Mon, 21 Mar 2005 14:47:10 -0600, Andres Valenciano <andres.valenciano-U6qP/nogU63Gg37QOHVfPA@public.gmane.org> wrote:> I am trying to get Rails working with my Postgresql installation in XP. > > This is the line that I am trying to execute: "gems install postgres" I > installed the include files, etc from the Postgres installer, Cygwin is > installed...but I keep getting the same error: > > Attempting local installation of ''postgres'' > Local gem file not found: postgres*.gem > Attempting remote installation of ''postgres'' > Building native extensions. This could take a while... > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. > Gem files will remain installed in > c:/dev/tools/ruby/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. > ruby extconf.rb install postgres\nchecking for cygwin32_socket() in > wsock32.lib... no > checking for socket() in socket.lib... no > checking for gethostbyname() in inet.lib... no > checking for gethostbyname() in nsl.lib... no > checking for sys/un.h... no > checking for socket()... no > checking for cygwin32_socket()... no > > Any idea? > > Thanks, > > Andres >I''m not a Windows person, but are you running this from an MS DOS prompt or a Cygwin bash shell? Also, make sure your LD_LIBRARY_PATH and/or etc/ld.so.conf are set correctly. -- Phillip Hutchings http://www.sitharus.com/ sitharus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org / sitharus-QrR4M9swfipWk0Htik3J/w@public.gmane.org
>From a DOS prompt. I installed Cygwin when I saw the cygwin32_socket as partof the error output. Andres -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Phillip Hutchings Sent: Monday, March 21, 2005 3:29 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Can''t install Postgres gem On Mon, 21 Mar 2005 14:47:10 -0600, Andres Valenciano <andres.valenciano-U6qP/nogU63Gg37QOHVfPA@public.gmane.org> wrote:> I am trying to get Rails working with my Postgresql installation in XP. > > This is the line that I am trying to execute: "gems install postgres" > I installed the include files, etc from the Postgres installer, Cygwin > is installed...but I keep getting the same error: > > Attempting local installation of ''postgres'' > Local gem file not found: postgres*.gem Attempting remote installation > of ''postgres'' > Building native extensions. This could take a while... > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. > Gem files will remain installed in > c:/dev/tools/ruby/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. > ruby extconf.rb install postgres\nchecking for cygwin32_socket() in > wsock32.lib... no checking for socket() in socket.lib... no checking > for gethostbyname() in inet.lib... no checking for gethostbyname() in > nsl.lib... no checking for sys/un.h... no checking for socket()... no > checking for cygwin32_socket()... no > > Any idea? > > Thanks, > > Andres >I''m not a Windows person, but are you running this from an MS DOS prompt or a Cygwin bash shell? Also, make sure your LD_LIBRARY_PATH and/or etc/ld.so.conf are set correctly. -- Phillip Hutchings http://www.sitharus.com/ sitharus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org / sitharus-QrR4M9swfipWk0Htik3J/w@public.gmane.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005
* katarn <katarn-Kp5VGQjTsCPnAruVU7VYdw@public.gmane.org> [0347 20:47]:> Attempting local installation of ''postgres'' > Local gem file not found: postgres*.gem > Attempting remote installation of ''postgres'' > Building native extensions. This could take a while... > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. > Gem files will remain installed in > c:/dev/tools/ruby/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. > ruby extconf.rb install postgres\nchecking for cygwin32_socket() in > wsock32.lib... no > checking for socket() in socket.lib... no > checking for gethostbyname() in inet.lib... no > checking for gethostbyname() in nsl.lib... no > checking for sys/un.h... no > checking for socket()... no > checking for cygwin32_socket()... noHave you tried postgres-pr ? Its native ruby, so you''ll avoid all this compilation hassle. -- ''Aww, you know what always cheers me up? Laughing at other people''s misfortunes.'' -- Bender Rasputin :: Jack of All Trades - Master of Nuns
:-) Now it works !!!! Thanks. Now, I am a little worry about the version numbers ( postgres-pr website says 0.3.6 ) I intend to code version 2 of a current "enterprise application" and I will be killed if this libraries are not ready for "production sites". Any other "stable-release" version of a Ruby->Postgres to use with Rails? Andres -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Dick Davies Sent: Monday, March 21, 2005 3:53 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Can''t install Postgres gem * katarn <katarn-Kp5VGQjTsCPnAruVU7VYdw@public.gmane.org> [0347 20:47]:> Attempting local installation of ''postgres'' > Local gem file not found: postgres*.gem Attempting remote installation > of ''postgres'' > Building native extensions. This could take a while... > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. > Gem files will remain installed in > c:/dev/tools/ruby/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. > ruby extconf.rb install postgres\nchecking for cygwin32_socket() in > wsock32.lib... no checking for socket() in socket.lib... no checking > for gethostbyname() in inet.lib... no checking for gethostbyname() in > nsl.lib... no checking for sys/un.h... no checking for socket()... no > checking for cygwin32_socket()... noHave you tried postgres-pr ? Its native ruby, so you''ll avoid all this compilation hassle. -- ''Aww, you know what always cheers me up? Laughing at other people''s misfortunes.'' -- Bender Rasputin :: Jack of All Trades - Master of Nuns _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005
Hi there, This is reaching back a bit, but when I installed it under both MingW and on OS X I had to run the build manually, chances are cygwin will be the same. Also, try running the build from under the cygwin bash shell rather than from the DOS prompt. Also, check your gems directory for where the gem has been downloaded to and run (from in the cygwin bash shell), in that directory: ruby extconf.rb --with-pgsql-dir "/path/to/postgresql" That way it should definitely pick up both the cygwin libraries, and further in the configuration the psql library. Cheers, -David On Mon, 21 Mar 2005 15:43:19 -0600, katarn <katarn-Kp5VGQjTsCPnAruVU7VYdw@public.gmane.org> wrote:> >From a DOS prompt. I installed Cygwin when I saw the cygwin32_socket as part > of the error output. > > Andres > > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Phillip Hutchings > Sent: Monday, March 21, 2005 3:29 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Can''t install Postgres gem > > On Mon, 21 Mar 2005 14:47:10 -0600, Andres Valenciano > <andres.valenciano-U6qP/nogU63Gg37QOHVfPA@public.gmane.org> wrote: > > I am trying to get Rails working with my Postgresql installation in XP. > > > > This is the line that I am trying to execute: "gems install postgres" > > I installed the include files, etc from the Postgres installer, Cygwin > > is installed...but I keep getting the same error: > > > > Attempting local installation of ''postgres'' > > Local gem file not found: postgres*.gem Attempting remote installation > > of ''postgres'' > > Building native extensions. This could take a while... > > ERROR: While executing gem ... (RuntimeError) > > ERROR: Failed to build gem native extension. > > Gem files will remain installed in > > c:/dev/tools/ruby/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. > > ruby extconf.rb install postgres\nchecking for cygwin32_socket() in > > wsock32.lib... no checking for socket() in socket.lib... no checking > > for gethostbyname() in inet.lib... no checking for gethostbyname() in > > nsl.lib... no checking for sys/un.h... no checking for socket()... no > > checking for cygwin32_socket()... no > > > > Any idea? > > > > Thanks, > > > > Andres > > > > I''m not a Windows person, but are you running this from an MS DOS prompt or > a Cygwin bash shell? Also, make sure your LD_LIBRARY_PATH and/or > etc/ld.so.conf are set correctly. > > -- > Phillip Hutchings > http://www.sitharus.com/ > sitharus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org / sitharus-QrR4M9swfipWk0Htik3J/w@public.gmane.org > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005 > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
* katarn <katarn-Kp5VGQjTsCPnAruVU7VYdw@public.gmane.org> [0308 22:08]:> :-) Now it works !!!! Thanks. > > Now, I am a little worry about the version numbers ( postgres-pr website > says 0.3.6 ) I intend to code version 2 of a current "enterprise > application" and I will be killed if this libraries are not ready for > "production sites".Build it first, then fret about speed. I''d expect the native C postgres libs to be a little faster, but probably not as much as you''d expect.> Any other "stable-release" version of a Ruby->Postgres to use with Rails?Yeah, the one you couldn''t build :) -- ''You were doing well until everyone died'' -- God Rasputin :: Jack of All Trades - Master of Nuns