Passenger App -- Possibly Missing Gem Files

Greetings,
We’re moving OOD from an RHEL 8 host to an RHEL 9 one. So far, all the interactive apps seem to be working. We have our own passenger app to display the cluster status that’s being stubborn. I checked my error.log in the nginx logs, and I see this as soon as I click on the cluster status app:

The Phusion Passenger(R) application server tried to start the web application through a Passenger-internal helper tool called the \"wrapper\". But Passenger was unable to execute that helper tool because it encountered an internal error.

The stdout/stderr output of the subprocess so far is:

/usr/share/gems/gems/bundler-2.2.33/lib/bundler/definition.rb:480:in `materialize': Could not find rack-2.2.7 in any of the sources (Bundler::GemNotFound)\n\tfrom /usr/share/gems/gems/bundler-2.2.33/lib/bundler/definition.rb:185:in `specs'\n\tfrom /usr/share/gems/gems/bundler-2.2.33/lib/bundler/definition.rb:233:in `specs_for'\n\tfrom /usr/share/gems/gems/bundler-2.2.33/lib/bundler/runtime.rb:18:in `setup'\n\tfrom /usr/share/gems/gems/bundler-2.2.33/lib/bundler.rb:150:in `setup'\n\tfrom /usr/share/gems/gems/bundler-2.2.33/lib/bundler/setup.rb:20:in `block in <top (required)>'\n\tfrom /usr/share/gems/gems/bundler-2.2.33/lib/bundler/ui/shell.rb:136:in `with_level'\n\tfrom /usr/share/gems/gems/bundler-2.2.33/lib/bundler/ui/shell.rb:88:in `silence'\n\tfrom /usr/share/gems/gems/bundler-2.2.33/lib/bundler/setup.rb:20:in `<top (required)>'\n\tfrom <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:160:in `require'\n\tfrom <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'\n\tfrom <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:149:in `require'\n<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- bundler/setup (LoadError)\n\tfrom <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'\n

", "solution_description_html" : "

Unfortunately, Passenger does not know how to solve this problem. Please try troubleshooting the problem by studying the **error message** and the **diagnostics** reports. You can also consult [the Passenger support resources]

image

Would adding or upgrading the rack package to version 2.2.7 in the ood directory fix the issue, and if so, how do we bundle that package into the ood directory without breaking it?

You should vendor/bundle your own gems and not rely on ours. Yes you’ll have duplication but it’s the only way to completely avoid this issue.

If you deploy through a package like RPMs, install gems in vendor/bundle during packaing.

If you manually deploy the app, just step to the app’s directory and

bundle config path --local vendor/bundle
bundle install

In any case, I just want to stress - don’t rely on our gem set - install the gems you need yourself and you’ll always have them.

That was helpful. Thank you. The README.md file in there was misleading, or maybe I misunderstood it:

For OnDemand 1.8 or later, the gemset provided with OnDemand is sufficient to run this app.

For OnDemand 1.7 or earlier, first run these commands after loading the ondemand scl:

    bin/bundle install --path vendor/bundle

What worked for me was the following:
I removed the .bundle, vendor, and Gemfile.lock folders and file.
Ran source scl_source enable ondemand (no idea if that was necessary)
Then sudo bundle install --path vendor/bundle (from within the cluster status folder)

You can close this ticket.

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