So I'm trying to run Jazzy to document my code but I'm not getting very far.
This is what happens when i run Jazzy on my Xcode project written in swift(and some functions in # objc). Do i need to prepare the project in any way? I can't find anything about this, but it's my first time using Xcode and jazzy.
Can anyone tell me why it's not able to run properly am i doing something wrong while running the command?
jazzy
Running xcodebuild
Checking xcodebuild -showBuildSettings
Assuming New Build System is used.
Parsing AppDelegate.swift (1/4)
Parsing Card.swift (2/4)
Parsing SceneDelegate.swift (3/4)
Parsing ViewController.swift (4/4)
0% documentation coverage with 0 undocumented symbols
skipped 4 private, fileprivate, or internal symbols (use `--min-acl` to specify a different minimum ACL)
building site
building search index
jam out ♪♫ to your fresh new docs in `docs`
I tried doing jazzy --min-acl but this happens:
jazzy --min-acl
Traceback (most recent call last):
15: from /usr/local/bin/jazzy:23:in `<main>'
14: from /usr/local/bin/jazzy:23:in `load'
13: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/bin/jazzy:15:in `<top (required)>'
12: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:442:in `parse!'
11: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:485:in `parse_command_line'
10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1678:in `parse!'
9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1656:in `permute!'
8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1562:in `order!'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1568:in `parse_in_order'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1568:in `catch'
5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1582:in `block in parse_in_order'
4: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:54:in `block in attach_to_option_parser'
3: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:35:in `set'
2: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:35:in `instance_exec'
1: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:342:in `block in <class:Config>'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/source_declaration/access_control_level.rb:64:in `from_human_string': cannot initialize AccessControlLevel with '' (RuntimeError)
For the sake of people searching on google, when jazzy reports skipped items and generates 0% of documentation, invoke jazzy in the following way:
jazzy --min-acl <internal|fileprivate|private>
Swift is internal unless you specify the access otherwise.
Here is a link to the github readme discussing this topic: https://github.com/realm/jazzy#controlling-what-is-documented
Related
Getting an error while executing action 'create' on a resource. I am running the recipe in --local-mode not sure if that is the problem.
I am just trying to run it locally first instead of running it on a node.
Pasting my file and my output in here :
[2019-04-09T19:25:51+00:00] WARN: Node rheaj has an empty run list.
Converging 4 resources
Recipe: #recipe_files::/home/rheaj/chef/cookbooks/oc_jumpbox/recipes/default.rb
* cookbook_file[/etc/motd] action create[2019-04-09T19:25:51+00:00] INFO: Processing cookbook_file[/etc/motd] action create (#recipe_files::/home/rheaj/chef/cookbooks/oc_jumpbox/recipes/default.rb line 9)
================================================================================
Error executing action `create` on resource 'cookbook_file[/etc/motd]'
================================================================================
Chef::Exceptions::CookbookNotFound
----------------------------------
Cookbook #recipe_files not found. If you're loading #recipe_files from another cookbook, make sure you configure the dependency in your metadata
Resource Declaration:
---------------------
# In /home/rheaj/chef/cookbooks/oc_jumpbox/recipes/default.rb
9: cookbook_file '/etc/motd' do
10: group 'root'
11: user 'root'
12: mode '0644'
13: source 'motd'
14: end
15:
Default location for your cookbook_files is in files/default. The error you get is that your cookbook file is not there. Can you create that file files/default/motd and re run your chef-client.
When I run the powershell script on chef -solo on local System ,it give below error message. I have already added powershell in cookbook,
NoMethodError:-------------
No resource or method named `powershell' for `Chef::Recipe "M3"'
Cookbook Trace:
---------------
C:\chef\cookbooks\Balasahebb\recipes\M3.rb:44:in `from_file'
Relevant File Content:
----------------------
C:\chef\cookbooks\Balasahebb\recipes\M3.rb:
37: #Write the output status of the commands to C:\auto\runstatus in the forma
t status:success or status:failed
38:
39: template "c:\\auto\\zib.conf" do
40: source "csb_automaticmssql_configuration.erb"
41: #variables({:hostname => "#{HOSTNAME}"})
42: end
43:
44>> powershell "create configuration directory and copy conf" do
45: code <<-EOH
46: Backloc=(Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Zman
da\ZIB).BackupSetLocation
47: mkdir "#{Backloc}\#{BACKUPSET}"
48: CP 'c:\\auto\\zib.conf' "#{Backloc}\\#{BACKUPSET}\\zib.conf"
49:
50: EOH
51: action :run
52: end
53:
Running handlers:
[2015-07-15T13:50:01+05:30] ERROR: Running exception handlers
Running handlers complete
[2015-07-15T13:50:01+05:30] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 20.512517 seconds
[2015-07-15T13:50:01+05:30] FATAL: Stack trace dumped to C:/chef/cache/chef-stack
trace.out
[2015-07-15T13:50:01+05:30] FATAL: No Method Error: No resource or method named `p
power shell' for `Chef::Recipe "M3"`enter code here`'
You should add depends 'powershell' to your metadata.rb file, if you want that resource available. This is assuming you are using the powershell community cookbook, and not just looking for the powershell_script resource that comes with Chef.
I'm struggling trying to get the configuration of rails-api with the mongo_mapper gem.
I'm using rails v 4.1.1
gemfile looks as follows
source 'https://rubygems.org'
gem 'mongo'
gem 'mongo_mapper', :git => "git://github.com/mongomapper/mongomapper.git", :tag => "v0.13.0.beta2"
gem 'bson_ext'
gem 'railties'
I ran rails-api new test-app --skip-active-record which generates a simple file structure.
.
├── Gemfile
├── Gemfile.lock
├── README.rdoc
├── Rakefile
└── config.ru
After that, per the instructions on the README for mongo_mapper I specified the correct version in my gemfile so that it's compatible with Rails 4.
gem 'mongo_mapper', :git => "git://github.com/mongomapper/mongomapper.git", :tag => "v0.13.0.beta2"
According to
- http://mongomapper.com/documentation/getting-started/rails.html
- How can I get mongo mapper to generate the config/mongo.yml file in Rails 4
I should then be able to run bundle exec rails generate mongo_mapper:config. It was here I started running into issues.
I first realized I need railsties gem since it wasn't even letting me run rails generate.
$ bundle exec rails generate mongo_mapper:config
/Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/rubygems_integration.rb:248:in `block in replace_gem': railties is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
from /Users/colinhhart/.rbenv/versions/2.1.0/bin/rails:22:in `<main>'
After adding that gem it allowed me to run bundle exec rails generate mongo_mapper:config but doesn't actually have access to that mongo generator. The output from the command is the standard rails help info including usage, options etc.
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/colinhhart/.rbenv/versions/2.1.0/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
What I've tried so far
I've tried building out what the generator is supposed to build as is described in this guide
http://technicaldebt.com/getting-started-with-ruby/mongomapper-ith-rails-quickstart/
But then realized that even if I build that out there's obviously still some "glue" that I'm missing, which ties everything together. I built it out just in case and of course it still didn't work.
I've made sure to bundle and and reload the terminal appropriately.
Like I said, I'm pretty sure there's something necessary that gets skipped when I build the rails-api without active record.
Any thoughts on this? Would greatly appreciate the help.
For what it's worth this is the full output when I ran rails-api new my_app --skip-active-record.
$ rails-api new pitfworld_wide_atrocities_db --skip-active-record
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
(erb):19:in `template': undefined method `name' for []:Array (NoMethodError)
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `eval'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `result'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:116:in `block in template'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `call'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block (2 levels) in invoke!'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `open'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block in invoke!'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `call'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:115:in `template'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/generators/rails/app/app_generator.rb:17:in `template'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/generators/rails/app/app_generator.rb:45:in `gemfile'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/generators/app_base.rb:133:in `build'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/generators/rails/app/app_generator.rb:176:in `create_root_files'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/commands/application.rb:17:in `<top (required)>'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.1/lib/rails/cli.rb:14:in `<top (required)>'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/colinhhart/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rails-api-0.2.1/bin/rails-api:4:in `<top (required)>'
from /Users/colinhhart/.rbenv/versions/2.1.0/bin/rails-api:23:in `load'
from /Users/colinhhart/.rbenv/versions/2.1.0/bin/rails-api:23:in `<main>'
Solution
I came across that rails-api issue right as I was writing this post and it turned out that that was the issue, after banging my head forever thinking it was a mongo issue.
The issue has been fixed and closed but hasn't yet been released and will probably be released in rails-api v0.2.2.
Ultimately, I decided to just go into the rails-api source code and apply the changes locally.
I'm trying to learn to use Capistrano 3 by following the DOCS and I've written a simple task to test my understanding.
The task is created in the default task dir in lib/capistrano/tasks:
desc "Check status of web server"
task :nginx_status do
on roles(:web) do |host|
execute 'service nginx status'
end
end
My config/deploy/staging.rb file contains the following:
set :stage, :staging
role :web, "192.168.0.11"
role :app, "192.168.0.11"
role :db, "192.168.0.11", primary:true
server '192.168.0.11', user: 'vagrant', roles: %w{web app}
Capfile
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
My deploy.rb contains an app name and a repo url to github.
When I run cap staging nginx_status I get the following error:
** Invoke staging (first_time)
** Execute staging
** Invoke load:defaults (first_time)
** Execute load:defaults
cap aborted!
Don't know how to build task 'nginx_status'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/task_manager.rb:62:in `[]'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:149:in `invoke_task'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:106:in `each'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:106:in `block in top_level'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:115:in `run_with_threads'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:100:in `top_level'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:78:in `block in run'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rake-10.3.1/lib/rake/application.rb:75:in `run'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/capistrano-3.2.1/lib/capistrano/application.rb:15:in `run'
/Users/H/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/capistrano-3.2.1/bin/cap:3:in `<top (required)>'
/Users/H/.rbenv/versions/2.1.1/bin/cap:23:in `load'
/Users/H/.rbenv/versions/2.1.1/bin/cap:23:in `<main>'
I also noticed that if I ran cap -vT the task nginx_status is not in the list(?)
On a side note, are SSH keys a must to connect to remote servers?
UPDATE 1
I found that if I place my task in config/deploy.rb it works. So the question I now have is how do you run tasks from the task dir?
UPDATE 2
So as per the Capfile the tasks dir is looked at by the following:
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
So I changed the task extension to .rake and it worked. However the documentation says it should be .cap
"We'll dive into those more later, but add those lines to a file in ./lib/capistrano/tasks, call it something like access_check.cap"
Take a look at this commit.
They've switched from .cap to .rake 3 months ago.
The whole idea is to make capistrano3 fully rake-compatible. Just use .rake extension for you tasks.
I just installed a fresh CentOS 6.3 VM and disabled SELinux. Below is the exact script that I ran to install Ruby, Chef Solo, and attempted to provision the VM:
#!/bin/bash
#
# Install Chef-Solo if it doesn't exist, then provision the server.
#
CHEF_FILE="https://dl.dropbox.com/u/4204671/LiquidCompass/lc-chef.tar.gz"
if [ "$#" -eq 0 ]; then
echo "You must provide the type of server this is. (Eg: production-api, qa-api, development)"
exit 1
fi
if [ ! -x "/usr/bin/chef-solo" ]; then
rpm -Uvh http://rbel.frameos.org/rbel6
yum install -y ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode
cd /tmp
curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar zxf rubygems-1.8.10.tgz
cd rubygems-1.8.10
ruby setup.rb --no-format-executable
gem install chef --no-ri --no-rdoc
fi
if [ -d "/etc/chef" ]; then
rm -rf /etc/chef
fi
if [ -d "/tmp/lc-chef" ]; then
rm -rf /tmp/lc-chef*
fi
mkdir /etc/chef
echo "file_cache_path \"/tmp/lc-chef/chef-solo\"
cookbook_path \"/tmp/lc-chef/cookbooks\"
role_path \"/tmp/lc-chef/roles\"
json_attribs \"/etc/chef/node.json\"" > /etc/chef/solo.rb
echo "{
\"name\": \"$1\",
\"normal\": {
\"company\": \"Liquid Compass LLC\",
\"tags\": []
},
\"chef_environment\": \"_default\",
\"run_list\": [
\"role[$1]\"
]
}" > /etc/chef/node.json
cd /tmp
curl -O $CHEF_FILE
tar zxf lc-chef.tar.gz
chef-solo -c /etc/chef/solo.rb
Unfortunately, right as the script runs I receive:
[2012-12-05T17:39:27-07:00] INFO: Start handlers complete.
================================================================================
Recipe Compile Error in /tmp/lc-chef/cookbooks/liquidcompass/recipes/php.rb
================================================================================
NoMethodError
-------------
undefined method `[]' for nil:NilClass
Cookbook Trace:
---------------
/tmp/lc-chef/cookbooks/liquidcompass/recipes/php.rb:20:in `from_file'
Relevant File Content:
----------------------
/tmp/lc-chef/cookbooks/liquidcompass/recipes/php.rb:
13: # Unless required by applicable law or agreed to in writing, software
14: # distributed under the License is distributed on an "AS IS" BASIS,
15: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: # See the License for the specific language governing permissions and
17: # limitations under the License.
18: #
19:
20>> php_url = "http://us.php.net/distributions/php-#{node['php']['version']}.tar.gz"
21: node.set['php']['prefix'] = "/opt/php-#{node['php']['version']}"
22: node.set['php']['conf_path'] = "#{node['php']['dir']}/php.ini"
23: node.set['php']['configure_flags'] = [
24: "--prefix=#{node['php']['prefix']}",
25: "--with-config-file-path=#{node['php']['dir']}",
26: "--with-config-file-scan-dir=#{node['php']['dir']}/conf.d",
27: "--with-curl",
28: "--with-pear",
29: "--with-gd",
So it looks like it's choking on trying to load node['php']['version']. This is defined in my /tmp/lc-chef/cookbooks/liquidcompass/attributes/default.rb with:
default['php']['version'] = "5.4.9"
So it appears that Chef is either not loading the attributes file, or something else is wrong. Not exactly sure how to find this out or not.
Running:
RubyGems 1.8.10
Chef 10.16.2
Best regards,
Andrew
By the way, this is the stack trace:
Generated at Wed Dec 05 17:39:27 -0700 2012
NoMethodError: undefined method `[]' for nil:NilClass
/tmp/lc-chef/cookbooks/liquidcompass/recipes/php.rb:20:in `from_file'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/cookbook_version.rb:558:in `load_recipe'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/mixin/language_include_recipe.rb:46:in `load_recipe'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/mixin/language_include_recipe.rb:33:in `include_recipe'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/run_context.rb:79:in `load'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/run_context.rb:75:in `each'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/run_context.rb:75:in `load'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/client.rb:198:in `setup_run_context'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/client.rb:418:in `do_run'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/client.rb:176:in `run'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/application.rb:140:in `run_chef_client'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/application/solo.rb:224:in `run_application'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/application/solo.rb:216:in `loop'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/application/solo.rb:216:in `run_application'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/../lib/chef/application.rb:72:in `run'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.2/bin/chef-solo:25
/usr/bin/chef-solo:19:in `load'
/usr/bin/chef-solo:19
Default attributes work fine in Chef Solo
I'm not sure what's happening inside your cookbook - but it is an issue with your code, not with Chef. As a simple example, check this out:
https://gist.github.com/adamhjk/6141718
chef solo does not support default attributes.
You're going to need to put together a node.json under your nodes directory which lists the attributes in .json form.
So in your case:
{
"php": {
"version": "5.4.9"
}
}
If you want to use default attributes/any attributes in .rb format, you're going to need to use chef-server/chef-client.