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

1.7.1 OSX 10.10 ArgumentError #4962

Closed
Spechal opened this Issue Dec 13, 2014 · 26 comments

Comments

Projects
None yet
@Spechal

Spechal commented Dec 13, 2014

OSX Yosemite
VirtualBox 4.3.20
Guest OS Ubuntu 14.10.1
Guest Additions installed

$ vagrant package --base ubuntu-vagrant
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb:153:in `action': wrong number of arguments (2 for 1) (ArgumentError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in `package_vm'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:66:in `package_base'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:in `cli'
    from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in `<main>'
@itaruru

This comment has been minimized.

Show comment
Hide comment
@itaruru

itaruru Dec 13, 2014

I installed vagrant from dmg on mac.
and change this line.

/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb:153

-     def action(name, **opts)
+     def action(name, opts)

thank you.

itaruru commented Dec 13, 2014

I installed vagrant from dmg on mac.
and change this line.

/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb:153

-     def action(name, **opts)
+     def action(name, opts)

thank you.

@Spechal

This comment has been minimized.

Show comment
Hide comment
@Spechal

Spechal Dec 13, 2014

Resolved my issue. Thank you.

Spechal commented Dec 13, 2014

Resolved my issue. Thank you.

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 13, 2014

Contributor

@Spechal @itaruru can you please run /opt/vagrant/embedded/bin/ruby -v and show the output?

Contributor

sethvargo commented Dec 13, 2014

@Spechal @itaruru can you please run /opt/vagrant/embedded/bin/ruby -v and show the output?

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 13, 2014

Contributor

Also, this is also a duplicate of #4960 - could you please respond there?

Contributor

sethvargo commented Dec 13, 2014

Also, this is also a duplicate of #4960 - could you please respond there?

@danvaida

This comment has been minimized.

Show comment
Hide comment
@danvaida

danvaida commented Dec 14, 2014

@itaruru +1 thanks!

@rkasigi

This comment has been minimized.

Show comment
Hide comment
@rkasigi

rkasigi Dec 15, 2014

thanks @itaruru . It's work for me!

rkasigi commented Dec 15, 2014

thanks @itaruru . It's work for me!

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 15, 2014

Contributor

This is fixed in master

Contributor

sethvargo commented Dec 15, 2014

This is fixed in master

@itaruru

This comment has been minimized.

Show comment
Hide comment
@itaruru

itaruru commented Dec 15, 2014

@sethvargo thank you!

@wayne-o

This comment has been minimized.

Show comment
Hide comment
@wayne-o

wayne-o Dec 17, 2014

Worked for me!

wayne-o commented Dec 17, 2014

Worked for me!

@lu-chi

This comment has been minimized.

Show comment
Hide comment
@lu-chi

lu-chi Dec 18, 2014

@itaruru +1 - it works on Ubuntu 14.04.

lu-chi commented Dec 18, 2014

@itaruru +1 - it works on Ubuntu 14.04.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 22, 2014

Removing ** worked great! ;)

ghost commented Dec 22, 2014

Removing ** worked great! ;)

@applefreak

This comment has been minimized.

Show comment
Hide comment
@applefreak

applefreak Dec 30, 2014

Had the same problem, works after removing **

applefreak commented Dec 30, 2014

Had the same problem, works after removing **

@symgryph

This comment has been minimized.

Show comment
Hide comment
@symgryph

symgryph Dec 31, 2014

Works with yosemite, ruby 2.1.5

symgryph commented Dec 31, 2014

Works with yosemite, ruby 2.1.5

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 31, 2014

Contributor

Hi, please do not remove the ** as it could damage your Vagrant installation and make the upgrade process difficult in the future. Here is the actual fix: f9eff24

Contributor

sethvargo commented Dec 31, 2014

Hi, please do not remove the ** as it could damage your Vagrant installation and make the upgrade process difficult in the future. Here is the actual fix: f9eff24

@symgryph

This comment has been minimized.

Show comment
Hide comment
@symgryph

symgryph Jan 1, 2015

I tried the fix still get the following:

vagrant package --base CentosBase6.6 --output centostest.box

/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in
`core#hash_merge_kwd': wrong argument type String (expected Symbol)
(TypeError)

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in
`package_vm'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:66:in
`package_base'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:42:in
`execute'

from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in
`execute'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:in
`cli'

