Type Error during capistrano deploy:setup

2019-08-26 06:34发布

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条回答
倾城 Initia
2楼-- · 2019-08-26 07:38

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

查看更多
登录 后发表回答