Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js DigitalOcean VPS上的Capistrano检查失败_Node.js_Capistrano - Fatal编程技术网

Node.js DigitalOcean VPS上的Capistrano检查失败

Node.js DigitalOcean VPS上的Capistrano检查失败,node.js,capistrano,Node.js,Capistrano,我正在尝试将Node.js应用程序部署到运行在DigitalOcean上的VPS上,目前为止,我的工作进展顺利。我对*nix的理解非常有限,请耐心听我说:) 我可以使用ssh密钥以root身份ssh到我的VPS(ubuntu13.04 x32)中,没有任何问题。在本地计算机上运行“$cap deploy:setup”时,我得到以下结果: * 2013-09-11 12:39:08 executing `deploy:setup' * executing "mkdir -p /var/ww

我正在尝试将Node.js应用程序部署到运行在DigitalOcean上的VPS上,目前为止,我的工作进展顺利。我对*nix的理解非常有限,请耐心听我说:)

我可以使用ssh密钥以root身份ssh到我的VPS(ubuntu13.04 x32)中,没有任何问题。在本地计算机上运行“$cap deploy:setup”时,我得到以下结果:

  * 2013-09-11 12:39:08 executing `deploy:setup'
  * executing "mkdir -p /var/www/yable /var/www/yable/releases /var/www/yable/shared /var/www/yable/shared/system /var/www/yable/shared/log /var/www/yable/shared/pids"
    servers: ["162.243.1.207"]
    [162.243.1.207] executing command
 ** [out :: 162.243.1.207] env: sh: No such file or directory
    command finished in 118ms
failed: "env PATH=/var/www/yable NODE_ENV=production sh -c 'mkdir -p /var/www/yable /var/www/yable/releases /var/www/yable/shared /var/www/yable/shared/system /var/www/yable/shared/log /var/www/yable/shared/pids'" on 162.243.1.207
当我运行“$cap deploy:check”时,我得到以下输出:

* 2013-09-11 12:40:36 executing `deploy:check'
  * executing "test -d /var/www/yable/releases"
    servers: ["162.243.1.207"]
    [162.243.1.207] executing command
    command finished in 67ms
  * executing "test -w /var/www/yable"
    servers: ["162.243.1.207"]
    [162.243.1.207] executing command
    command finished in 76ms
  * executing "test -w /var/www/yable/releases"
    servers: ["162.243.1.207"]
    [162.243.1.207] executing command
    command finished in 69ms
  * executing "which git"
    servers: ["162.243.1.207"]
    [162.243.1.207] executing command
    command finished in 75ms
The following dependencies failed. Please check them and try again:
--> `/var/www/yable/releases' does not exist. Please run `cap deploy:setup'. (162.243.1.207)
--> You do not have permissions to write to `/var/www/yable'. (162.243.1.207)
--> You do not have permissions to write to `/var/www/yable/releases'. (162.243.1.207)
--> `git' could not be found in the path (162.243.1.207)
这是我的config/deploy.rb文件:

set :application, "Yable.com"
set :scm, :git
set :repository, "git@github.com:Yable/yable-node-js.git"
set :user, "root"
set :ssh_options, { :forward_agent => true }
default_run_options[:pty] = true
set :use_sudo, false
set :branch, "master"

role :app, "162.243.1.207"
set :deploy_to, "/var/www/yable"

set :default_environment, {
  'PATH' => "/var/www/yable",
  'NODE_ENV' => 'production'
}
我目瞪口呆,因为上面提到的目录(/var/www/yable/releases)确实存在,而且已经安装了git。有什么想法吗

谢谢,
Francis

我安装了ruby 2.0.0和Bundler,它似乎解决了我的部署问题