-
Notifications
You must be signed in to change notification settings - Fork 94
method missing 'bundle_install' #25
Comments
Hey, Can you paste me an error here? |
[2016-08-03T10:44:45+00:00] WARN: Error on deploying /srv/www/myapp/releases/20160803104441: No resource or method named `bundle_install' for `Chef::Provider::Deploy::Timestamped ""'
[2016-08-03T10:44:45+00:00] INFO: Removing failed deploy /srv/www/myapp/releases/20160803104441
================================================================================
Error executing action `deploy` on resource 'deploy[myapp]'
================================================================================
NoMethodError
-------------
No resource or method named `bundle_install' for `Chef::Provider::Deploy::Timestamped ""'
Cookbook Trace:
---------------
/var/chef/runs/179d6690-538f-479e-af05-3743c5611055/local-mode-cache/cache/cookbooks/opsworks_ruby/recipes/deploy.rb:56:in `block (3 levels) in from_file'
/var/chef/runs/179d6690-538f-479e-af05-3743c5611055/local-mode-cache/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
Resource Declaration:
---------------------
# In /var/chef/runs/179d6690-538f-479e-af05-3743c5611055/local-mode-cache/cache/cookbooks/opsworks_ruby/recipes/deploy.rb
23: deploy application['shortname'] do
24: deploy_to deploy_dir(application)
25: user node['deployer']['user'] || 'root'
26: group www_group
27: rollback_on_error true
28: environment application['environment'].merge(framework.out[:deploy_environment])
29:
30: keep_releases deploy[:keep_releases]
31: create_dirs_before_symlink(
32: (node['defaults']['deploy']['create_dirs_before_symlink'] + Array.wrap(deploy[:create_dirs_before_symlink])).uniq
33: )
34: purge_before_symlink(
35: (node['defaults']['deploy']['purge_before_symlink'] + Array.wrap(deploy[:purge_before_symlink])).uniq
36: )
37: symlink_before_migrate deploy[:symlink_before_migrate]
38: symlinks(node['defaults']['deploy']['symlinks'].merge(deploy[:symlinks] || {}))
39:
40: scm.out.each do |scm_key, scm_value|
41: send(scm_key, scm_value) if respond_to?(scm_key)
42: end
43:
44: [appserver, webserver].each do |server|
45: server.notifies[:deploy].each do |config|
46: notifies config[:action],
47: config[:resource].respond_to?(:call) ? config[:resource].call(application) : config[:resource],
48: config[:timer]
49: end
50: end
51:
52: migration_command(framework.out[:migration_command])
53: migrate framework.out[:migrate]
54: before_migrate do
55: #execute "cd #{release_path} && RAILS_ENV=production bundle install --without=development test"
56: bundle_install File.join(release_path, 'Gemfile') do
57: deployment true
58: without %w(development test)
59: end
60:
61: fire_hook(:deploy_before_migrate, context: self,
62: items: databases + [scm, framework, appserver, worker, webserver])
63:
64: run_callback_from_file(File.join(release_path, 'deploy', 'before_migrate.rb'))
65: end
66:
67: before_symlink do
68: unless framework.out[:migrate]
69: # execute "cd #{release_path} && RAILS_ENV=production bundle install --without=development test"
70: bundle_install File.join(release_path, 'Gemfile') do
71: deployment true
72: without %w(development test)
73: end
74: end Sorry for the delay. Sidenote, the change i made to just run the command bundle install (commented out line) worked, and a slight change to running |
Do we have to add this like a bundle_install is supposed to be in an I'm still feeling my way around Chef, but the repo for application_ruby doesn't look like this recipe. There is no explicit |
|
Hey for what it's worth, as you know more than I, I found adding just Why i bring this up is it because we are missing Also is this working for you without changes? like in your personal use of |
Ok, I nailed the error down. The problem was, that the
Having said that, this whole stack was only necessary for this |
The `application_ruby` cookbook was basically used only for `bundle_install` action. By removing it in favor of `execute 'bundle install ...'` we can remove this large, and unnecessary dependence. Closes ajgon#25
Was that supposed to come from somewhere else when you refactored, or am i missing a dependency?
either way i hardcoded a bundle exec just to get past it. when i have time i'll pull request all this together.
The text was updated successfully, but these errors were encountered: