Failure pushing build pack "`initialize': can't convert nil into String (TypeError)"
search cancel

Failure pushing build pack "`initialize': can't convert nil into String (TypeError)"

book

Article ID: 294826

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

Symptoms:

Error message

[STG]     OUT -----> Installing dependencies using 1.6.3
[STG]     OUT        Purging Cache. Changing stack from cedar to
[STG]     OUT        Fixing nokogiri install. Clearing bundler cache.
[STG]     OUT        See https://github.com/sparklemotion/nokogiri/issues/923.
[STG]     ERR /usr/lib/ruby/1.9.1/pathname.rb:308:in `initialize': can't convert nil into String (TypeError)

 

Environment


Resolution

To avoid the error displayed above, set an environment variable called `STACK` to `` (i.e. an empty string).  There are two ways that this can be done.

  1. By using the `cf set-env` command.
    cf set-env <app-name> STACK ""
  2. By modifying the `env` block of your manifest.yml file.
    ---
    applications:
    - name: <app-name>
      memory: <memory-limit>
      path: .
      env:
        STACK: ""

This works to resolve the issue as the presence of the `STACK` environment variable causes the build pack to avoid the code path which triggers this error.