Question

I have problem with foreman and rvm - foreman generates start and stop init.d scripts for resque worker.
The problem is that start script tries to write pid of new worker in file, but writes it with rvm message Using /home/dev/.rvm/gems/ruby-2.0.0-p247 that appears on login.

Of course, I may edit generated script to cut off that part, but then I'll need to do that every time scripts are regenerated.

Here is how foreman tries to save pid:

su - $USERNAME -c 'cd /home/path/to/current; export PORT=5000; bundle exec rake environment resque:work QUEUE=* RAILS_ENV=production >> /var/log/app_name/job-1.log 2>&1 & echo $!' > $PIDDIR/job.1.pid

How can I disable that rvm message? Or any other solutions?

Was it helpful?

Solution

you are using cd to load ruby, the Using message is most likely coming from it, the ad hook solution would be to silence it:

cd /home/path/to/current >/dev/null

there is also a flag to silence the message, but it might not work with older .rvmrc files:

echo rvm_use_flag=0 >> ~/.rvmrc
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top