Comments (21)
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.
from ruby-pg.
Original comment by John Poole (Bitbucket: jlpoole, GitHub: jlpoole).
Got it working. What threw me were two things:
-
trying to pull from GIT the development kit. I thought I'd ride the high watermark and apparently did not know my way around the pulled tree well enough. I back stepped and simply followed the instructions for installing the development kit
-
The path. my Postgres was in the default path of C:\Program Files\PostgreSQL\8.4. So I modified my DOS PATH variable to point to "C:\Program Files\PostgreSQL\8.4\bin". The pg_config.exe was found, but the install failed later down the road because of the space in "Program Files". I tried to append to the PATH "C:\Progra~1\PostgreSQL\8.4" and the prior presence of "C:\Program Files\PostgreSQL\8.4" seemed to prevent a successful install. So, I started a fresh DOS session, tainted by PATH statement with:
C:\>set PATH=%PATH%;C:\Progra~1\PostgreSQL\8.4\bin C:\>gem install pg Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed pg-0.10.1 1 gem installed Installing ri documentation for pg-0.10.1... Installing RDoc documentation for pg-0.10.1... C:\>
So, here's a recap successful steps for installation on Windows XP:
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:
C:\Documents and Settings\jlpoole>ruby -v
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
C:\Documents and Settings\jlpoole>
In C:\Downloads\Ruby, DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe and specified the extraction directory: C:\Ruby\devkit
ran "ruby dk.rb init"
verified in C:\Ruby\devkit\confi.yml: "- C:/Ruby/192"
Then:
C:\>set PATH=%PATH%;C:\Progra~1\PostgreSQL\8.4\bin
C:\>gem install pg
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed pg-0.10.1
1 gem installed
Installing ri documentation for pg-0.10.1...
Installing RDoc documentation for pg-0.10.1...
C:\>
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.
from ruby-pg.
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:
#!/usr/bin/ruby
require 'pg'
results in:
D:\work\Ruby>ruby test_postgres_basic_pg.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
1.9/pg_ext (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/pg.rb:10:in `res
cue in <top (required)>'
from C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/pg.rb:3:in `<top
(required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from test_postgres_basic_pg.rb:2:in `<main>'
D:\work\Ruby>
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):
C:\Ruby\devkit>ruby dk.rb init
[INFO] found RubyInstaller v1.8.6 at C:/Ruby/186
[INFO] found RubyInstaller v1.9.2 at C:/Ruby/192
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
C:\Ruby\devkit>ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.
C:/Ruby/186
C:/Ruby/192
C:\Ruby\devkit>ruby dk.rb install
[INFO] Skipping existing gem override for 'C:/Ruby/186'
[WARN] Skipping existing DevKit helper library for 'C:/Ruby/186'
[INFO] Updating convenience notice gem override for 'C:/Ruby/192'
[INFO] Installing 'C:/Ruby/192/lib/ruby/site_ruby/devkit.rb'
C:\Ruby\devkit>gem install rdiscount --platform=ruby
Fetching: rdiscount-1.6.8.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rdiscount-1.6.8
1 gem installed
Installing ri documentation for rdiscount-1.6.8...
Installing RDoc documentation for rdiscount-1.6.8...
C:\Ruby\devkit>gem install pg
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
C:/Ruby/192/bin/ruby.exe extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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=C:/Ruby/192/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
Gem files will remain installed in C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.
1 for inspection.
Results logged to C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/ext/gem_make.ou
t
C:\Ruby\devkit> gem install pg -- --with-pg-config=C:/Progra~1/Postgr~1/8.4/bin/
pg_config.exe
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed pg-0.10.1
1 gem installed
Installing ri documentation for pg-0.10.1...
Installing RDoc documentation for pg-0.10.1...
C:\Ruby\devkit>d:
D:\>cd work
D:\work>cd ruby
D:\work\Ruby>dir
Volume in drive D is Data
Volume Serial Number is 140B-B21E
Directory of D:\work\Ruby
04/01/2011 05:15 AM <DIR> .
04/01/2011 05:15 AM <DIR> ..
04/01/2011 04:51 AM 1,766 pg_install_notes.txt
04/01/2011 04:09 AM <DIR> postgres-0.7.9.2008.01.28
04/01/2011 03:36 AM 32,768 postgres-0.7.9.2008.01.28.gem
03/09/2011 08:29 AM 906 test_dbi_dbd-mysql.rb
03/09/2011 08:04 AM 906 test_dbi_dbd-pg.rb
03/06/2011 03:14 PM 0 test_mysql.rb
03/06/2011 09:07 PM 733 test_mysql2.rb
04/01/2011 04:53 AM 503 test_postgres.rb
04/01/2011 05:01 AM 35 test_postgres_basic.rb
04/01/2011 05:15 AM 29 test_postgres_basic_pg.rb
9 File(s) 37,646 bytes
3 Dir(s) 586,526,842,880 bytes free
D:\work\Ruby>ruby test_postgres_basic_pg.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
1.9/pg_ext (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/pg.rb:10:in `res
cue in <top (required)>'
from C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/pg.rb:3:in `<top
(required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from test_postgres_basic_pg.rb:2:in `<main>'
D:\work\Ruby> gem install pg -- --with-pg-config=C:/Progra~1/Postgr~1/8.4/bin/p
g_config.exe --with-pg-dir=C:/Progra~1/Postgr~1/8.4
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed pg-0.10.1
1 gem installed
Installing ri documentation for pg-0.10.1...
Installing RDoc documentation for pg-0.10.1...
D:\work\Ruby>ruby test_postgres_basic_pg.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
1.9/pg_ext (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/pg.rb:10:in `res
cue in <top (required)>'
from C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/pg.rb:3:in `<top
(required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from test_postgres_basic_pg.rb:2:in `<main>'
D:\work\Ruby>gem install dbi
Fetching: deprecated-2.0.1.gem (100%)
Fetching: dbi-0.4.5.gem (100%)
Successfully installed deprecated-2.0.1
Successfully installed dbi-0.4.5
2 gems installed
Installing ri documentation for deprecated-2.0.1...
Installing ri documentation for dbi-0.4.5...
Installing RDoc documentation for deprecated-2.0.1...
Installing RDoc documentation for dbi-0.4.5...
D:\work\Ruby>gem install dbd-pg
Fetching: dbd-pg-0.3.9.gem (100%)
Successfully installed dbd-pg-0.3.9
1 gem installed
Installing ri documentation for dbd-pg-0.3.9...
Installing RDoc documentation for dbd-pg-0.3.9...
D:\work\Ruby>ruby -v
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
D:\work\Ruby>ruby test_postgres_basic_dbi-pg.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
dbd-pg (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from test_postgres_basic_dbi-pg.rb:3:in `<main>'
D:\work\Ruby>gem list
*** LOCAL GEMS ***
dbd-pg (0.3.9)
dbi (0.4.5)
deprecated (2.0.1)
minitest (1.6.0)
pg (0.10.1)
rake (0.8.7)
rdiscount (1.6.8)
rdoc (2.5.8)
D:\work\Ruby>irb -r rubygems
irb(main):001:0> gem 'pg'
=> true
irb(main):002:0> gem 'dbi'
=> true
irb(main):003:0> quit
D:\work\Ruby>
Maybe the postgresql install/libraries need to be in my path?
from ruby-pg.
Original comment by John Poole (Bitbucket: jlpoole, GitHub: jlpoole).
I made the anonymous comment above not realizing I could update while not logged in.
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
I'm not sure why your installation is failing, but it looks as if the gem is only half-installed. If you look in 'C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/1.9', is there a pg_ext.so?
from ruby-pg.
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.
C:\Ruby\192\lib\ruby\gems\1.9.1\gems\pg-0.10.1\lib>dir
Volume in drive C has no label.
Volume Serial Number is 480B-2BE2
Directory of C:\Ruby\192\lib\ruby\gems\1.9.1\gems\pg-0.10.1\lib
04/01/2011 05:31 AM <DIR> .
04/01/2011 05:31 AM <DIR> ..
04/01/2011 05:31 AM 365 pg.rb
04/01/2011 05:31 AM 62,976 pg_ext.so
2 File(s) 63,341 bytes
2 Dir(s) 11,188,453,376 bytes free
C:\Ruby\192\lib\ruby\gems\1.9.1\gems\pg-0.10.1\lib>
from ruby-pg.
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:
require 'rubygems'
require 'pg'
LoadError: no such file to load -- 1.8/pg_ext
from C:/Ruby187p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from C:/Ruby187p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from C:/Ruby187p334/lib/ruby/gems/1.8/gems/pg-0.10.1/lib/pg.rb:10
from C:/Ruby187p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from C:/Ruby187p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):8
In reference to the comment above, I do not have the 1.8 subdirectory in my path:
C:\Ruby187p334\lib\ruby\gems\1.8\gems\pg-0.10.1\lib>dir
Volume in drive C is OS
Volume Serial Number is 0004-686A
Directory of C:\Ruby187p334\lib\ruby\gems\1.8\gems\pg-0.10.1\lib
04/04/2011 11:40 AM <DIR> .
04/04/2011 11:40 AM <DIR> ..
04/04/2011 12:26 PM 365 pg.rb
04/04/2011 11:40 AM 45,056 pg_ext.so
2 File(s) 45,421 bytes
2 Dir(s) 104,472,932,352 bytes free
from ruby-pg.
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 pg-0.10.1/lib
, which means there's probably an exception being raised when it loads pg_ext
from the lib/ directory. Can either of you try running the programming with debugging enabled (-d
option for either irb or ruby) to hopefully show the earlier error?
Thanks.
from ruby-pg.
Original comment by John Poole (Bitbucket: jlpoole, GitHub: jlpoole).
On a different machine, but running Windows XP, I installed Ruby, the DevKit, and PostgreSQL (9.0) and was able to reproduce the problem. Attached are my install notes and the requested attempt using the debug "-d" flag.
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Very mysterious. This part of the error message is the actual problem:
Exception `LoadError' at C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/pg_ext.so - 126:
The specified module could not be found. -
C:/Ruby/192/lib/ruby/gems/1.9.1/gems/pg-0.10.1/lib/pg_ext.so
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.
from ruby-pg.
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.
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Putting this on hold until someone can diagnose the LIBPQ.dll problem described above. I can't reproduce it.
from ruby-pg.
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.
C:\Documents and Settings\jlpoole>gem list --local
*** LOCAL GEMS ***
dbd-pg (0.3.9)
dbi (0.4.5)
deprecated (2.0.1)
minitest (1.6.0)
pg (0.10.1)
rake (0.8.7)
rdiscount (1.6.8)
rdoc (2.5.8)
C:\Documents and Settings\jlpoole>gem uninstall pg
You have requested to uninstall the gem:
pg-0.10.1
dbd-pg-0.3.9 depends on [pg (>= 0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] y
Successfully uninstalled pg-0.10.1
C:\Documents and Settings\jlpoole>gem install -v 0.9.0 pg
Fetching: pg-0.9.0-x86-mingw32.gem (100%)
Successfully installed pg-0.9.0-x86-mingw32
1 gem installed
Installing ri documentation for pg-0.9.0-x86-mingw32...
Installing RDoc documentation for pg-0.9.0-x86-mingw32...
C:\Documents and Settings\jlpoole>d:
D:\>cd work\ruby
D:\work\Ruby>ruby test_postgres_basic_pg.rb
D:\work\Ruby>ruby test_postgres_basic_dbi-pg.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
dbd-pg (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from test_postgres_basic_dbi-pg.rb:3:in `<main>'
D:\work\Ruby>gem uninstall dbd-pg
Successfully uninstalled dbd-pg-0.3.9
D:\work\Ruby>gem install dbd-pg
Fetching: dbd-pg-0.3.9.gem (100%)
Successfully installed dbd-pg-0.3.9
1 gem installed
Installing ri documentation for dbd-pg-0.3.9...
Installing RDoc documentation for dbd-pg-0.3.9...
D:\work\Ruby>ruby test_dbi_dbd-pg.rb
lib/rational.rb is deprecated
C:/Ruby/192/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles.rb:12: warning: o
ptional boolean argument is obsoleted
Server version: PostgreSQL 8.4.4, compiled by Visual C++ build 1400, 32-bit
[1, "one"]
[2, "two"]
[3, "apples"]
[4, "oranges"]
[5, "watermelons"]
D:\work\Ruby>
Here's the test script I used:
#!
#!/usr/bin/ruby -w
# simple.rb - simple MySQL script using Ruby DBI module
#
# for database drivers, see: http://ruby-dbi.rubyforge.org/rdoc/index.html and "Classes"
# for Mysql, Pg, SQLite, ODBC
#
require 'rubygems'
require "dbi"
#require 'dbd-pg'
#require 'pg'
begin
# connect to the Postegresql server
dbh = DBI.connect("DBI:Pg:test", "rubyscript", "test")
# get server version string and display it
row = dbh.select_one("SELECT VERSION()")
puts "Server version: " + row[0]
# Select all rows from sample_data
sth = dbh.prepare('select * from ruby.sample_data')
sth.execute
# Print out each row
while row=sth.fetch do
p row
end
# Close the statement handle when done
sth.finish
rescue DBI::DatabaseError => e
puts "An error occurred"
puts "Error code: #{e.err}"
puts "Error message: #{e.errstr}"
ensure
# disconnect from server
dbh.disconnect if dbh
end
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)?
from ruby-pg.
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:
#
# steps to uninstall high watermark
#
gem uninstall dbd-pg
gem uninstall pg
#
# steps to install pg 0.9.0
#
gem install -v 0.9.0 pg
gem install dbd-pg
Here's the log:
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
C:\Documents and Settings\jlpoole>gem uninstall dbd-pg
Successfully uninstalled dbd-pg-0.3.9
C:\Documents and Settings\jlpoole>gem uninstall pg
Successfully uninstalled pg-0.10.1
C:\Documents and Settings\jlpoole>gem install -v 0.9.0 pg
Successfully installed pg-0.9.0-x86-mingw32
1 gem installed
Installing ri documentation for pg-0.9.0-x86-mingw32...
Installing RDoc documentation for pg-0.9.0-x86-mingw32...
C:\Documents and Settings\jlpoole>gem install dbd-pg
Successfully installed dbd-pg-0.3.9
1 gem installed
Installing ri documentation for dbd-pg-0.3.9...
Installing RDoc documentation for dbd-pg-0.3.9...
C:\Documents and Settings\jlpoole>d:
D:\>cd work\ruby
D:\work\Ruby>ruby test_dbi_dbd-pg.rb
Server version: PostgreSQL 8.4.4, compiled by Visual C++ build 1400, 32-bit
[1, "one"]
[2, "two"]
[3, "apples"]
[4, "oranges"]
[5, "watermelons"]
D:\work\Ruby>ruby -v
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
D:\work\Ruby>
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.
from ruby-pg.
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.
from ruby-pg.
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.
from ruby-pg.
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:
- After installing pg there is a missing 2.1 folder under lib and I receive the following problem when running rake db:migrate
C:\railsprojects\project>rake db:migrate
DL is deprecated, please use Fiddle
rake aborted!
LoadError: cannot load such file -- 2.1/pg_ext
C:/railsprojects/project/config/application.rb:10:in <top (required)>' C:/railsprojects/project/Rakefile:5:in
<top (required)>'
LoadError: cannot load such file -- pg_ext
C:/railsprojects/timeoverflow/config/application.rb:10:in <top (required)>' C:/railsprojects/timeoverflow/Rakefile:5:in
<top (required)>'
(See full trace by running task with --trace)
- Even if I try to copy pg_ext from existing 2.0 folder into a new created 2.1 folder does not work. File can be found but similar error shows stating that cannot be loaded.
C:\railsprojects\project>rake db:migrate
DL is deprecated, please use Fiddle
rake aborted!
LoadError: 126: The specified module could not be found. -** C:/tools/ruby213/li
b/ruby/gems/2.1.0/gems/pg-0.17.0-x86-mingw32/lib/2.1/pg_ext.so**
C:/railsprojects/project/config/application.rb:10:in <top (required)>' C:/railsprojects/project/Rakefile:5:in
<top (required)>'
LoadError: cannot load such file -- pg_ext
C:/railsprojects/project/config/application.rb:10:in <top (required)>' C:/railsprojects/project/Rakefile:5:in
<top (required)>'
(See full trace by running task with --trace)
-
Even enabling PATH to PostgreSQL 9.3 bin and/or copying all DLLs from PostgreSQL to that 2.1 folder won't help
-
I have performed the uninstall - reinstall steps recommended from previous posts but this does not help either.
from ruby-pg.
Original comment by Lars Kanis (Bitbucket: larskanis, GitHub: larskanis).
I just pushed the latest binary gems for Windows as pre-release on rubygems.org. You should be able to gem install pg --pre
. If not, please open a new ticket.
from ruby-pg.
Original comment by Anonymous.
It works
I can now use Postgres under Windows 7 and ruby 2.1.3 if using the new version
gem 'pg', '0.18.0.pre20141017160319'
Thanks!
from ruby-pg.
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)
from ruby-pg.
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)
from ruby-pg.
Related Issues (20)
- How to build an old pg on ruby 2.3.1 HOT 1
- Segmentation fault with ruby 2.7.8 and pg 1.5.3 HOT 10
- Segmentation fault HOT 28
- Sonoma: getaddrinfo segmentation fault HOT 2
- Segmentation fault in ruby:3.2.2-alpine3.18 docker image HOT 2
- Wrong binary conversion on x86 (32bit intel) arch causing test failures HOT 4
- Bad IAM Token against Amazon Aurora Postgres: Out of memory error HOT 2
- Attempting to execute a sql file with `\set ...` raises errors HOT 3
- conn.exec writing "INFO" statements to stderr instead of stdout HOT 2
- Segfault on ruby 3.2.2, pg 1.5.4 HOT 2
- Error ruby(39749,0x1e1f05300) malloc: double free for ptr 0x13c6bfa00 HOT 1
- Segmentation fault when connecting to RDS HOT 11
- Broken links in documentation HOT 3
- connection.reset don't check again DNS HOT 6
- Usage with ApacheAGE for Postgresql HOT 2
- Add BigDecimal to gemspec for Ruby 3.3/4 HOT 2
- Binary Windows gem no longer available for Ruby v3.3 since v1.5.6 HOT 2
- Test failure with modified `RUBY_PG_TEST_DIR` HOT 2
- Q: Is it possible to handle composite values like `row(123, 'str', true)` ? HOT 1
- Dereference of null in alloc_query_params HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-pg.