部署 求教 passenger 无法启动问题

a4652097 · 2020年05月24日 · 最后由 charlie_hsieh 回复于 2020年05月26日 · 2587 次阅读

参考了https://ruby-china.org/topics/36899进行代码部署

项目 ruby 版本 2.7.1 rails 版本 5.0.7

执行

$ cap staging deploy
The deploy has failed with an error: Exception while executing as deploy@101.200.221.104: passenger-config exit status: 1
passenger-config stdout: Nothing written
passenger-config stderr: *** ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it
is running, then the causes of this problem could be one of:

 1. You customized the instance registry directory using Apache's
    PassengerInstanceRegistryDir option, Nginx's
    passenger_instance_registry_dir option, or Phusion Passenger Standalone's
    --instance-registry-dir command line argument. If so, please set the
    environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that directory
    and run this command again.
 2. The instance directory has been removed by an operating system background
    service. Please set a different instance registry directory using Apache's
    PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir
    option, or Phusion Passenger Standalone's --instance-registry-dir command
    line argument.


返回我 Passenger 没有启动

去到服务器上

$  ps aux | grep flying-passenger
deploy   31557  0.0  0.0  16192  1080 pts/0    S+   22:19   0:00 grep --color=auto flying-passenger

再执行一下

$ passenger-status
Traceback (most recent call last):
    2: from /usr/local/bin/passenger-status:23:in `<main>'
    1: from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem passenger (>= 0.a) with executable passenger-status (Gem::GemNotFoundException)

未找到 passenger。。。

$ which passenger-config
/usr/local/bin/passenger-config

也是能找到的。

请问这个是什么问题?passenger 我确实也安装了。

passenger 沒有抓到 ruby 2.7 版本用的是 預設的 ruby 2.5

需要 登录 后方可回复, 如果你还没有账号请 注册新账号