check-procs.rb /usr/bin/env: ruby: No such file or directory

I followed the instructions exactly to set up sensu on a RHEL 6 machine and installed from the yum repo. I believe this should have given me the omnibus package which takes care of all the dependencies.

I then tried setting up the check-procs.rb check per the example, but get the following in sensu-dashboard

/usr/bin/env: ruby: No such file or directory

Is it looking for dependency it can’t find?

In replying to my own question, it looks like setting EMBEDDED_RUBY=true in /etc/default/sensu fixed the problem.

Wouldn’t it make more sense for this to be set to true by default since you would want it to use the version of ruby in the omnibus package?

This question comes up ad nauseam. And it’s for that reason only that I would support making it the default.

Historically, the reason it is not the default is because installing random gems into /opt/sensu puts you at risk of breaking Sensu itself.

···

On Wed, Jun 18, 2014 at 12:50 PM, John Arends jarends@gmail.com wrote:

In replying to my own question, it looks like setting EMBEDDED_RUBY=true in /etc/default/sensu fixed the problem.

Wouldn’t it make more sense for this to be set to true by default since you would want it to use the version of ruby in the omnibus package?

Maybe a compromise would be to stick this in the docs? I was initially confused since I followed the instructions but it didn’t work. I had to jump on irc to find out about this since my google-fu didn’t actually locate that.

It’s an easy enough setting to change.

···

On Wed, Jun 18, 2014 at 2:57 PM, Joe Miller joeym@joeym.net wrote:

This question comes up ad nauseam. And it’s for that reason only that I would support making it the default.

Historically, the reason it is not the default is because installing random gems into /opt/sensu puts you at risk of breaking Sensu itself.

On Wed, Jun 18, 2014 at 12:50 PM, John Arends jarends@gmail.com wrote:

In replying to my own question, it looks like setting EMBEDDED_RUBY=true in /etc/default/sensu fixed the problem.

Wouldn’t it make more sense for this to be set to true by default since you would want it to use the version of ruby in the omnibus package?

If you dont want to expose the embedded ruby u can use #!/opt/sensu/embedded/bin/ruby

in shebang.

···

On Thu, Jun 19, 2014 at 1:37 AM, John Arends jarends@gmail.com wrote:

Maybe a compromise would be to stick this in the docs? I was initially confused since I followed the instructions but it didn’t work. I had to jump on irc to find out about this since my google-fu didn’t actually locate that.

It’s an easy enough setting to change.

On Wed, Jun 18, 2014 at 2:57 PM, Joe Miller joeym@joeym.net wrote:

This question comes up ad nauseam. And it’s for that reason only that I would support making it the default.

Historically, the reason it is not the default is because installing random gems into /opt/sensu puts you at risk of breaking Sensu itself.

On Wed, Jun 18, 2014 at 12:50 PM, John Arends jarends@gmail.com wrote:

In replying to my own question, it looks like setting EMBEDDED_RUBY=true in /etc/default/sensu fixed the problem.

Wouldn’t it make more sense for this to be set to true by default since you would want it to use the version of ruby in the omnibus package?