[chef] Re: Couldn't parse JSON in /media/chef/site-cookbooks/LAMP/metadata.json rake aborted! A JSON text must at least contain two octets!


Chronological Thread 
  • From: Vasiliy G Tolstov < >
  • To:
  • Subject: [chef] Re: Couldn't parse JSON in /media/chef/site-cookbooks/LAMP/metadata.json rake aborted! A JSON text must at least contain two octets!
  • Date: Thu, 13 May 2010 15:46:23 +0400
  • Organization: Selfip.Ru

В Чтв, 13/05/2010 в 04:42 -0700, 

 пишет:
> Hello. I'm try to write cookbook LAMP
> 
> metadata.rb:
> 
> maintainer     "vase"
> maintainer_email 
> " "
> license        "none"
> description    "Installs/Configures LAMP package"
> long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
> version        "0.0.1"
> depends        "apache2"
> 
> When i'm try to do :
> rake metadata i get error:
> 
>  :/media/chef/site-cookbooks/LAMP#
>  rake --trace  metadata
> (in /media/chef)
> ** Invoke metadata (first_time)
> ** Execute metadata
> Couldn't parse JSON in /media/chef/site-cookbooks/LAMP/metadata.json
> rake aborted!
> A JSON text must at least contain two octets!

I'm delete empty json file, and re-run rake metadata

:/media/chef/site-cookbooks/LAMP#
 rake metadata --trace
(in /media/chef)
** Invoke metadata (first_time)
** Execute metadata
Generating metadata for LAMP
rake aborted!
undefined method `generate' for
#<JSON::Ext::Generator::State:0x7f92d3f84680>
/usr/lib/ruby/gems/1.8/gems/json_pure-1.4.3/lib/json/common.rb:270:in
`pretty_generate'
/usr/lib/ruby/1.8/chef/tasks/chef_repo.rake:326
/usr/lib/ruby/1.8/chef/tasks/chef_repo.rake:325:in `open'
/usr/lib/ruby/1.8/chef/tasks/chef_repo.rake:325
/usr/lib/ruby/1.8/chef/tasks/chef_repo.rake:319:in `each'
/usr/lib/ruby/1.8/chef/tasks/chef_repo.rake:319
/usr/lib/ruby/1.8/chef/cookbook_loader.rb:137:in `each'
/usr/lib/ruby/1.8/chef/cookbook_loader.rb:136:in `each_value'
/usr/lib/ruby/1.8/chef/cookbook_loader.rb:136:in `each'
/usr/lib/ruby/1.8/chef/tasks/chef_repo.rake:314
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19


-- 
Vasiliy G Tolstov 
< >
Selfip.Ru




Archive powered by MHonArc 2.6.16.

§