from
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in
`

'

Reverting back to 'working' dangerous fix.....sadness'

On Wed, Dec 31, 2014 at 5:53 PM, Seth Vargo notifications@github.com
wrote:

Hi, please do not remove the ** as it could damage your Vagrant
installation and make the upgrade process difficult in the future. Here is
the actual fix: f9eff24
f9eff24


Reply to this email directly or view it on GitHub
#4962 (comment).


Two Wheels Good, Four Wheels Bad

symgryph commented Jan 1, 2015

I tried the fix still get the following:

vagrant package --base CentosBase6.6 --output centostest.box

/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in
`core#hash_merge_kwd': wrong argument type String (expected Symbol)
(TypeError)

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in
`package_vm'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:66:in
`package_base'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:42:in
`execute'

from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in
`execute'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:in
`cli'

from
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in
`

'

Reverting back to 'working' dangerous fix.....sadness'

On Wed, Dec 31, 2014 at 5:53 PM, Seth Vargo notifications@github.com
wrote:

Hi, please do not remove the ** as it could damage your Vagrant
installation and make the upgrade process difficult in the future. Here is
the actual fix: f9eff24
f9eff24


Reply to this email directly or view it on GitHub
#4962 (comment).


Two Wheels Good, Four Wheels Bad

@symgryph

This comment has been minimized.

Show comment
Hide comment
@symgryph

symgryph Jan 1, 2015

I just went back to 1.6.5, since it works. I did check out the github
version, and got the same error.

On Thu, Jan 1, 2015 at 4:15 PM, Thomas Munn symgryph@gmail.com wrote:

I tried the fix still get the following:

vagrant package --base CentosBase6.6 --output centostest.box

/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in
`core#hash_merge_kwd': wrong argument type String (expected Symbol)
(TypeError)

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in
`package_vm'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:66:in
`package_base'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:42:in
`execute'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in
`execute'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:in
`cli'

from
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in
`

'

Reverting back to 'working' dangerous fix.....sadness'

On Wed, Dec 31, 2014 at 5:53 PM, Seth Vargo notifications@github.com
wrote:

Hi, please do not remove the ** as it could damage your Vagrant
installation and make the upgrade process difficult in the future. Here is
the actual fix: f9eff24
f9eff24


Reply to this email directly or view it on GitHub
#4962 (comment).


Two Wheels Good, Four Wheels Bad


Two Wheels Good, Four Wheels Bad

symgryph commented Jan 1, 2015

I just went back to 1.6.5, since it works. I did check out the github
version, and got the same error.

On Thu, Jan 1, 2015 at 4:15 PM, Thomas Munn symgryph@gmail.com wrote:

I tried the fix still get the following:

vagrant package --base CentosBase6.6 --output centostest.box

/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in
`core#hash_merge_kwd': wrong argument type String (expected Symbol)
(TypeError)

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in
`package_vm'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:66:in
`package_base'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:42:in
`execute'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in
`execute'

from
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:in
`cli'

from
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in
`

'

Reverting back to 'working' dangerous fix.....sadness'

On Wed, Dec 31, 2014 at 5:53 PM, Seth Vargo notifications@github.com
wrote:

Hi, please do not remove the ** as it could damage your Vagrant
installation and make the upgrade process difficult in the future. Here is
the actual fix: f9eff24
f9eff24


Reply to this email directly or view it on GitHub
#4962 (comment).


Two Wheels Good, Four Wheels Bad


Two Wheels Good, Four Wheels Bad

@AntonioMeireles

This comment has been minimized.

Show comment
Hide comment
@AntonioMeireles

AntonioMeireles Jan 2, 2015

fwiw exact same issue as @symgryph here (10.10.1 && vagrant 1.7.1 && f9eff24 applied)

cd box; \
    vagrant package --base "CoreOS Box" --output ../coreos.box --include change_host_name.rb,configure_networks.rb --vagrantfile vagrantfile.tpl
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in `core#hash_merge_kwd': wrong argument type String (expected Symbol) (TypeError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in `package_vm'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:66:in `package_base'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:in `cli'
    from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in `<main>'
make: *** [coreos.box] Error 1

AntonioMeireles commented Jan 2, 2015

fwiw exact same issue as @symgryph here (10.10.1 && vagrant 1.7.1 && f9eff24 applied)

cd box; \
    vagrant package --base "CoreOS Box" --output ../coreos.box --include change_host_name.rb,configure_networks.rb --vagrantfile vagrantfile.tpl
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in `core#hash_merge_kwd': wrong argument type String (expected Symbol) (TypeError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:83:in `package_vm'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:66:in `package_base'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/package/command.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:in `cli'
    from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in `<main>'
