我正在尝试与乘客一起运行 redmine。我运行了以下命令:
sudo passenger start RAILS_ENV=production
并得到以下异常:
Stopping web server.../var/lib/gems/1.9.1/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:63:in `initialize': No such file or directory - /usr/share/nginx/www/redmine-install/RAILS_ENV=production/passenger.3000.pid.lock (Errno::ENOENT)
from /var/lib/gems/1.9.1/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:63:in `open'
from /var/lib/gems/1.9.1/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:63:in `exclusive_lock'
from /var/lib/gems/1.9.1/gems/daemon_controller-1.1.5/lib/daemon_controller.rb:289:in `stop'
from /var/lib/gems/1.9.1/gems/passenger-4.0.18/lib/phusion_passenger/standalone/start_command.rb:637:in `block in stop_nginx'
from <internal:prelude>:10:in `synchronize'
from /var/lib/gems/1.9.1/gems/passenger-4.0.18/lib/phusion_passenger/standalone/start_command.rb:634:in `stop_nginx'
from /var/lib/gems/1.9.1/gems/passenger-4.0.18/lib/phusion_passenger/standalone/start_command.rb:104:in `rescue in run'
from /var/lib/gems/1.9.1/gems/passenger-4.0.18/lib/phusion_passenger/standalone/start_command.rb:114:in `run'
from /var/lib/gems/1.9.1/gems/passenger-4.0.18/lib/phusion_passenger/standalone/main.rb:92:in `run_command'
from /var/lib/gems/1.9.1/gems/passenger-4.0.18/lib/phusion_passenger/standalone/main.rb:62:in `run!'
from /var/lib/gems/1.9.1/gems/passenger-4.0.18/lib/phusion_passenger/standalone/main.rb:39:in `run!'
from /var/lib/gems/1.9.1/gems/passenger-4.0.18/bin/passenger:36:in `<top (required)>'
from /usr/local/bin/passenger:23:in `load'
from /usr/local/bin/passenger:23:in `<main>'
我已经通过以下方式安装了带有 nginx 的乘客(在带有 raspbian 的树莓派上):
Recompile nginx with passenger support as the standard ubuntu version doesn't have it.
sudo gem install passenger --no-ri --no-rdoc
sudo passenger-install-nginx-module
sudo passenger
Choose /usr/local/nginx as installation directory.
Change the following line in /etc/init.d/nginx:
#DAEMON=/usr/sbin/nginx
DAEMON=/usr/local/nginx/sbin/nginx
In /etc/nginx/nginx.conf add the following to the http section:
passenger_root /var/lib/gems/1.9.1/gems/passenger-4.0.18;
passenger_ruby /usr/bin/ruby1.9.1;
我不确定如何解决此错误。一些帮助将不胜感激!