Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8896029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:56:18+00:00 2026-06-14T23:56:18+00:00

I’ve been advised not to untrack Gemfile.lock, however i ran into issues. I develop

  • 0

I’ve been advised not to untrack Gemfile.lock, however i ran into issues.

I develop on my windows machine, and push to a linux (ubuntu) server, the issue is Bundler locks the windows version of some gems, by adding: x86-mingw32 after the version number, which causes issues.

GEM
  remote: http://rubygems.org/
  specs:
    actionmailer (3.2.1)
    ...
    mysql2 (0.3.11-x86-mingw32)
    ...

  PLATFORMS
    x86-mingw32

I use Capistrano to deploy, and i get this error:

Please install the mysql adapter: gem install activerecord-mysql-adapter (mysql is not part of the bundle. Add it to Gemfile.)

Even though my gemfile is like:

...
gem 'mysql2'
...

I think that’s because Rails tries to use the windows version of mysql2 which is found on Gemfile.lock

Any ideas to solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:56:20+00:00Added an answer on June 14, 2026 at 11:56 pm

    Add something like the following to your Gemfile and then bundle update
    (Replace your current mysql2 gem listing obviously)

      
    if RUBY_PLATFORM =~ /win32/
      gem "mysql2", :platform => [:mswin, :mingw]
    else
      gem "mysql2", :platform => :ruby
    end
      
    

    What this means is if the platform is ‘win32’ (Windows) then install the windows version, else install the normal version which is ‘ruby’ for all Unix systems. At least I don’t know any Unix systems (from Mac OS X, to Linux, to Solaris, to *BSD) that that wouldn’t work on.

    UPDATE: Got a bit more information. The problem is that –deployment flag only looks at the lock file. Otherwise you could forgo the –deployment, lock your gems to a specific version in the Gemfile itself, and then run a bundle update to force the Gemfile to be re-evaluated which would force the selector. The problem is that bundle is not capable of what you want because it only evaluates the lock file when using –deployment flag. This means it has no way to re-evaluate what platform its on. It goes strictly by what is in the lock file. This is why the only real solution is to lock your gem versions in the main Gemfile, and then bundle update to force the re-eval.

    You could probably forgo the –deployment and just use

      
        bundle update && bundle install --without=development,test,any_other_groups --path=./vendor/bundle
      
    

    This is a necessity if you’re going to be developing on a completely different platform than what you’re deploying on due to, as referenced, the way bundler works. The above command should replicate exactly what –deployment does. All of this will be recorded in .bundle/config as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am currently running into a problem where an element is coming back from
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have been unable to fix a problem with Java Unicode and encoding. The
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.