[RESOLVED]unable to run ruby/webrick server through rc.local redmine]#ruby script/server webrick -e production

Added by system admin0987 over 10 years ago

How to l
#cd /var/www/redmine
[root@pm redmine]# ruby script/server webrick -e production

=> Booting WEBrick
=> Rails 2.3.11 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-09-14 16:15:20] INFO  WEBrick 1.3.1
[2012-09-14 16:15:20] INFO  ruby 1.8.7 (2011-06-30) [x86_64-linux]
[2012-09-14 16:15:20] INFO  WEBrick::HTTPServer#start: pid=4721 port=3000

vi /etc/rc.local

touch /var/lock/subsys/local
#load ruby webrick on startup of boot loading

su -c  "cd /var/www/redmine && /usr/bin/ruby script/server -d webrick -e production" - redmine > /dev/null

Further u see

vi /etc/rc.local

touch /var/lock/subsys/local

it create local file without any problem as in rc.local . but above script don't work for me.

Replies (1)

RE: unable to run ruby/webrick server through rc.local redmine]#ruby script/server webrick -e production - Added by system admin0987 over 10 years ago

#vi /etc/rc.local

cd /var/www/redmine && /usr/bin/ruby script/server -d webrick -e production

It load my wbrick on next reboot.great

(1-1/1)