undefined local variable or method `ssh_options' for main:Object

970 views
Skip to first unread message

Red Hot Chili Pepper

unread,
Dec 9, 2013, 4:51:59 PM12/9/13
to capis...@googlegroups.com

I'm trying to do my first deploy with capistrano and get the following error

# cap staging deploy

cap aborted!
undefined local variable or method `ssh_options' for main:Object
config/deploy.rb:23:in `<top (required)>'
/var/lib/gems/1.9.1/gems/capistrano-3.0.1/lib/capistrano/setup.rb:12:in `load'
/var/lib/gems/1.9.1/gems/capistrano-3.0.1/lib/capistrano/setup.rb:12:in `block (2 levels) in <top (required)>'
/var/lib/gems/1.9.1/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/var/lib/gems/1.9.1/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
Tasks: TOP => staging

Inside config/deploy.rb

set :stages, %w(staging prod)
set :default_stage, "staging"

set :application, "ui"
set :deploy_to, '/home/nodeuser/platform/'

set :scm, :git
set :repository,  "g...@github.com:company/platform.git"
set :branch, "master"

ssh_options[:forward_agent] = true
default_run_options[:pty] = true

set :use_sudo, false
set :user, 'nodeuser'

set :keep_releases, 2
after "deploy", "deploy:cleanup"

Inside config/deploy/staging.rb

set :deploy_via, :checkout
server "website.com", :web, :primary => true

I'm using Capistrano Version: 3.0.1 (Rake Version: 10.1.0) and I can successfully ssh g...@github.com

How can I resolve the issue regarding ssh_options?



Lee Hambley

unread,
Dec 9, 2013, 5:00:01 PM12/9/13
to capistrano

Can you let me know where you found that documented? It doesn't exist. See capistrano/sshkit for the correct docs.

Sent from my Nexus 4.

--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/3f6982d6-1cc6-4ccd-9ce2-9dad5699bb67%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Red Hot Chili Pepper

unread,
Dec 9, 2013, 5:29:26 PM12/9/13
to capis...@googlegroups.com
Hi Lee -

github gives an example of agent forwarding, which is what ssh_options[:forward_agent] = true refers to

Lee Hambley

unread,
Dec 12, 2013, 3:13:44 AM12/12/13
to capistrano
Reply all
Reply to author
Forward
0 new messages