Closed pliu closed 9 years ago
Hi, thank you for this. I am looking into it. Could you try this with a current version of Ruby, 2.0 or newer and post if you have the same issue. Thanks.
It looks like we might need to lock down that gem version. Any version higher than 1.2.6 supports that call.
will do thank s @richardardrichard
The code works as is with ruby 2.1.5p273.
When attempting to sync a cookbook from git (using the example given in README.md), I receive the following error message:
/var/lib/gems/1.9.1/gems/git-1.2.6/lib/git/base.rb:335:in'
fetch': wrong number of arguments (2 for 1) (ArgumentError) from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/download/git_repository.rb:23:in
block in fetch' from /usr/lib/ruby/1.9.1/tmpdir.rb:83:inmktmpdir' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/download/git_repository.rb:21:in
fetch' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/inventory_requirement/git_requirement.rb:70:indownload_cookbook' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/inventory_requirement/base_requirement.rb:45:in
fetch_cookbook' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/mirror/inventory_builder.rb:43:inblock in install_cookbooks_with_explicit_location' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/mirror/inventory_requirements.rb:31:in
call' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/mirror/inventory_requirements.rb:31:inblock in each_with_explicit_location' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/mirror/inventory_requirements.rb:26:in
each' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/mirror/inventory_requirements.rb:26:ineach' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/mirror/inventory_requirements.rb:30:in
each_with_explicit_location' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/mirror/inventory_builder.rb:42:ininstall_cookbooks_with_explicit_location' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/mirror/inventory_builder.rb:26:in
build!' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/commands/mirror.rb:26:inexecute!' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/cli.rb:56:in
mirror' from /home/minimart/.gem/ruby/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:inrun' from /home/minimart/.gem/ruby/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command' from /home/minimart/.gem/ruby/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:indispatch' from /home/minimart/.gem/ruby/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in
start' from /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/bin/minimart:4:in<top (required)>' from /home/minimart/.gem/ruby/1.9.1/bin/minimart:19:in
load' from /home/minimart/.gem/ruby/1.9.1/bin/minimart:19:in `The problem is resolved by removing the second argument from the fetch call on line 23 in /home/minimart/.gem/ruby/1.9.1/gems/minimart-1.0.2/lib/minimart/download/git_repository.rb ("tags: true"). This is because the fetch function in /var/lib/gems/1.9.1/gems/git-1.2.6/lib/git/base.rb only accepts 0 or 1 argument.
I'm kind of a Ruby noob (also in general), so figured I'd just post this as an issue with how I managed to fix it and let you guys look at it more closely since I'm sure I missed something obvious...