Re: Application failed to stage with Error: 'No such file or directory [STG/0] ERR /usr/bin/env: ruby'


Amit Kumar Gupta
 

Since the code in those executables is meant to be ruby, you'll need the
appropriate shebang line, like this:

https://github.com/cloudfoundry/ruby-buildpack/blob/45b22922827c02e6b7af0650cf1b02600455d3cd/bin/compile#L1

Does yours look different?

It doesn't matter that it's a java buildpack, even the standard java
buildpack uses ruby for those scripts:

https://github.com/cloudfoundry/java-buildpack/blob/master/bin/compile#L1

The compilation takes place in CF (inside a container running in one of the
CF nodes). It is looking for ruby in the compilation container. The root
filesystem for the compilation containers probably defaults to cflinuxfs2
in your CF installation:

https://github.com/cloudfoundry/stacks/tree/master/cflinuxfs2

This root FS has ruby in it (that's how the standard buildpacks work), you
can even see that ruby is installed in the Dockerfile script used to build
this root FS image.

On Tue, Feb 9, 2016 at 11:11 PM, nitin padalia <padalia.nitin(a)gmail.com>
wrote:

Its a java buildpack, but detect, compile and release are written in ruby.

One question I've is: does this compilation takes place in CF or its done
on the client machine where CF CLI is residing?

Where its looking for ruby?
Is there any file in buildpack which update PATH variable for ruby search?

-Nitin

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.