Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/58.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/228.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
Ruby on rails Mkdir:ubuntu 14上缺少操作数_Ruby On Rails_Ruby_Bash_Shell_Ubuntu - Fatal编程技术网

Ruby on rails Mkdir:ubuntu 14上缺少操作数

Ruby on rails Mkdir:ubuntu 14上缺少操作数,ruby-on-rails,ruby,bash,shell,ubuntu,Ruby On Rails,Ruby,Bash,Shell,Ubuntu,在Ubuntu14上创建一个目录时,shell抛出这个Mkdir:missing操作数 有人知道那个巫婆在说什么吗 Mkdir -p && chown -R ubuntu: && chmod + rw Mkdir: missing operand 卡皮斯特拉诺脚本 mkdir -p #{pids_path} && chown -R #{user}:#{group} #{pids_path} && chmod +rw #{pids_

在Ubuntu14上创建一个目录时,shell抛出这个Mkdir:missing操作数 有人知道那个巫婆在说什么吗

Mkdir -p && chown -R ubuntu: && chmod + rw
Mkdir: missing operand
卡皮斯特拉诺脚本

mkdir -p #{pids_path} && chown -R #{user}:#{group} #{pids_path} && chmod +rw #{pids_path}
mkdir -p #{sockets_path} && chown -R #{user}:#{group} #{sockets_path} && chmod +rw #{sockets_path

我在猜,但从我所能看出,
pids\u路径中有零。您的capistrano脚本包含以下内容:

mkdir -p #{pids_path} && chown -R #{user}:#{group} #{pids_path} && chmod +rw #{pids_path}
如果它变成这样:

Mkdir -p && chown -R ubuntu: && chmod + rw
然后,您可以看到shell脚本希望在
mkdir-p
之后和
&
之前出现一些内容,但是没有任何内容


顺便说一句,这意味着您告诉shell“创建一个名为nothing的目录”,这就是它失败的原因

您似乎在使用
$
的地方使用了
$
。这是一个capistrano脚本,执行shell执行
.{…}
是用于在字符串中插入表达式的Ruby语法。您的脚本看起来像原始shell代码。@chepner,是的,是capistrano部署脚本,输出原始shell代码!该组似乎也为空。