Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Trying to setup CI Joe ( and I get the following error:

/usr/bin/env: ruby1.8: No such file or directory

What I'm doing

CI Joe is run as www-data, and the command I'm running is

RAILS_ENV=test bundle exec rake -s test

When I log in as www-data (sudo su www-data) and execute the same command it works. So I'm trying to figure out what may be wrong.

Debug Output

$ which ruby1.8

This problem is similar to:

share|improve this question

ruby1.8 not found in the user's $PATH. You need set correct $PATH.

share|improve this answer
You don't happen to know how I'd set the path for the www-user? – sandstrom Jun 30 '11 at 8:30
Second thought, isn't ruby1.8 already in the path since which ruby1.8 returns the path to one ruby1.8 binary. – sandstrom Jun 30 '11 at 11:29
Some script clean PATH or all ENV. Change "#!/usr/bin/env ruby1.8" to "#!/usr/bin/ruby1.8". – twehad Jun 30 '11 at 14:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.