capistrano / rvm

MIT License
140 stars 47 forks source link

undefined method `each' for nil:NilClass #28

Closed batizhevsky closed 10 years ago

batizhevsky commented 10 years ago

cap 3

± cap staging deploy cap aborted! undefined method each' for nil:NilClass /Users/Leonid/.rvm/gems/ruby-2.0.0-p353@ekster/gems/capistrano-rvm-0.1.0/lib/capistrano/tasks/rvm.rake:38:inblock (2 levels) in <top (required)>' /Users/Leonid/.rvm/gems/ruby-2.0.0-p353@ekster/gems/capistrano-3.0.1/lib/capistrano/dsl.rb:14:in invoke' /Users/Leonid/.rvm/gems/ruby-2.0.0-p353@ekster/gems/capistrano-3.0.1/lib/capistrano/dsl/task_enhancements.rb:11:inblock in after' /Users/Leonid/.rvm/gems/ruby-2.0.0-p353@ekster/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in run' /Users/Leonid/.rvm/gems/ruby-2.0.0-p353@ekster/gems/capistrano-3.0.1/bin/cap:3:in<top (required)>' /Users/Leonid/.rvm/gems/ruby-2.0.0-p353@ekster/bin/cap:23:in `load'

kirs commented 10 years ago

Your rvm_map_bins is empty, but it supposed to be populated in the load:defaults task. Could you try capistrano from upstream?

batizhevsky commented 10 years ago

I rollback to 2.x branch. Thank you for help.

kirs commented 10 years ago

You're welcome. I don't have any ideas yet why this exception happens in your environment, because load:defaults is called here: https://github.com/capistrano/capistrano/blob/eba1b007a11f6aa2ea233c2b9b77a518f2cdff72/lib/capistrano/setup.rb#L13

We would appreciate if your show your capistrano configs so maybe I will find a reason why this issue may happen. As a workaround, you can try declaring set :rvm_map_bins, %w{gem rake ruby bundle} right in your deploy.rb.

Please notice that 2.x is not supported anymore.

systemiv commented 10 years ago

i have the same problem

kirs commented 10 years ago

Could you share your config, please?

systemiv commented 10 years ago

https://gist.github.com/systemiv/c8c5338ae9ffb23a579e

kirs commented 10 years ago
require 'capistrano/rvm'
require 'capistrano/bundler'

Should be placed in Capfile, as it's said in README :)

systemiv commented 10 years ago

Oh, please forgive me. Really my fault. thx

kirs commented 10 years ago

You're welcome! I'm glad that we solved the issue.