【发布时间】:2012-12-12 21:51:17
【问题描述】:
我只是想在 Ubuntu 12.04 上设置我的第一台 Rails 服务器。我安装了 rbenv(作为用户:deployer 与组 sudo 和管理员)。现在尝试根据他们的文档安装乘客。
我运行 passenger-install-nginx-module 它开始了,然后我得到了
Please specify a prefix directory [/opt/nginx]:
--------------------------------------------
Permission problems
This installer must be able to write to the following directory:
/opt/nginx
But it can't do that, because you're running the installer as deployer.
好的,然后我运行sudo passenger-install-nginx-module,然后得到sudo: passenger-install-nginx-module: command not found。
这是否意味着我必须以 root 身份登录安装它,为 root 用户安装整个 rbenv,然后安装乘客?我阅读的每个教程都是从非 root 用户帐户运行的:/,它对我不起作用。
【问题讨论】:
-
不,因为您的部署用户运行
which passenger-install-nginx-module以获取乘客脚本的完整路径,然后运行su,并使用完整路径运行命令。你只需要这个脚本一次;) -
谢谢,它正在工作。将其发布为答案,以便我批准。
标签: ruby ruby-on-rails-3 passenger rbenv