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

I have Googled high and low and cant figure this out. Currently my checks are giving the a “/usr/bin/env: ruby: No such file or directory” error. http://cl.ly/ReNn Any suggestions on how to fix this?

Can you give me a little more information? Is this sensu installed via omnibus or a gem? If its a gem do you have ruby installed?

does which env and which ruby both return proper?

···

On Fri, Sep 27, 2013 at 2:14 PM, David Neudorfer david.neudorfer@lbox.com wrote:

I have Googled high and low and cant figure this out. Currently my checks are giving the a “/usr/bin/env: ruby: No such file or directory” error. http://cl.ly/ReNn Any suggestions on how to fix this?

I installed Sensu via apt. Logged in via root ‘which env’ returns: /usr/bin/env and ‘which ruby’ returns: /opt/sensu/embedded/bin/ruby I’m setting my environment variable in /etc/profile with PATH=“$PATH:/opt/sensu/embedded/bin” at the bottom. Any other info I can provide?

···

On Friday, September 27, 2013 3:21:57 PM UTC-7, Joshua Pasqualetto wrote:

Can you give me a little more information? Is this sensu installed via omnibus or a gem? If its a gem do you have ruby installed?

does which env and which ruby both return proper?

On Fri, Sep 27, 2013 at 2:14 PM, David Neudorfer david.n...@lbox.com wrote:

I have Googled high and low and cant figure this out. Currently my checks are giving the a “/usr/bin/env: ruby: No such file or directory” error. http://cl.ly/ReNn Any suggestions on how to fix this?

Hey David,

Unfortunately, I am not sure exactly whats going on. Sean?

···

On Fri, Sep 27, 2013 at 3:49 PM, David Neudorfer david.neudorfer@lbox.com wrote:

I installed Sensu via apt. Logged in via root ‘which env’ returns: /usr/bin/env and ‘which ruby’ returns: /opt/sensu/embedded/bin/ruby I’m setting my environment variable in /etc/profile with PATH=“$PATH:/opt/sensu/embedded/bin” at the bottom. Any other info I can provide?

On Friday, September 27, 2013 3:21:57 PM UTC-7, Joshua Pasqualetto wrote:

Can you give me a little more information? Is this sensu installed via omnibus or a gem? If its a gem do you have ruby installed?

does which env and which ruby both return proper?

On Fri, Sep 27, 2013 at 2:14 PM, David Neudorfer david.n...@lbox.com wrote:

I have Googled high and low and cant figure this out. Currently my checks are giving the a “/usr/bin/env: ruby: No such file or directory” error. http://cl.ly/ReNn Any suggestions on how to fix this?

Hey,

I believe that /etc/profile is only loaded by your shell, and not Sensu itself, so it does not know to look in the omnibus install. By default, Sensu checks are run with the system ruby (which it appears you do not have). If you set EMBEDDED_RUBY=true in /etc/default/sensu, Sensu should use the embedded ruby for the checks. HTH,

-Nick

···

On Tuesday, October 1, 2013 11:32:46 AM UTC-7, Joshua Pasqualetto wrote:

Hey David,

Unfortunately, I am not sure exactly whats going on. Sean?

On Fri, Sep 27, 2013 at 3:49 PM, David Neudorfer david.n...@lbox.com wrote:

On Friday, September 27, 2013 3:21:57 PM UTC-7, Joshua Pasqualetto wrote:

Can you give me a little more information? Is this sensu installed via omnibus or a gem? If its a gem do you have ruby installed?

does which env and which ruby both return proper?

On Fri, Sep 27, 2013 at 2:14 PM, David Neudorfer david.n...@lbox.com wrote:

I have Googled high and low and cant figure this out. Currently my checks are giving the a “/usr/bin/env: ruby: No such file or directory” error. http://cl.ly/ReNn Any suggestions on how to fix this?

I installed Sensu via apt. Logged in via root ‘which env’ returns: /usr/bin/env and ‘which ruby’ returns: /opt/sensu/embedded/bin/ruby I’m setting my environment variable in /etc/profile with PATH=“$PATH:/opt/sensu/embedded/bin” at the bottom. Any other info I can provide?

Thank you. This is what fixed it.

···

On Wed, Oct 2, 2013 at 11:16 AM, Nick Stielau nick.stielau@gmail.com wrote:

Hey,

I believe that /etc/profile is only loaded by your shell, and not Sensu itself, so it does not know to look in the omnibus install. By default, Sensu checks are run with the system ruby (which it appears you do not have). If you set EMBEDDED_RUBY=true in /etc/default/sensu, Sensu should use the embedded ruby for the checks. HTH,

-Nick

On Tuesday, October 1, 2013 11:32:46 AM UTC-7, Joshua Pasqualetto wrote:

Hey David,

Unfortunately, I am not sure exactly whats going on. Sean?

On Fri, Sep 27, 2013 at 3:49 PM, David Neudorfer
david.n...@lbox.com wrote:

I installed Sensu via apt. Logged in via root ‘which env’ returns: /usr/bin/env and ‘which ruby’ returns: /opt/sensu/embedded/bin/ruby I’m setting my environment variable in /etc/profile with PATH=“$PATH:/opt/sensu/embedded/bin” at the bottom. Any other info I can provide?

On Friday, September 27, 2013 3:21:57 PM UTC-7, Joshua Pasqualetto wrote:

Can you give me a little more information? Is this sensu installed via omnibus or a gem? If its a gem do you have ruby installed?

does which env and which ruby both return proper?

On Fri, Sep 27, 2013 at 2:14 PM, David Neudorfer
david.n...@lbox.com wrote:

I have Googled high and low and cant figure this out. Currently my checks are giving the a “/usr/bin/env: ruby: No such file or directory” error. http://cl.ly/ReNn Any suggestions on how to fix this?