【发布时间】:2015-05-30 19:51:51
【问题描述】:
带有 rbenv 和 ruby 2.2.1 的 Ubuntu 14.04 上的 Rails 4.1。
将 capistrano 与 capistrano-passenger gem 一起使用,但最后重启失败:
INFO [8213c63a] Running /usr/bin/env passenger-config restart-app /home/deployer/my_app --ignore-app-not-running as deployer@mysite.com
DEBUG [8213c63a] Command: passenger-config restart-app
DEBUG [8213c63a] Please pass either an app path prefix or an app group name. See --help for more information.
当我尝试通过 SSH 在命令行运行此命令时,我得到了这个:
deployer@host:~/app/shared/config$ passenger-config restart-app
*** ERROR: You are not authorized to query the status for this
我在这里做错了什么?
我使用的是 Apache,这是我的 /etc/apache2/apache2.conf 的相关部分:
LoadModule passenger_module /home/deployer/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/passenger-5.0.5/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/deployer/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/passenger-5.0.5
PassengerDefaultRuby /home/deployer/.rbenv/versions/2.2.1/bin/ruby
</IfModule>
<VirtualHost *:80>
ServerName mysite.name.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /home/deployer/myssite/current/public
<Directory /home/deployer/mysite/current/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
Require all granted
</Directory>
</VirtualHost>
【问题讨论】:
-
我刚刚遇到了同样的问题(Ubuntu 14.04、Apache+mod_passwnger、Rbenv、Ruby 2.0.0p594、Rails 4.1、Capistrano 3.4.0)。我现在正在解决这个问题,但您提供的更多信息可能会帮助我解决您的设置问题。你用的是 Apache 还是 nginx?如果您使用的是 Apache,您能否显示 Apache 配置中的 DocumentRoot 和 Passenger* 行?
标签: ruby-on-rails capistrano passenger capistrano3