make: *** [coreos.box] Error 1
@alu

This comment has been minimized.

Show comment
Hide comment
@alu

alu Jan 5, 2015

I think need symbol key in hash.

      def package_vm(vm, options)
        opts = options.inject({}) do |acc, data|
          k,v = data
          acc["package.#{k}".to_sym] = v
          acc
        end

        vm.action(:package, **opts)
      end

alu commented Jan 5, 2015

I think need symbol key in hash.

      def package_vm(vm, options)
        opts = options.inject({}) do |acc, data|
          k,v = data
          acc["package.#{k}".to_sym] = v
          acc
        end

        vm.action(:package, **opts)
      end
@AntonioMeireles

This comment has been minimized.

Show comment
Hide comment
@AntonioMeireles

AntonioMeireles Jan 5, 2015

humm. issue seems to be https://bugs.ruby-lang.org/issues/10118 if i'm understanding things correctly

AntonioMeireles commented Jan 5, 2015

humm. issue seems to be https://bugs.ruby-lang.org/issues/10118 if i'm understanding things correctly

@sramazzina

This comment has been minimized.

Show comment
Hide comment
@sramazzina

sramazzina Jan 5, 2015

Worked for me thanks!!

sramazzina commented Jan 5, 2015

Worked for me thanks!!

@AntonioMeireles

This comment has been minimized.

Show comment
Hide comment
@AntonioMeireles

AntonioMeireles Jan 5, 2015

@sramazzina fwiw it doesn't seem to work that well here. it stops failing but custom args to vagrant package are silently ignored...

AntonioMeireles commented Jan 5, 2015

@sramazzina fwiw it doesn't seem to work that well here. it stops failing but custom args to vagrant package are silently ignored...

@sramazzina

This comment has been minimized.

Show comment
Hide comment
@sramazzina

sramazzina Jan 5, 2015

I was trying to simply package my ubuntu vm and it worked.... but I was so excited that I made the changes before coming to post's end :-( .... That's my mistake! I reverted the change to the original version. Someone can tell me if the packaged box can be considered as good or do I have to throw it away?

sramazzina commented Jan 5, 2015

I was trying to simply package my ubuntu vm and it worked.... but I was so excited that I made the changes before coming to post's end :-( .... That's my mistake! I reverted the change to the original version. Someone can tell me if the packaged box can be considered as good or do I have to throw it away?

@alu

This comment has been minimized.

Show comment
Hide comment
@alu

alu Jan 6, 2015

@AntonioMeireles Sorry, my comment was not perfectly.

alu commented Jan 6, 2015

@AntonioMeireles Sorry, my comment was not perfectly.

@tian-xiaobo

This comment has been minimized.

Show comment
Hide comment
@tian-xiaobo

tian-xiaobo Jan 7, 2015

vi vagrant-1.7.1/lib/vagrant/machine.rb:153

def action(name, **opts) to def action(name, opts)

tian-xiaobo commented Jan 7, 2015

vi vagrant-1.7.1/lib/vagrant/machine.rb:153

def action(name, **opts) to def action(name, opts)

@AntonioMeireles

This comment has been minimized.

Show comment
Hide comment
@AntonioMeireles

AntonioMeireles Jan 7, 2015

fwiw 1.7.2, released in last few hours, seems to have fixed this once and for all out of the box 😄

AntonioMeireles commented Jan 7, 2015

fwiw 1.7.2, released in last few hours, seems to have fixed this once and for all out of the box 😄

@rsvalerio

This comment has been minimized.

Show comment
Hide comment
@rsvalerio

rsvalerio May 18, 2015

Same problem here.

Environment: vagrant 1.7.2, ruby 2.0.0p481, OSX Yosemite - 10.10.3

Changed file: vi vagrant-1.7.2/lib/vagrant/machine.rb:153

before: def action(name, opts=nil)

after: def action(name, opts)

Done. Thanks to @tian-xiaobo

rsvalerio commented May 18, 2015

Same problem here.

Environment: vagrant 1.7.2, ruby 2.0.0p481, OSX Yosemite - 10.10.3

Changed file: vi vagrant-1.7.2/lib/vagrant/machine.rb:153

before: def action(name, opts=nil)

after: def action(name, opts)

Done. Thanks to @tian-xiaobo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment