Monit and Thin and Unfound Gems
Posted
by
TenJack
on Server Fault
See other posts from Server Fault
or by TenJack
Published on 2012-09-01T00:03:57Z
Indexed on
2012/09/01
3:40 UTC
Read the original article
Hit count: 546
I've been using Monit to monitor my Thin server and everything was working until I upgraded my Rails version from 2.3.4 to 2.3.14. Now when I try and start Thin using monit it gives me an unfound gem error:
Missing the Rails 2.3.14 gem. Please `gem install -v=2.3.14 rails`
I thought this may be a GEM PATH issue and also tried setting the GEM_HOME and PATH variables in the start command:
check process thin3001
with pidfile /home/blahblah/apps/Vocab/shared/pids/thin.3001.pid
start program = "/usr/bin/env PATH=/usr/lib/ruby/gems/1.8/gems GEM_HOME=/usr/lib/ruby/gems/1.8/gems /usr/bin/ruby /usr/bin/thin -C /etc/thin/vocab.yml start -o 3001"
stop program = "/usr/bin/ruby /usr/bin/thin -C /etc/thin/vocab.yml stop -o 3001"
if totalmem > 150.0 MB for 5 cycles then restart
group thin
It's strange because if I run the start command in the console it works fine, it's only within monit that I get the missing Gems error.
© Server Fault or respective owner