Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Passenger / Bundler Issue with manual installation

Passenger / Bundler Issue with manual installation

Added by Oliver Fochler over 2 years ago

I am trying a manual installation of OP12 (on ARM but I guess that is not related to the issue at hand).

When loading the app via Passenger (on Apache 2.4) I have the problem that gems are incorrectly loaded from the "system" gem list and not the openproject app vendor/bundle folder

  • gems installed as given in Gemfile.lock via bundle install --deployment
  • manually confirmed that the gems are indeed all correctly available in ./vendor/bundle folder
  • Passenger loads and reports an error loading the app
  • Looking into the errors it shows that it is incorrect versions and / or missing gems due to the fact that apparently only gems from the system wide locations are pulled not from vendor/bundle
  • Passenger bundler/setup seems to be working somehow but something is wrong with the load paths apparently
  • looking at "activated_gems" from the log files (Passenger friendly error pages) it shows that it is all the wrong versions, i.e. not from vendor/bundle; if I remove a gem from the default, it then also disappears from the "activated_gems"

Some log outputs from the Passenger friendly error pages for the subprocess

ruby_info

(note that this would be the correct path for the gems)

RUBY_VERSION = 3.1.2
RUBY_PLATFORM = aarch64-linux
RUBY_ENGINE = ruby
RubyGems version = 3.3.25
RubyGems paths = ["/home/openproject/openproject/vendor/bundle/ruby/3.1.0"]

Environment Variables

USER = openproject
TEXTDOMAIN = Linux-PAM
SHLVL = 0
HOME = /home/openproject
WSGI_ENV = development
PYTHONUNBUFFERED = 1
PASSENGER_USE_FEEDBACK_FD = true
APACHE_RUN_DIR = /var/run/apache2
APACHE_PID_FILE = /var/run/apache2/apache2.pid
LOGNAME = openproject
JOURNAL_STREAM = 8:19903
SERVER_SOFTWARE = Apache/2.4.54 (Debian) Phusion_Passenger/6.0.15
RACK_ENV = development
RBENV_SHELL = bash
PATH = /home/openproject/openproject/vendor/bundle/ruby/3.1.0/bin:/home/openproject/.nodenv/shims:/home/openproject/.nodenv/bin:/home/openproject/.rbenv/shims:/home/openproject/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
INVOCATION_ID = fcc115b63f334260aa3d8095470cde64
APACHE_LOCK_DIR = /var/lock/apache2
LANG = C
PASSENGER_SPAWN_WORK_DIR = /tmp/passenger.spawn.XXXXA4E1WH
SHELL = /bin/bash
IN_PASSENGER = 1
NODE_PATH = /home/openproject/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/passenger-6.0.15/src/nodejs_supportlib
APACHE_RUN_GROUP = www-data
APACHE_RUN_USER = www-data
APACHE_LOG_DIR = /var/log/apache2
RAILS_ENV = development
SECRET_KEY_BASE = 1f1b879d25c6e48581ea65067c808ac965bd7598eb0bdf2ba497865e32113cbf5e5a290b59bfab62e882c03eac3ff61efb4cbc954984c422c5770ee931d0c4d0
NODENV_SHELL = bash
PWD = /home/openproject/openproject
PASSENGER_APP_ENV = development
NODE_ENV = development
BUNDLER_ORIG_BUNDLE_BIN_PATH = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_BUNDLE_GEMFILE = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_BUNDLER_VERSION = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_GEM_HOME = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_GEM_PATH = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_MANPATH = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_PATH = /home/openproject/.nodenv/shims:/home/openproject/.nodenv/bin:/home/openproject/.rbenv/shims:/home/openproject/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
BUNDLER_ORIG_RB_USER_INSTALL = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_RUBYLIB = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_RUBYOPT = BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
GEM_PATH = 
GEM_HOME = /home/openproject/openproject/vendor/bundle/ruby/3.1.0
BUNDLE_BIN_PATH = /home/openproject/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/exe/bundle
BUNDLE_GEMFILE = /home/openproject/openproject/Gemfile
BUNDLER_VERSION = 2.3.12
RUBYOPT = -r/home/openproject/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/setup
RUBYLIB = /home/openproject/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib

Replies (2)

RE: Passenger / Bundler Issue with manual installation - Added by Oliver Fochler over 2 years ago

Ok, I figured it out somehow. According to all the documentation I have read it should not be necessary (actually not even make a difference), but still - this eventually did the trick for me.

I have added 

SetEnv GEM_PATH /home/openproject/openproject/vendor/bundle/ruby/3.1.0

to /etc/apache2/sites-available/openproject.conf

(of course path and file names might vary for others)

RE: Passenger / Bundler Issue with manual installation - Added by Annata Evan over 1 year ago

Oliver Fochler wrote:

Ok, I figured it out somehow. According to all the documentation I have read it should not be necessary (actually not even make a difference), but still - this eventually did the trick for me.

I have added

SetEnv GEM_PATH /home/openproject/openproject/vendor/bundle/ruby/3.1.0    connections


to /etc/apache2/sites-available/openproject.conf

(of course path and file names might vary for others)

It also helped me, there are no more errors here

  • (1 - 2/2)
Loading...