-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to install pg following instructions fails #62
Comments
Original comment by John Poole (Bitbucket: jlpoole, GitHub: jlpoole). Putting this on hold. I had previously tried to use the git repository for the devkit and ran into problems. I'm using the standard instructions now and seem to be making progress. It looks like I have the missing headers issue which I'll resolve by finding them or downloading them and then using the "--with-pg-config" parameter. |
Original comment by John Poole (Bitbucket: jlpoole, GitHub: jlpoole). Got it working. What threw me were two things:
So, here's a recap successful steps for installation on Windows XP:
Then:
Subsequent to getting this to work, I learned of the DBI module, and since I come from Perl and use DBI extensively, the DBI and Pg combination looks to be a more adaptable solution. |
Original comment by Anonymous. Above was focused on getting a successful install confirmation, it did not test whether the install actually worked. It looks like pg is installing okay, but when it actually is called upon, it fails. A simple file:
results in:
This has ramification downstream, as I installed the DBD-pg module and it appears to install okay, but then fails when actually called to use. Here's a log of my system (fresh 1.9.2 install):
Maybe the postgresql install/libraries need to be in my path? |
Original comment by John Poole (Bitbucket: jlpoole, GitHub: jlpoole). There's no 1.9 subdirectory in my path as is in the path you describe.
|
Original comment by kenleslie (Bitbucket: kenleslie, ). I'm having the same issue with Ruby 1.8.7 + DevKit. The gem installs and compiles correctly, but when I try to require the gem I get:
In reference to the comment above, I do not have the 1.8 subdirectory in my path:
|
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged). Okay, the version-qualified extension should only be loaded as a fallback for an error while loading the one under Thanks. |
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged). Very mysterious. This part of the error message is the actual problem:
But then immediately afterwards, your 'dir' in 'C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib' shows that pg_ext.so is indeed there. I suspect the dialog it shows ("This application has failed to start because LIBPQ.dll was not found. Re-installing the application may fix the problem") is the root cause. Unfortunately, I don't know what the fix for that is. It looks like some problem with the PostgreSQL client library, but I don't know enough about Windows programming to be able to diagnose it. |
Original comment by Anonymous. I also had problems with installing the pg gem. Installing version 0.9.0 instead fo 0.10.1 worked for me. |
Original comment by John Poole (Bitbucket: jlpoole, GitHub: jlpoole). Thank you Anonymous who posted 1 week ago. Here's what I did. Note, this is in the Ruby 1.9.2 environment, not the 1.8.7 which is what I ultimately desire since 1.8.7 is what SketchUp uses.
Here's the test script I used:
Next: I'll try in the Ruby 1.8.6 environment. Also, what does it mean that a bug is placed on HOLD? I've changed the status from HOLD to OPEN pending to prompt an answer to this question. If two people and three machines cannot get the code working, doesn't that indicate a bug somewhere that should remain open until determined what causes the problem (or the discrepancy among environments)? |
Original comment by John Poole (Bitbucket: jlpoole, GitHub: jlpoole). Success -- I got 0.9.0 to work in Ruby 1.8.6. Here's what I did:
Here's the log:
I'm leaving the status to OPEN, but as far as I am concerned, I've achieved my goal of connecting to PostgreSQL from Ruby 1.8.6. I leave it to the maintainers of this code to classify the status of this issue. I'll be happy to help test by 0.9.0 and 0.10.x do not work since there seems to be an issue with others recreating the problem. |
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged). "On hold" to me means that the conversation has ceased, and so I'm not going to look at it again until someone replies. Changing it from "on hold" back to "open", especially as the original ticket-opener seems perfectly acceptable to me if you're also providing some new information. This ticket has gotten quite cluttered with comments and I'm not sure who's still watching besides you and I, so I'm going to close it since you've achieved your goal. I'm planning on releasing a new version later today with binary, statically-compiled Windows gems, which should go a long way towards fixing the situation for Windows users. Anyway, thanks for your excellent bug reports. |
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged). I forgot to mention: if you're still watching this ticket, and you still have problems with the version I'm going to release in a few hours, Then please open a new ticket, include your 'mkmf.log' if you're installing via the DevKit instead of a binary gem, and include any errors you see. Thanks. |
Original comment by Anonymous. fyi I have got the very same problem when trying to use gem pg 0.17.0 (or pg 0.17.1) with ruby v2.1.3 (and pik) and PostgreSQL 9.3:
C:\railsprojects\project>rake db:migrate
C:\railsprojects\project>rake db:migrate
|
Original comment by Anonymous. It worksI can now use Postgres under Windows 7 and ruby 2.1.3 if using the new version gem 'pg', '0.18.0.pre20141017160319' Thanks! |
Original comment by Mukesh Singh Rathaur (Bitbucket: mukeshsinghr, GitHub: mukeshsinghr). Checked and confirmed, working with windows 7 ruby 2.1.4 with URU(tool to manage multiple rubies on windows platform) |
Original comment by Charlie Pandacan (Bitbucket: charlie-bit-noob, ). Thanks guys! Confirmation of using "--pre" option => Using pg 0.18.0.pre20141117110243 (was 0.17.1) |
Original report by John Poole (Bitbucket: jlpoole, GitHub: jlpoole).
=== Goal: I want to connect to PostgreSQL from Ruby. ===
I installed Ruby and tried to install within the fresh installation. Here are my notes:
ran rubyinstaller-1.9.2-p180.exe
Selected path: C:\Ruby\192 (note: default was Ruby192, I isolated the 192)
Added Ruby to the Path
Associated rb with this installation
Confirmed install: opened DOS console:
Using instructions at https://bitbucket.org/ged/ruby-pg/wiki/Home
The current instructions at https://bitbucket.org/ged/ruby-pg/wiki/Home provide:
My operating system is:
I have PostgreSQL installed at: C:\Program Files\PostgreSQL\8.4
It appears I need to have a development kit installed? Shouldn't the instructions indicate that? I've tried to install the development kit and have had problems and am pursuing that with the appropriate group.
The text was updated successfully, but these errors were encountered: