We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
create
undefined method `[]' for nil:NilClass
/var/lib/aws/opsworks/cache.stage2/cookbooks/rails/recipes/configure.rb:51:in `block (3 levels) in from_file'
37: template "#{deploy[:deploy_to]}/shared/config/memcached.yml" do 38: source "memcached.yml.erb" 39: cookbook 'rails' 40: mode "0660" 41: group deploy[:group] 42: owner deploy[:user] 43: variables( 44: :memcached => deploy[:memcached] || {}, 45: :environment => deploy[:rails_env] 46: ) 47: 48: notifies :run, "execute[restart Rails app #{application}]" 49: 50: only_if do 51: deploy[:memcached][:host].present? && File.directory?("#{deploy[:deploy_to]}/shared/config/") 52: end 53: end 54: end
The text was updated successfully, but these errors were encountered:
Solved by adding a custom JSON to stack for memcahce attribute: { "deploy": { "allpolls-app": { "database": { "adapter": "postgresql", "encoding": "unicode", "host": "....rds.amazonaws.com", "port": "1234", "database": "test_production", "pool": "5", "username": "...", "password": "..." }, "redis": { "host": "....amazonaws.com", "port": "..." }, "memcached": { } } } }
Sorry, something went wrong.
Im seeing the same issue but adding the custom json as above has not worked for me.
No branches or pull requests
Error executing action
create
on resource 'template[/srv/www/test-app-app/shared/config/memcached.yml]'NoMethodError
undefined method `[]' for nil:NilClass
Cookbook Trace:
/var/lib/aws/opsworks/cache.stage2/cookbooks/rails/recipes/configure.rb:51:in `block (3 levels) in from_file'
Resource Declaration:
In /var/lib/aws/opsworks/cache.stage2/cookbooks/rails/recipes/configure.rb
37: template "#{deploy[:deploy_to]}/shared/config/memcached.yml" do
38: source "memcached.yml.erb"
39: cookbook 'rails'
40: mode "0660"
41: group deploy[:group]
42: owner deploy[:user]
43: variables(
44: :memcached => deploy[:memcached] || {},
45: :environment => deploy[:rails_env]
46: )
47:
48: notifies :run, "execute[restart Rails app #{application}]"
49:
50: only_if do
51: deploy[:memcached][:host].present? && File.directory?("#{deploy[:deploy_to]}/shared/config/")
52: end
53: end
54: end
The text was updated successfully, but these errors were encountered: