Skip to content
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

undefined method `run_state' for Chef::Resource::RunitService #4

Open
ghost opened this issue Feb 28, 2013 · 3 comments
Open

undefined method `run_state' for Chef::Resource::RunitService #4

ghost opened this issue Feb 28, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 28, 2013

I'm getting the following error when installing the torquebox::server recipe:

================================================================================
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/torquebox/recipes/server.rb
================================================================================


NoMethodError
-------------
undefined method `run_state' for Chef::Resource::RunitService


Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/torquebox/recipes/server.rb:79:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/torquebox/recipes/server.rb:77:in `from_file'


Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/torquebox/recipes/server.rb:

 72:    group "torquebox"
 73:    mode "0755"
 74:    action :create
 75:  end
 76:
 77:  runit_service "torquebox" do
 78:    options   node[:torquebox]
 79>>   run_state node[:torquebox][:run_state]
 80:  end
 81:
 82:  announce(:torquebox, :server)
 83:
 84:  # otherwise bundler won't work in jruby
 85:  gem_package 'jruby-openssl' do
 86:    gem_binary "#{current}/jruby/bin/jgem"
 87:  end
 88:



[2013-02-28T17:28:27+00:00] ERROR: Running exception handlers
[2013-02-28T17:28:27+00:00] ERROR: Exception handlers complete
[2013-02-28T17:28:27+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-02-28T17:28:27+00:00] FATAL: NoMethodError: undefined method `run_state' for Chef::Resource::RunitService
@ghost
Copy link
Author

ghost commented Feb 28, 2013

Alright, I think I found the problem, but I'm not sure how to fix it. It looks like you're using runit from ironfan-pantry. OpsCode also has a cookbook called runit. By default, the version from OpsCode is being intsalled. At a minimum, the Torquebox chef cookbook documentation should be updated to specify the correct version of runit.

@nicolasgarnil
Copy link

How did you solve this issue?

@ghost
Copy link
Author

ghost commented Apr 25, 2013

I installed the runit cookbook from https://github.com/infochimps-labs/ironfan-pantry/tree/master/cookbooks/runit and that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant