Closed baburdick closed 11 years ago
do not merge it yet
@7hunderbird I'm bad with names, what do you think about run_rvm_or
=> https://github.com/engineyard/eycap/commit/b20fefb7ff5f3e1fbb4683d9a1b3939381e619b8#L1R7
@baburdick the code is available on branch bugfix/filtering_rvm_run_issue_43
Got this error when deploying with this change:
~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/variables.rb:82:in `block in fetch': `rvm_require_role' not found (IndexError)
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/variables.rb:110:in `block in protect'
from <internal:prelude>:10:in `synchronize'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/variables.rb:110:in `protect'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/variables.rb:78:in `fetch'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/bundler/gems/eycap-b20fefb7ff5f/lib/eycap/lib/rvm_helper.rb:11:in `block in run_rvm_or'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/actions/invocation.rb:78:in `block in parallel'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/command.rb:107:in `initialize'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/actions/invocation.rb:78:in `new'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/actions/invocation.rb:78:in `parallel'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/bundler/gems/eycap-b20fefb7ff5f/lib/eycap/lib/rvm_helper.rb:9:in `run_rvm_or'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/bundler/gems/eycap-b20fefb7ff5f/lib/eycap/recipes/bundler.rb:22:in `block (3 levels) in <top (required)>'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/callback.rb:38:in `call'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `each'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/callback.rb:38:in `call'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `each'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy.rb:254:in `block (2 levels) in load'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy.rb:234:in `block (3 levels) in load'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:56:in `transaction'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy.rb:233:in `block (2 levels) in load'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy.rb:201:in `block (2 levels) in load'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:45:in `each'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:34:in `execute!'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:14:in `execute'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/bin/cap:4:in `<top (required)>'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/bin/cap:19:in `load'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/bin/cap:19:in `<main>'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/bin/ruby_noexec_wrapper:14:in `eval'
from ~/.rvm/gems/ruby-1.9.3-p429@app_name/bin/ruby_noexec_wrapper:14:in `<main>'
Got further. But now I'm getting this:
`bundler:bundle_config' is only run for servers matching {:roles=>:app, :only=>{:no_bundle=>true}}, but no servers matched
~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:79:in `abort'
~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:79:in `handle_error'
~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:39:in `rescue in execute!'
~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:24:in `execute!'
~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:14:in `execute'
~/.rvm/gems/ruby-1.9.3-p429@app_name/gems/capistrano-2.15.5/bin/cap:4:in `<top (required)>'
~/.rvm/gems/ruby-1.9.3-p429@app_name/bin/cap:19:in `load'
~/.rvm/gems/ruby-1.9.3-p429@app_name/bin/cap:19:in `<main>'
~/.rvm/gems/ruby-1.9.3-p429@app_name/bin/ruby_noexec_wrapper:14:in `eval'
~/.rvm/gems/ruby-1.9.3-p429@app_name/bin/ruby_noexec_wrapper:14:in `<main>'
@7hunderbird the last error looks like problem with capistrano task filtering for bundler:bundle_config
https://github.com/capistrano/capistrano/blob/master/lib/capistrano/configuration/connections.rb#L160 - thsi si what causes this fail, I have found this https://gist.github.com/donnoman/251078#file-capistrano-filter-rb-L13 - not sure what to do now :(
That fixed it! Everything appears to work. Ship it! :-)
Thanks guys for working on and testing this!
I'll get this published today in next version of eycap.
@7hunderbird: Awesome. Looking forward to it. I have changes ready to merge once I can update that gem.
Thanks!
After upgrading to rvm-capistrano v1.4.3 in my Engine Yard Managed environment, my app's gems are now getting installed in
/data/app_name/shared/bundled_gems/ruby/1.9.1/gems
instead of in/usr/local/rvm/gems/ruby-1.9.3-p429@app_name/gems/
.