Why I can't install postgresql with rails 4.0.0.rc1 (ruby 2.0) Why I can't install postgresql with rails 4.0.0.rc1 (ruby 2.0) postgresql postgresql

Why I can't install postgresql with rails 4.0.0.rc1 (ruby 2.0)


(Windows 7 x64, Ruby2.0.0p247-x64, Rails4.0.0, Postgresql 9.2.4 x64, pg 0.15.1, mysql2 0.3.11) There seems to be a platform detection/verification problem with bundler. While what I did is a hack of the Gemfile.lock file (I know, I know...), I have a (hopefully) temporary solution:

Edit Gemfile.lock, and

  • Find the line for 'pg':
 multi_json (1.7.7) pg (0.15.1-x86-mingw32) polyglot (0.3.3)
  • Copy the line, and modify the new copy to :
 multi_json (1.7.7) pg (0.15.1-x64-mingw32) pg (0.15.1-x86-mingw32) polyglot (0.3.3)

This is how the x64 version of the installed gem announces itself when you ask to list it (gem list pg).

For anyone who cares, the exact same problem was (sometimes) encountered with the mysql2 gem.


I had this problem and solved it by using the 32bit version of ruby rather than the 64bit. You need to make sure the devkit matches up to your version as well. So if you have the 64 bit version of that installed then that will need to be changed too.