gpt4 book ai didi

ruby - sudo ./starling start 运行良好,但 sudo service starling start 失败

转载 作者:行者123 更新时间:2023-12-04 19:04:23 26 4
gpt4 key购买 nike

sudo ./starling start效果很好,但是 sudo service starling start失败

$ sudo ./starling start
* Starting Starling Server... [ OK ]
$ sudo ./starling stop
* Stop Starling Server... [ OK ]
$ sudo service starling stop
* Starting Starling Server...
/home/keating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
`to_specs': Could not find starling (>= 0) amongst [minitest-1.6.0,
rake-0.8.7, rdoc-2.5.8] (Gem::LoadError) from
/home/keating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
`to_spec' from
/home/keating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1229:in
`gem' from /home/keating/.rvm/gems/ruby-1.9.2-p290/bin/starling:18:in
`<main>'

上面的错误是“找不到 gem starling”

在八哥文件之后(位于/etc/init.d, rwxrwxrwx):
set -e
LOGFILE=/var/log/starling/starling.log SPOOLDIR=/var/spool/starling
PORT=22122 LISTEN=127.0.0.1 PIDFILE=/var/run/starling.pid



NAME=starling DESC="Starling"
INSTALL_DIR=/home/keating/.rvm/gems/ruby-1.9.2-p290/bin/
DAEMON=$INSTALL_DIR/$NAME SCRIPTNAME=/etc/init.d/$NAME
OPTS="-d"

. /lib/lsb/init-functions


d_start() {
log_begin_msg "Starting Starling Server..."
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $OPTS || log_end_msg 1
log_end_msg 0 }

d_stop() {
log_begin_msg "Stopping Starling Server..."
start-stop-daemon --stop --quiet --pidfile $PIDFILE || log_end_msg 1
log_end_msg 0 }

case "$1" in start) d_start ;; stop) d_stop ;;
restart|force-reload|reload) d_stop sleep 2 d_start ;;
*) echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" exit 3 ;; esac

exit 0

最佳答案

Starling 是用 rvm 的包装脚本创建的吗? http://rvm.io/integration/god/

关于ruby - sudo ./starling start 运行良好,但 sudo service starling start 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9848526/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com