I am trying to deploy my rails app with opsworks recipes that I get from AWS. I tried to setup the entire thing by referring a blog here. Whatever he says is "php" or "php-app", I replaced with "rails" and my app name.
My role JSON for the app looks like this -
{
"name": "hercules",
"description": "OpsWorks recipe run-list for the rails app layer",
"app_type": "rails",
"default_attributes": {
"max_pool_size": 5
},
"run_list": [
"recipe[opsworks_initial_setup]",
"recipe[dependencies]",
"recipe[unicorn::rails]",
"recipe[rails::configure]",
"recipe[deploy::default]",
"recipe[deploy::rails]"
],
"chef_type": "role",
"json_class": "Chef::Role"
}
When I try to deploy, it runs other recipes well and gets stuck on this error for deploy::rails
-
==> app: ================================================================================
==> app: Recipe Compile Error in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/deploy/recipes/rails.rb
==> app: ================================================================================
==> app:
==> app:
==> app: NoMethodError
==> app: -------------
==> app: No resource or method named
opsworks_deploy' for
Chef::Recipe "rails"'
==> app:
==> app:
==> app: Cookbook Trace:
==> app: ---------------
==> app: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/deploy/recipes/rails.rb:20:in block in from_file'
==> app: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/deploy/recipes/rails.rb:2:in
each'
==> app: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/deploy/recipes/rails.rb:2:in `from_file'
==> app:
If I open the rails.rb:20
, that function is there -
opsworks_deploy do
Chef::Log.info("****** hi there *")
Chef::Log.info("#{application}")
Chef::Log.info(deploy.inspect)
app application
deploy_data deploy
end
Am I missing something terribly stupid here?
rails.rb
has the line and function definition there. Updated OP to reflect that. – Shrinath