尝试使用rc.local启动Passenger Standalone时出现问题。
我的服务器是:
所以现在我试图将代理转换为Passenger Standalone,但是我无法在启动时启动它。
我的rc.local脚本如下所示:
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. cd /srv/users/serverpilot/apps/lba/public/lba bundle exec passenger start exit 0
当我用“systemctl status rc-local.service”运行它时,我得到:
root@vultr:/srv/users/serverpilot/apps/lba/public/lba# systemctl status rc-local.service ● rc-local.service - /etc/rc.local Compatibility Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled) Drop-In: /lib/systemd/system/rc-local.service.d └─debian.conf Active: failed (Result: exit-code) since Mon 2017-07-17 02:53:05 UTC; 7min ago Process: 1269 ExecStart=/etc/rc.local start (code=exited, status=1/FAILURE) Jul 17 02:53:05 vultr.guest rc.local[1269]: /var/lib/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:109:in `block in definition_method' Jul 17 02:53:05 vultr.guest rc.local[1269]: /var/lib/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:21:in `setup' Jul 17 02:53:05 vultr.guest rc.local[1269]: /var/lib/gems/2.3.0/gems/bundler-1.15.1/lib/bundler.rb:101:in `setup' Jul 17 02:53:05 vultr.guest rc.local[1269]: /var/lib/gems/2.3.0/gems/bundler-1.15.1/lib/bundler/setup.rb:20:in `<top (required)>' Jul 17 02:53:05 vultr.guest rc.local[1269]: /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' Jul 17 02:53:05 vultr.guest rc.local[1269]: /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' Jul 17 02:53:05 vultr.guest systemd[1]: rc-local.service: Control process exited, code=exited status=1 Jul 17 02:53:05 vultr.guest systemd[1]: Failed to start /etc/rc.local Compatibility. Jul 17 02:53:05 vultr.guest systemd[1]: rc-local.service: Unit entered failed state. Jul 17 02:53:05 vultr.guest systemd[1]: rc-local.service: Failed with result 'exit-code'.
任何帮助将非常感激! 我试过使用RBENV,并有同样的问题。 我知道足够危险!