Type Error during capistrano deploy:setup

こ雲淡風輕ζ 提交于 2019-12-12 04:53:36

问题


I've spent about three weeks on trying to track down this error, so forgive me if this is a silly question but I'm at a total loss. I'm struggling to figure out why I can't deploy this app. I get a type error when I try to deploy:setup and deploy:check with capistrano, and I can't figure out where it might be coming from. I thought it might be a mistake I made while setting up my ssh keys. However, when I ssh to the server via the command line the ssh key setup is clearly working. I'm using ruby-1.9.2-p290, Rails 3.1.3, rvm 1.10.2, capistrano 2.5.2, Mac OS 10.6.8, and I'm deploying to a friend's server which is running phusion passenger.

So far we have tried switching to ruby 3.1, and back to 1.9.2, re-installing rvm, re-installing phusion passenger, deleting and re-creating gemsets etc. etc.

Thanks in advance for any help you can offer! My whole project has been on hold for wayyyy too long now! Do let me know if any further information would help. Thanks!

Here's what happens when I run deploy:setup with capistrano from my project folder:

$ cap deploy:setup * executing `deploy:setup' * executing "mkdir -p /usr/local/www/sites/myapp.nullpointer.ca/public/ >/usr/local/www/sites/myapp.nullpointer.ca/public/releases >/usr/local/www/sites/myapp.nullpointer.ca/public/shared >/usr/local/www/sites/myapp.nullpointer.ca/public/shared/system >/usr/local/www/sites/myapp.nullpointer.ca/public/shared/log >/usr/local/www/sites/myapp.nullpointer.ca/public/shared/pids && chmod g+w >/usr/local/www/sites/myapp.nullpointer.ca/public/ >/usr/local/www/sites/myapp.nullpointer.ca/public/releases >/usr/local/www/sites/myapp.nullpointer.ca/public/shared >/usr/local/www/sites/myapp.nullpointer.ca/public/shared/system >/usr/local/www/sites/myapp.nullpointer.ca/public/shared/log >/usr/local/www/sites/myapp.nullpointer.ca/public/shared/pids" servers: ["myapp.nullpointer.ca"] connection failed for: myapp.nullpointer.ca (TypeError: no implicit conversion from nil >to integer)

And here is my deploy file:

$:.unshift(File.expand_path('./lib', ENV['rvm_path']))

require "rvm/capistrano"

set :application, "Myapp"

set :scm, "git"
set :repository,  "ssh://git@friendsserver.nullpointer.ca/usr/local/git_root/myapp.git"

set :rvm_ruby_string, "1.9.2-p290@myapp"

ssh_options[:forward_agent] = true
ssh_options[:verbose] = :debug

set :branch, "master"

set :deploy_via, :remote_cache

set :deploy_to, "/usr/local/www/sites/myapp.nullpointer.ca/public/"

set :use_sudo, false

set :domain, 'myapp.nullpointer.ca'

role :app, domain
role :web, domain
role :db,  domain, :primary => true

回答1:


Problem resolved. For some reason updating capistrano solved the type error. Thanks to lisukorin!



来源:https://stackoverflow.com/questions/9252200/type-error-during-capistrano-deploysetup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!