1
1
I've recently started Ruby on Rails development, and I'm using Vagrant as a VM to contain my Rails project, because Windows is a terrible OS to use for any sort of Ruby development, due to the seemingly random lack of support for various RubyGems.
My question is this: I want to use a shellscript to launch the various three commands in separate DETACHED screen sessions, with respective names:
"rails" ==> 'rails s'
"mail" ==> 'mailcatcher --http-ip 0.0.0.0'
"guard" ==> 'bundle exec guard --force-polling'
I tried using the following, and it didn't seem to work (startup.sh)
screen -S rails -d -m rails s
screen -S mail -d -m mailcatcher --http-ip 0.0.0.0
screen -S guard -d -m bundle exec guard --force-polling
To no avail, it doesn't seem to do what I want it to do, and I don't know if I am doing something wrong, or invoking screen incorrectly. Can someone shed some light on this situation? As for the OS, it's Ubuntu 12.04 LTS (Precise) x86, as a virtual machine (though the VM part shouldn't matter, I guess.)
Thanks ahead of time for any suggestions. I sort of just wanted a way to use a shellscript to fire up my rails project (and related services) at one time instead of having to manually start up screen sessions every time I brought up my vagrant box.
My other thought was to maybe figure out how to set these commands to run at system startup, using cron
or something?
So, for example:
screen -d -m -S rails rails s
? – MisutoWolf – 2013-11-16T19:04:38.780