Ruby 3: `gem install docker-sync` installs version 0.0.11
mystix opened this issue · 7 comments
Attempting to install the docker-sync
gem in a Ruby 3.x environment results in the v0.0.11 version of docker-sync being installed.
Attempting to install higher versions of the docker-sync
gem results in the following error:
❯ gem install docker-sync -v 0.6.0
ERROR: While executing gem ... (NoMethodError)
undefined method `request' for nil:NilClass
To investigate, I cloned the docker-sync
git repository and attempted to run bundle update
within:
❯ bundle update
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby
docker-sync was resolved to 0.6.0, which depends on
docker-compose (~> 1.1, >= 1.1.7) was resolved to 1.1.12, which depends on
Ruby (~> 2.0)
docker-sync was resolved to 0.6.0, which depends on
Ruby (>= 2.4)
rspec was resolved to 3.10.0, which depends on
rspec-core (~> 3.10.0) was resolved to 3.10.1, which depends on
Ruby (>= 1.8.7)
docker-sync was resolved to 0.6.0, which depends on
thor (~> 1.0, >= 1.0.0) was resolved to 1.1.0, which depends on
Ruby (>= 2.0.0)
Bundler could not find compatible versions for gem "docker-sync":
In Gemfile:
docker-sync
which reveals the underlying issue lies with the docker-compose
gem, which depends specifically on Ruby 2.x.
Going further down the rabbit hole, docker-compose
depends on backtick
, which again depends on Ruby 2.x.
I will not work on getting docket-sync ruby 3.0 compatible myself. So if you want to love this issue, you will have to invest your time (heavily I guess).
Ooh, this is probably why nothing works. Tried following the docs as closely as I could, but stumbled upon all kinds of ancient issues (like #271 not being implemented). I was indeed running 0.0.11
- quite a far stretch from the 0.7
version that is current 😃
While I support not spending lots of time supporting Ruby 3, I would make a note of this somewhere in the docs and the README, as this is the default shipped with new macOS 12 (which I am running). Otherwise this issue will become a lot noisier in time! Maybe even just ship a dummy gem that target Ruby 3 that prints out "This project requires Ruby 2" or something.
In macOS, using homebrew, install ruby 2.7:
brew install ruby@2.7
Seems like we move near ruby 3 with #795 and thus can replace the old 0.0.11 variant with that
Hey guys, just passing by to thank you all for this fix <3 you're awesome!