How do I run Munin plugins written in Ruby, using RVM?
Posted
by
hlg
on Server Fault
See other posts from Server Fault
or by hlg
Published on 2011-01-15T10:25:11Z
Indexed on
2011/01/15
10:55 UTC
Read the original article
Hit count: 244
Hi!
I try to run some Munin plugins written in Ruby. I would like to use RVM, so Munin needs to know where to find Ruby. I tried to change the line calling munin-cron in the cron file as follows:
*/5 * * * * munin bash -c 'source /usr/local/lib/rvm && rvm 1.9.2@munin && /usr/bin/munin-cron'
This leads to error messages in munin-node.log, saying
/usr/bin/env: ruby: No such file or directory
When I change the plugins' shebangs to the actual path of the Ruby executable it works, but the RVM environment should be set so that '/usr/bin/env ruby' works. It does when I execute the plugins as root.
Any ideas?
© Server Fault or respective owner