Sugarcrm-ce --no method error


#1

Hi,

When installing sugarcrm-ce cookbook, it shows no method error.I ve added their dependencies cookbook and am testing that in a linux platform of ubuntu,

[2014-09-29T14:30:25+02:00] INFO: *** Chef 11.4.4 ***
[2014-09-29T14:30:26+02:00] INFO: Setting the run_list to [“recipe[chef_handler]”, “recipe[notification_handler]”, “recipe[sugarcrm-ce]”] from JSON
[2014-09-29T14:30:26+02:00] INFO: Run List is [recipe[chef_handler], recipe[notification_handler], recipe[sugarcrm-ce]]
[2014-09-29T14:30:26+02:00] INFO: Run List expands to [chef_handler, notification_handler, sugarcrm-ce]
[2014-09-29T14:30:26+02:00] INFO: Starting Chef Run for e41bd7ad-f9fc-4a41-b7a7-419443b4575c
[2014-09-29T14:30:26+02:00] INFO: Running start handlers
[2014-09-29T14:30:26+02:00] INFO: Start handlers complete.
[2014-09-29T14:30:26+02:00] ERROR: Running exception handlers
[2014-09-29T14:30:27+02:00] ERROR: Exception handlers complete
[2014-09-29T14:30:27+02:00] FATAL: Stacktrace dumped to /var/chef-solo/cache/chef-stacktrace.out
[2014-09-29T14:30:27+02:00] FATAL: NoMethodError: undefined method `[]’ for nil:NilClass
~
Thanks & regards,
indra K


#2

Hey Indra,

You need to provide a bit more information. Along with the error, there
should be a stack trace and an excerpt from the failing recipe. If you
don’t see those, try increasing your log-level to debug (–log_level debug).

Matt Moretti

On Mon, Sep 29, 2014 at 9:05 AM, Indra k indra.k@cloudenablers.com wrote:

Hi,

When installing sugarcrm-ce cookbook, it shows no method error.I ve
added their dependencies cookbook and am testing that in a linux platform
of ubuntu,

[2014-09-29T14:30:25+02:00] INFO: *** Chef 11.4.4 ***
[2014-09-29T14:30:26+02:00] INFO: Setting the run_list to
[“recipe[chef_handler]”, “recipe[notification_handler]”,
“recipe[sugarcrm-ce]”] from JSON
[2014-09-29T14:30:26+02:00] INFO: Run List is [recipe[chef_handler],
recipe[notification_handler], recipe[sugarcrm-ce]]
[2014-09-29T14:30:26+02:00] INFO: Run List expands to [chef_handler,
notification_handler, sugarcrm-ce]
[2014-09-29T14:30:26+02:00] INFO: Starting Chef Run for
e41bd7ad-f9fc-4a41-b7a7-419443b4575c
[2014-09-29T14:30:26+02:00] INFO: Running start handlers
[2014-09-29T14:30:26+02:00] INFO: Start handlers complete.
[2014-09-29T14:30:26+02:00] ERROR: Running exception handlers
[2014-09-29T14:30:27+02:00] ERROR: Exception handlers complete
[2014-09-29T14:30:27+02:00] FATAL: Stacktrace dumped to
/var/chef-solo/cache/chef-stacktrace.out
[2014-09-29T14:30:27+02:00] FATAL: NoMethodError: undefined method `[]'
for nil:NilClass
~
Thanks & regards,
indra K


#3

Hi,

  Here is my chef-stacktraceout,as  far as i know  whether we need to install php5-fpm  for install sugarcrm-ce in ubunjtu debian platform:

