# New Passenger App: App has not been initialized or does not exist

**URL:** <https://discourse.openondemand.org/t/new-passenger-app-app-has-not-been-initialized-or-does-not-exist/4197>\
**Category:** Get Help\
**Tags:** question\
**Created:** [April 15, 2025, 12:08pm UTC](https://discourse.openondemand.org/t/new-passenger-app-app-has-not-been-initialized-or-does-not-exist/4197 "2025-04-15T12:08:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bviviano](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/bviviano/32/1514_2.png) [@bviviano](https://discourse.openondemand.org/u/bviviano)\
**Post date:** [April 15, 2025, 12:08pm UTC](https://discourse.openondemand.org/t/new-passenger-app-app-has-not-been-initialized-or-does-not-exist/4197/1 "2025-04-15T12:08:21Z")

</div>

Hello,  
I wrote a passenger app under Ruby for OOD to display some `usage` information specific to our cluster/site. It’s based on the OSC sample code

> **[GitHub - OSC/ood-example-ps: Example Open OnDemand app that displays the output...](https://github.com/OSC/ood-example-ps/tree/master)**
>
> master

I set it up in a dev area of my account, made the code changes, tested everything was working and happy. I then copied the code over to `/var/www/ood/apps/sys`, updated my `nav_bar` YAML, restarted the PUN and it shows up correctly on the portal menu  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/e/e706e540812f0a4a51594bdd166bd5e97f13ddbb.png)  
When I click the `Usage` link from the menu bar, it opens a new tab as requested but gives me a `App has not been initialized or does not exist` warning:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/8/8050b581288a1afae24cbde0a8b48053237391bb.png)

If I click `Initialize App`, then it works fine. I only seem to have to do this once. Problem is, every one of my users gets the same warning the first time they go to that app, so I’m guessing there is some additional step I need to do to somewhere inside OOD to solve this so the app is pre-initialized or something.

Thanks!

---

<div class="post-metadata">

**Author:** ![bviviano](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/bviviano/32/1514_2.png) [@bviviano](https://discourse.openondemand.org/u/bviviano)\
**Post date:** [April 15, 2025, 2:20pm UTC](https://discourse.openondemand.org/t/new-passenger-app-app-has-not-been-initialized-or-does-not-exist/4197/2 "2025-04-15T14:20:08Z")

</div>

Ok, looks like I need to create a `.conf` file in `/var/lib/ondemand-nginx/config/apps/sys` that matches my passenger app, similar to the `dashboard.conf`, `myjobs.conf` and `shell.conf` files.

I copied `shell.conf` to `myapp.conf` and changed it to:

```auto
location ~ ^/pun/sys/myapp(/.*|$) {
  error_page 404 @error_404;
  alias /var/www/ood/apps/sys/myapp/public$1;
  passenger_base_uri /pun/sys/myapp;
  passenger_app_root /var/www/ood/apps/sys/myapp;
  passenger_document_root /var/www/ood/apps/sys/usage/myapp;
  passenger_enabled on;

  passenger_app_env production;

  passenger_env_var HTTP_X_SENDFILE_TYPE X-Accel-Redirect;
  passenger_env_var HTTP_X_ACCEL_MAPPING "/=/sendfile";
  passenger_set_header X-Sendfile-Type "X-Accel-Redirect";
  passenger_set_header X-Accel-Mapping "/=/sendfile";
}

```

And after running `update_ood_portal` and restarting Apache it’s working without the initializtion prompt. Do I need to retain in `myapp.conf`:

```auto
  # Give apps the ability to download files from filesystem
  passenger_env_var HTTP_X_SENDFILE_TYPE X-Accel-Redirect;
  passenger_env_var HTTP_X_ACCEL_MAPPING "/=/sendfile";
  passenger_set_header X-Sendfile-Type "X-Accel-Redirect";
  passenger_set_header X-Accel-Mapping "/=/sendfile";

```

Since `myapp` isn’t trying to do any uploading of data (just reporting status/usage data in an HTML table to the user)?

Or is there another, recommended method for creating `myapp.conf` by putting something under `/etc/odd`?

Thanks!

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [June 11, 2025, 6:21pm UTC](https://discourse.openondemand.org/t/new-passenger-app-app-has-not-been-initialized-or-does-not-exist/4197/3 "2025-06-11T18:21:17Z")

</div>

Hi sorry for the delay on this response.

I didn’t know this myself, so had to look it up. It appears for our applications we do a couple things in our RPM when installing these passenger apps (not during updates).

- first we touch the .conf file to ensure it exists
- Then we issue `/opt/ood/nginx_stage/sbin/update_nginx_stage`.

So I think the basic guidance is to do that: touch the appropriate file, then let our libraries fill it out for you.

As to the headers in the config file - I think you can do what you wish with them, though if you run the `update_nginx_stage` command, it may overwrite any updates you’ve provided.

> <https://github.com/OSC/frame-renderer/blob/a75db6e0ab4a4acb2239fef4340c80a6e4b6a2c5/packaging/frame_renderer.spec#L59-L70>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [December 8, 2025, 6:21pm UTC](https://discourse.openondemand.org/t/new-passenger-app-app-has-not-been-initialized-or-does-not-exist/4197/4 "2025-12-08T18:21:57Z")

</div>

Closed on December 8, 2025, 6:21pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
