0

Rails apps on server are started automatically via /etc/rc.local, i.e.:

thin start -p 8000 -c /usr/local/src/app1/curr -d -e production

In addition to above, I'd like to start some apps in a particular user's environment. Typically those are apps in development or UAT stage. For example, there is an app logger in:

/home/john/apps/logger/curr

which I usually start it as:

cd /home/john/apps/logger/curr
rvm 1.9.3
thin start -p 9001 -d

How can I specify an auto-started script such that after a system reboots, the logger app can be started without human intervention, in a certain rvm environment (ruby version + gemsets)?

ohho
  • 50,879
  • 75
  • 256
  • 383

1 Answers1

0

You need to create wrapper, using aliases also help, follow details here http://rvm.io/integration/init-d and the example init.d script in RVM => https://github.com/wayneeseguin/rvm/blob/master/contrib/unicorn_init.sh

mpapis
  • 52,729
  • 14
  • 121
  • 158