Generated at 2014-09-30 07:37:05 +0100
NoMethodError: undefined method []' for nil:NilClass /var/chef-solo/cookbooks/sugarcrm-ce/attributes/default.rb:31:infrom_file’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in instance_eval' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:infrom_file’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/include_attribute.rb:39:in block in include_attribute' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/include_attribute.rb:31:ineach’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/include_attribute.rb:31:in include_attribute' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:169:inload_attribute_file’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:158:in load_attributes_from_cookbook' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:109:inblock in compile_attributes’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:108:in each' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:108:incompile_attributes’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:71:in compile' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:86:inload’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:224:in setup_run_context' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:467:indo_run’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:200:in run' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:190:inrun_chef_client’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:239:in block in run_application' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:inloop’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:in run_application' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:73:inrun’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/bin/chef-solo:25:in <top (required)>' /usr/bin/chef-solo:23:inload’
/usr/bin/chef-solo:23:in `’
~

Thanks & regards,indra K


From: Indra k indra.k@cloudenablers.com
To: "chef@lists.opscode.com" chef@lists.opscode.com
Sent: Monday, 29 September 2014 6:35 PM
Subject: sugarcrm-ce --no method error

Hi,

When installing sugarcrm-ce cookbook, it shows no method error.I ve added their dependencies cookbook and am testing that in a linux platform of ubuntu,

[2014-09-29T14:30:25+02:00] INFO: *** Chef 11.4.4 ***
[2014-09-29T14:30:26+02:00] INFO: Setting the run_list to [“recipe[chef_handler]”, “recipe[notification_handler]”, “recipe[sugarcrm-ce]”] from JSON
[2014-09-29T14:30:26+02:00] INFO: Run List is [recipe[chef_handler], recipe[notification_handler], recipe[sugarcrm-ce]]
[2014-09-29T14:30:26+02:00] INFO: Run List expands to [chef_handler, notification_handler, sugarcrm-ce]
[2014-09-29T14:30:26+02:00] INFO: Starting Chef Run for e41bd7ad-f9fc-4a41-b7a7-419443b4575c
[2014-09-29T14:30:26+02:00] INFO: Running start handlers
[2014-09-29T14:30:26+02:00] INFO: Start handlers complete.
[2014-09-29T14:30:26+02:00] ERROR: Running exception handlers
[2014-09-29T14:30:27+02:00] ERROR: Exception handlers complete
[2014-09-29T14:30:27+02:00] FATAL: Stacktrace dumped to /var/chef-solo/cache/chef-stacktrace.out
[2014-09-29T14:30:27+02:00] FATAL: NoMethodError: undefined method `[]’ for nil:NilClass
~
Thanks & regards,
indra K


#4

Looks like your “sugarcrm-ce” cookbook depends on some attributes from
elsewhere. Assuming it’s the version that’s on supermarket, it looks like
it needs an attribute from the apache cookbook.

I thought just having the apache cookbook in the metadata of the
sugarcrm-ce cookbook (which it is) was enough, but maybe try adding
"recipe[apache2]" to your run-list?

Matt Moretti

On Tue, Sep 30, 2014 at 3:34 AM, Indra k indra.k@cloudenablers.com wrote:

Hi,

  Here is my chef-stacktraceout,as  far as i know  whether we need to

install php5-fpm for install sugarcrm-ce in ubunjtu debian platform:

Generated at 2014-09-30 07:37:05 +0100
NoMethodError: undefined method []' for nil:NilClass /var/chef-solo/cookbooks/sugarcrm-ce/attributes/default.rb:31:infrom_file’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in
instance_eval' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:infrom_file’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/include_attribute.rb:39:in
block in include_attribute' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/include_attribute.rb:31:ineach’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/include_attribute.rb:31:in
include_attribute' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:169:inload_attribute_file’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:158:in
load_attributes_from_cookbook' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:109:inblock in compile_attributes’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:108:in
each' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:108:incompile_attributes’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:71:in
compile' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:86:inload’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:224:in
setup_run_context' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:467:indo_run’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:200:in
run' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:190:inrun_chef_client’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:239:in
block in run_application' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:inloop’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:in
run_application' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:73:inrun’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/bin/chef-solo:25:in
<top (required)>' /usr/bin/chef-solo:23:inload’
/usr/bin/chef-solo:23:in `’
~
Thanks & regards,
indra K

From: Indra k indra.k@cloudenablers.com
To: "chef@lists.opscode.com" chef@lists.opscode.com
Sent: Monday, 29 September 2014 6:35 PM
Subject: sugarcrm-ce --no method error

Hi,

When installing sugarcrm-ce cookbook, it shows no method error.I ve
added their dependencies cookbook and am testing that in a linux platform
of ubuntu,

[2014-09-29T14:30:25+02:00] INFO: *** Chef 11.4.4 ***
[2014-09-29T14:30:26+02:00] INFO: Setting the run_list to
[“recipe[chef_handler]”, “recipe[notification_handler]”,
“recipe[sugarcrm-ce]”] from JSON
[2014-09-29T14:30:26+02:00] INFO: Run List is [recipe[chef_handler],
recipe[notification_handler], recipe[sugarcrm-ce]]
[2014-09-29T14:30:26+02:00] INFO: Run List expands to [chef_handler,
notification_handler, sugarcrm-ce]
[2014-09-29T14:30:26+02:00] INFO: Starting Chef Run for
e41bd7ad-f9fc-4a41-b7a7-419443b4575c
[2014-09-29T14:30:26+02:00] INFO: Running start handlers
[2014-09-29T14:30:26+02:00] INFO: Start handlers complete.
[2014-09-29T14:30:26+02:00] ERROR: Running exception handlers
[2014-09-29T14:30:27+02:00] ERROR: Exception handlers complete
[2014-09-29T14:30:27+02:00] FATAL: Stacktrace dumped to
/var/chef-solo/cache/chef-stacktrace.out
[2014-09-29T14:30:27+02:00] FATAL: NoMethodError: undefined method `[]'
for nil:NilClass
~
Thanks & regards,
indra K