如何将WEBrick作为新手工作运行?


1

我需要得到 使用WEBrick (基本上是一个Rails Web服务器)使用upstart工作,但无法弄清楚我应该在脚本中写什么。

以下给出了一个错误:

chdir /rails-app

exec su -s /bin/sh -c 'exec "$0" "$@"' myuser -- rails server -e production

start on runlevel [2345]
stop on runlevel [^2345]

(错误是 rails: 1: exec: rails: not found

Ruby是通过安装的 rvm,所以我应该尝试类似的东西:

exec su -s /bin/sh -c 'exec "$0" "$@"' myuser -- /home/myuser/.rvm/gems/ruby-1.9.3-p385/bin/bundle exec rails server -e production

但这也行不通( /usr/bin/env: ruby_noexec_wrapper: No such file or directory )。

如何将WEBrick作为新手工作运行?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.