I want to be able to define in my Gemfile that on my development machine (Windows 7) a certain gem (pg) version (0.14.0-x86-mingw32) should be installed, but on my production server (Debian) it should install the regular version.
I have tried defining groups in the Gemfile, but this does not seem to be reflected in the Gemfile.lock and when I run bundle install
on my development machine (Windows), it lists the windows version of the gem in the Gemfile.lock. Then when I try and deploy with Capistrano, it runs bundle with the --deployment
argument (and --without groups-i-want-to-exclude
), which uses Gemfile.lock and doesn't install the pg gem at all because the version listed is for Windows.
I don't want to have to manually edit Gemfile.lock on my production server, because this is generally a bad idea, and each time I redeploy from my repo it will change back to the windows-specific version. I also don't want to turn off the --deployment option (my current solution) because this is not how bundler was intended to be used in this situation.