在capistrano部署期间键入错误:setup

时间:2012-02-12 20:02:06

标签: ruby-on-rails deployment capistrano

我花了大约三个星期试图追查这个错误,所以请原谅我,如果这是一个愚蠢的问题,但我完全失去了。我正在努力弄清楚为什么我不能部署这个应用程序。我尝试部署时出现类型错误:setup and deploy:check with capistrano,我无法弄清楚它可能来自哪里。我认为这可能是我在设置我的ssh密钥时犯的错误。但是,当我通过命令行ssh到服务器时,ssh密钥设置显然正常工作。我正在使用ruby-1.9.2-p290,Rails 3.1.3,rvm 1.10.2,capistrano 2.5.2,Mac OS 10.6.8,我正在部署到运行phusion乘客的朋友服务器。

到目前为止,我们已尝试切换到ruby 3.1,然后返回1.9.2,重新安装rvm,重新安装phusion乘客,删除并重新创建gemsets等等。

提前感谢您提供的任何帮助!我的整个项目现在已经搁置了太久了!如果有任何进一步的信息有用,请告诉我。谢谢!

以下是我运行deploy时发生的情况:使用我的项目文件夹中的capistrano进行设置:

  

$ cap deploy:setup    *执行`deploy:setup'    *执行“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”      服务器:[“myapp.nullpointer.ca”]   连接失败:myapp.nullpointer.ca(TypeError:没有从nil>到整数的隐式转换)

这是我的部署文件:

$:.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 个答案:

答案 0 :(得分:0)

问题已解决。由于某种原因,更新capistrano解决了类型错误。感谢lisukorin!