Knife ec2 server create -> undefined method `merge'

The following command used to work… not sure what changed:

$ knife ec2 server create -VV -I ami-b89842d1 -f m1.small -G zzz
–region us-east-1 -Z us-east-1c -x ubuntu -S chef

DEBUG: Using configuration from /home/ubuntu/.chef/knife.rb
Instance ID: i-xxxxxxxx
Flavor: m1.small
Image: ami-b89842d1
Region: us-east-1
Availability Zone: us-east-1c
Security Groups: zzz
Tags: Namei-xxxxxxxx
SSH Key: chef

Waiting for server…
Public DNS Name: ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com
Public IP Address: xxx.xxx.xxx.xxx
Private DNS Name: xxx-xxx-xxx-xxx.ec2.internal
Private IP Address: xxx.xxx.xxx.xxx

Waiting for sshd…DEBUG: sshd accepting connections on
ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com, banner is
SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1

done
Bootstrapping Chef on ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com
DEBUG: Looking for bootstrap template in
/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in
/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap
/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/bootstrap_context.rb:99:in
first_boot': undefined methodmerge’ for “{}”:String (NoMethodError)
from (erubis):54:in evaluate' from /var/lib/gems/1.8/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:ininstance_eval’
from /var/lib/gems/1.8/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in
evaluate' from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:152:inrender_template’
from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:210:in
ssh_command' from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:190:inknife_ssh’
from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:167:in
run' from /var/lib/gems/1.8/gems/knife-ec2-0.5.13/lib/chef/knife/ec2_server_create.rb:256:inrun’
from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:402:in
run_with_pretty_exceptions' from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:168:inrun’
from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/application/knife.rb:123:in
run' from /var/lib/gems/1.8/gems/chef-0.10.10/bin/knife:25 from /usr/local/bin/knife:19:inload’
from /usr/local/bin/knife:19

Eric,

That one might be my fault... :frowning: Are you using the branch I posted a few
days ago ? If so please get the latest one, I found this bug shortly
after I posted it and updated my fork, as well as my pull request to
OpsCode.... Sorry

-John

On Thu, May 31, 2012 at 7:20 PM, Eric Jain eric.jain@gmail.com wrote:

The following command used to work... not sure what changed:

$ knife ec2 server create -VV -I ami-b89842d1 -f m1.small -G zzz
--region us-east-1 -Z us-east-1c -x ubuntu -S chef

DEBUG: Using configuration from /home/ubuntu/.chef/knife.rb
Instance ID: i-xxxxxxxx
Flavor: m1.small
Image: ami-b89842d1
Region: us-east-1
Availability Zone: us-east-1c
Security Groups: zzz
Tags: Namei-xxxxxxxx
SSH Key: chef

Waiting for server.......................
Public DNS Name: ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com
Public IP Address: xxx.xxx.xxx.xxx
Private DNS Name: xxx-xxx-xxx-xxx.ec2.internal
Private IP Address: xxx.xxx.xxx.xxx

Waiting for sshd......DEBUG: sshd accepting connections on
ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com, banner is
SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1

done
Bootstrapping Chef on ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com
DEBUG: Looking for bootstrap template in
/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in
/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap

/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/bootstrap_context.rb:99:in
first_boot': undefined method merge' for "{}":String (NoMethodError)
from (erubis):54:in evaluate' from /var/lib/gems/1.8/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in instance_eval'
from
/var/lib/gems/1.8/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in
evaluate' from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:152:in render_template'
from
/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:210:in
ssh_command' from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:190:in knife_ssh'
from
/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:167:in
run' from /var/lib/gems/1.8/gems/knife-ec2-0.5.13/lib/chef/knife/ec2_server_create.rb:256:in run'
from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:402:in
run_with_pretty_exceptions' from /var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:168:in run'
from
/var/lib/gems/1.8/gems/chef-0.10.10/lib/chef/application/knife.rb:123:in
run' from /var/lib/gems/1.8/gems/chef-0.10.10/bin/knife:25 from /usr/local/bin/knife:19:in load'
from /usr/local/bin/knife:19

On Thu, May 31, 2012 at 4:22 PM, John Dyer johntdyer@gmail.com wrote:

That one might be my fault... :frowning: Are you using the branch I posted a few
days ago ? If so please get the latest one, I found this bug shortly after
I posted it and updated my fork, as well as my pull request to OpsCode....
Sorry

Yes, that's it. Strange, because your branch did seem to work when I
tried it a few days ago... In any case, thanks!

Eric,

Yea, the problem happened when you didn't pass any attributes w/
--json-attributes, sorry about that :slight_smile:

-John

On Thu, May 31, 2012 at 7:31 PM, Eric Jain eric.jain@gmail.com wrote:

On Thu, May 31, 2012 at 4:22 PM, John Dyer johntdyer@gmail.com wrote:

That one might be my fault... :frowning: Are you using the branch I posted a
few
days ago ? If so please get the latest one, I found this bug shortly
after
I posted it and updated my fork, as well as my pull request to
OpsCode....
Sorry

Yes, that's it. Strange, because your branch did seem to work when I
tried it a few days ago... In any case, thanks!