Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose parsing issues #40

Closed
sandrodz opened this issue Sep 21, 2016 · 14 comments
Closed

docker-compose parsing issues #40

sandrodz opened this issue Sep 21, 2016 · 14 comments

Comments

@sandrodz
Copy link

OSX sierra:

ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

/Users/sandro/.gem/ruby/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:105:in `private': nil is not a symbol (TypeError)
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:105:in `<class:Mapper>'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:5:in `<module:Compose>'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose/mapper.rb:2:in `<top (required)>'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose.rb:10:in `require_relative'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-compose-0.8.3/lib/docker/compose.rb:10:in `<top (required)>'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-sync-0.1.2/tasks/stack/stack.thor:6:in `<top (required)>'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-sync-0.1.2/bin/docker-sync-stack:23:in `load'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-sync-0.1.2/bin/docker-sync-stack:23:in `block in <top (required)>'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-sync-0.1.2/bin/docker-sync-stack:21:in `each'
    from /Users/sandro/.gem/ruby/2.0.0/gems/docker-sync-0.1.2/bin/docker-sync-stack:21:in `<top (required)>'
    from /Users/sandro/.gem/ruby/2.0.0/bin/docker-sync-stack:23:in `load'
    from /Users/sandro/.gem/ruby/2.0.0/bin/docker-sync-stack:23:in `<main>'

original issue EugenMayer/docker-sync#142 (comment)

@EugenMayer
Copy link
Collaborator

@xeger seems like ruby 2.0 is still either not sufficient enaugh or Sierra ships a special version of it.

@xeger
Copy link
Owner

xeger commented Sep 21, 2016

The gem declares that it requires Ruby 2.1:

https://github.com/xeger/docker-compose/blob/master/docker-compose.gemspec#L22

But it seems that RubyGems does not provide any warning when someone installs it on an older version of Ruby.

Given the number of people who have reported this bug (3-4), it seems obvious that many users prefer the OS X Ruby VM instead of a tool such as rbenv (https://github.com/rbenv/rbenv).

I am considering adding support for Ruby 2.0, but I don't have any free time until next week. I'll leave this issue open to track that effort.

@xeger
Copy link
Owner

xeger commented Sep 21, 2016

In the meantime, @sandrodz, you can install a newer version of Ruby (2.1 or greater) as a workaround. I recommend using rbenv (https://github.com/rbenv/rbenv), but you can also install via Homebrew: https://www.ruby-lang.org/en/documentation/installation/#homebrew

@sandrodz
Copy link
Author

Well not all developers are ruby devs, and not all of them need rbenv :) Thanks for clarifiication, I will install rbenv, I was meaning to anyways dabbing in ROR.

@xeger
Copy link
Owner

xeger commented Sep 21, 2016

Yup; that's why I am considering re-adding Ruby 2.0 support, so it's easier to use docker-compose.gem on a "vanilla" Mac. The changes aren't super intensive; I will probably make them next week and release a new gem version that is compatible.

@EugenMayer
Copy link
Collaborator

Having 2.0 support would be key for docker-sync to reduce the amount of "prework" needed to try it. Is it possible to even go down to 1.9 for el Captian support?

@xeger
Copy link
Owner

xeger commented Sep 22, 2016

Going to 1.9 would require us to stop using keyword arguments, which would
make the codebase much more ugly and require me to rewrite most of the
tests.

On Thu, Sep 22, 2016 at 4:41 AM, Eugen Mayer notifications@github.com
wrote:

Having 2.0 support would be key for docker-sync to reduce the amount of
"prework" needed to try it. Is it possible to even go down to 1.9 for el
Captian support?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#40 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEemJkVf4hEBrMas9_CcJazsRiHh6b3ks5qsmlrgaJpZM4KC8BT
.

@EugenMayer
Copy link
Collaborator

I see that, on the other side, OSX users have to install rbenv / ruby to just use docker-sync - that makes me think if i should really stick to the docker-compose gem, since this is a huge hurdle to people actually not wanting to install all this when they are actually planing with docker.

Hard choices

@sandrodz
Copy link
Author

@EugenMayer people who moved to docker actually don't want anything on their host systems. So it would be better to come up with solution where docker-sync is run inside docker container with correct ruby version, this way avoiding keeping anything on host.

@EugenMayer
Copy link
Collaborator

this is impossible, docker-sync purpose is to fix what docker-for-mac fails on, it is host-based by defintion

@xeger
Copy link
Owner

xeger commented Sep 27, 2016

I added Ruby 2.0 support in docker-compose 1.0; @sandrodz if you upgrade from 0.8, that should fix your problems.

I added CI coverage to ensure that we remain compatible. See PR @EugenMayer.

@EugenMayer
Copy link
Collaborator

great, thank you @xeger

@sandrodz
Copy link
Author

@xeger @EugenMayer thank you both!

Though I've moved to rbenv

@xeger xeger closed this as completed in bd00919 Sep 27, 2016
xeger added a commit that referenced this issue Sep 27, 2016
Ruby 2.0 CI; add basic Mapper spec. Closes #40.
@boedy
Copy link

boedy commented Sep 28, 2016

You forgot changing:

spec.required_ruby_version = Gem::Requirement.new('~> 2.1')
to
spec.required_ruby_version = Gem::Requirement.new('~> 2.0')
in
https://github.com/xeger/docker-compose/blob/master/docker-compose.gemspec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants