On Windows, Bundler incorrectly suffixing 64-bit database adapter gems with x86-mingw32 instead of x64-mingw32 #2658

Closed
lozandier opened this Issue Oct 3, 2013 · 9 comments

Comments

Projects
None yet
3 participants

For some reason, on Windows, bundler locks out database adapter files with the 32-bit version despite the fact you have the 64-bit version installed.

Rephrased differently, Bundler ignores the 64-bit gem or it incorrectly lists it in your GEMFILES.LOCK file as a non-existent 32-bit gem.

For example, the pg gem is incorrectly listed in theGEMFILE.LOCK' as pg (0.17.0-x86-mingw32) instead of pg (0.17.0-x64-mingw32)

The problem regarding the pg gem (including the most recent version, 0.17.0) was solved involving Bundler here.

Had this problem with another gem as well, and thought it made sense to report it here before going back to coding.

Owner

indirect commented Oct 3, 2013

The current version of Bundler doesn't understand 64-bit gems on windows. The next version (1.4) should fix this problem. Please install the 1.4 release candidate and test it! gem install bundler --pre. The release candidate will be released as the final version next week if no blockers are found.

Hmm, the new bundler seems to have a hard time recognizing Git and Github; I get an error message that it can't fetch gems that need to look up Github repositories; I certainly didn't have that problem last night w/ 1.3+

Confirmed: I uninstalled 1.4.rc1 and things worked fine again; I especially have a problem starting up when it was instaleld for the following reason:

    Bundler could not find compatible versions for gem "nokogiri" 
      In snapshot (Gemfile.lock): 
       nokogiri (1.6.0)
     In Gemfile: 
       aws-sdk (>=0) x64-windw32 depends on 
          nokogiri (>= 1.4.4) x64-mingw32

Also, while I understand it doesn't understand 64-bit gems, why does it forcibly rewrites properly rewritten gems in the GEMFILES.LOCK as x86 (Though I'm probably overthinking it)?

Owner

indirect commented Oct 4, 2013

Yes. That means it's working, unfortunately. You'll (probably) need to delete your Gemfile.lock and run bundle install again to switch to 64-bit gems. Or try just editing the Gemfile.lock file directly, but no guarantees that will work.

@indirect Understood; the latter is what I've done; call it crazy, but is there a way to tell Bundler to ignore particular gems that don't need x64 versions (that you're aware of)?

I'm unable to start my app because of gems that I was able to use just fine as 32-bit gems (i.e., Nokogiri).

Owner

indirect commented Oct 4, 2013

That's up to the gem authors, I believe—Rubygems just installs the gem that matches your platform, if there is one. While it just so happens that (some?) 32-bit gems will run on 64-bit platforms, it's not safe to blanketly allow gems across platforms. I'd be willing to entertain the notion of gems whose platforms you can explicitly force to a platform that doesn't match the one that you're running on, though.

@indirect I can confirm this morning that both 32-bit and 64-bit versions of the new Bundler gem (or while using 32-bit or 64-bit version of Windows) has problems handling gems referring to github repository.

It 'lies' to you. It states you don't have git installed.

Owner

indirect commented Oct 4, 2013

@lozandier damn. well, that's what prereleases are for! Can you open a new ticket about that issue, with the information requested in ISSUES? Thanks!

indirect closed this Dec 1, 2013

Had this same issue with bundler 1.3.5 on Windows 8 x64. Appears to work fine with 1.5.0.

del Gemfile.lock
gem install bundler --pre
bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment