Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/21.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 为什么我总是需要;“红宝石”;在“前面”;脚本/运行程序“;?_Ruby On Rails_Ruby_Unix_Cron_Whenever - Fatal编程技术网

Ruby on rails 为什么我总是需要;“红宝石”;在“前面”;脚本/运行程序“;?

Ruby on rails 为什么我总是需要;“红宝石”;在“前面”;脚本/运行程序“;?,ruby-on-rails,ruby,unix,cron,whenever,Ruby On Rails,Ruby,Unix,Cron,Whenever,当我只执行script/runner时,它会给我-bash:script/runner:Permission denied 当我执行sudo-script/runner时,它会给我sudo:script/runner:command-not-found 它只在我执行ruby脚本/runner时起作用。为什么?在其他地方,我看到人们只是运行script/runner,前面没有ruby。。。这有“修复”方法吗?每当生成crontab时,它都会导致我的javan在权限被拒绝时失败,因为它只运行scri

当我只执行
script/runner
时,它会给我
-bash:script/runner:Permission denied

当我执行
sudo-script/runner
时,它会给我
sudo:script/runner:command-not-found

它只在我执行
ruby脚本/runner
时起作用。为什么?在其他地方,我看到人们只是运行
script/runner
,前面没有
ruby
。。。这有“修复”方法吗?每当生成crontab时,它都会导致我的javan在
权限被拒绝时失败,因为它只运行
script/runner
,而不运行
ruby

就这样做吧

chmod+x脚本/运行程序

它会运行。它基本上使它成为一个可执行文件

使用

曼奇莫德

要获取更多详细信息,请执行以下操作

chmod+x脚本/运行程序

它会运行。它基本上使它成为一个可执行文件

使用

曼奇莫德

要获取更多详细信息,您的
脚本/runner
文件似乎没有设置“执行”权限位。如果未设置该位,unix shell将不会尝试执行它

chmod+x脚本/runner
可用于设置它
manchmod
了解chmod命令的更多详细信息。

听起来您的
脚本/runner
文件中没有设置“执行”权限位。如果未设置该位,unix shell将不会尝试执行它


chmod+x脚本/runner
可用于设置它
manchmod
了解chmod命令的更多详细信息。

哦,太好了!!:D现在是一个问题的大头钉。。。我正在使用capistrano部署。。。我是否需要添加
chmod+x script/runner
作为部署过程的一部分,或者,例如,我可以在存储库中这样做,或者其他什么?谢谢您可以在cucumber中创建自定义任务来完成此任务。哦,太好了!!:D现在是一个问题的大头钉。。。我正在使用capistrano部署。。。我是否需要添加
chmod+x script/runner
作为部署过程的一部分,或者,例如,我可以在存储库中这样做,或者其他什么?谢谢您可以在cucumber中创建自定义任务来完成此操作。这不是编程问题,它属于superuser.com。这不是编程问题,它属于superuser.com。