Sam Stokes
13 post(s)
|
I’ve just updated to v2.3.1 of the Brightbox gem, and I’m porting our gem dependencies over from config/environment.rb to config/deploy.rb. I’m getting some weird errors from Capistrano (2.5.0) when I declare a gem dependency with a specified source and then run deploy:check.
If I remove the source, deploy:check works fine. We use the Capistrano multi-stage setup, don’t know if that’s significant. I’ve tried updating Capistrano to v2.5.4, but it still fails at the same point (although with a different error message).
Am I doing something wrong, or is this a bug?
e.g.:
deploy.rb:
# …
# depend :remote, :gem, “rubyist-aasm”, “=2.0.2” # works fine
depend :remote, :gem, “rubyist-aasm”, “=2.0.2”, “http://gems.github.com” # stack trace
# …
Bash prompt:
$ cap staging deploy:check
* executing `staging’
triggering start callbacks for `deploy:check’
* executing `multistage:ensure’
* executing `deploy:check’
* executing “test -d /home/rails/ovc_test/releases”
servers: [“mojobox2-001.vm.brightbox.net”]
Password:
[mojobox2-001.vm.brightbox.net] executing command
command finished
…
* executing “which gem”
servers: [“mojobox2-001.vm.brightbox.net”]
[mojobox2-001.vm.brightbox.net] executing command
command finished
* executing “gem specification —version ‘=2.0.2’ rubyist-aasm 2>&1 | awk ‘BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }’”
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/actions/invocation.rb:153:in `merge’: can’t convert String into Hash (TypeError)
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/actions/invocation.rb:153:in `add_default_command_options’
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/actions/invocation.rb:71:in `run_tree’
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/actions/invocation.rb:54:in `run’
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/remote_dependency.rb:94:in `try’
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/remote_dependency.rb:41:in `gem’
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:426:in `send’
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:426:in `load’
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:425:in `each’
… 15 levels…
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:14:in `execute’
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/bin/cap:4
from /usr/bin/cap:19:in `load’
from /usr/bin/cap:19
|
David Smalley
Administator
36 post(s)
|
@sam.
This is my fault completely. Back to the drawing board on how to handle custom dependencies. I thought I’d properly tested this fix but clearly I hadn’t.
I’ve filed a bug in our internal tracker and will try to get this resolved asap.
|
Sam Stokes
13 post(s)
|
Hi David,
I just noticed version 2.3.2 of the gem. Just to let you know, I’ve tested it and both cap deploy:check and cap gems:install appear to work fine.
Thanks!
—
Sam
|