Issue popped up again this night on unattended-upgrade of apache packages affected by USN-3370 (https://usn.ubuntu.com/usn/usn-3370-1/). Running "bundle install" manually, again, fixed the issue (sudo seems to be necessary despite the warning). Note that none of the gems are actually updated, but some meta-data must be refreshed which brings it back to a functional state: /usr/share/redmine$ sudo bundler install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Fetching gem metadata from https://rubygems.org/........... Fetching version metadata from https://rubygems.org/... Fetching dependency metadata from https://rubygems.org/.. Resolving dependencies.... Using rake 12.0.0 Using i18n 0.8.6 Using minitest 5.10.3 Using thread_safe 0.3.6 Using builder 3.2.3 Using erubis 2.7.0 Using nokogiri 1.6.7.2 Using rack 1.6.8 Using mime-types-data 3.2016.0521 Using arel 6.0.4 Using public_suffix 2.0.5 Using bundler 1.11.2 Using coderay 1.1.1 Using colorize 0.8.1 Using concurrent-ruby 1.0.5 Using polyglot 0.3.5 Using thor 0.19.4 Using htmlentities 4.3.4 Using mysql2 0.4.8 Using net-ldap 0.16.0 Using ruby-openid 2.7.0 Using rbpdf-font 1.19.1 Using redcarpet 3.4.0 Using request_store 1.3.2 Using rmagick 2.16.0 Using tzinfo 1.2.3 Using loofah 2.0.3 Using rack-test 0.6.3 Using mime-types 3.1 Using addressable 2.5.1 Using sprockets 3.7.1 Using rack-openid 1.4.2 Using rbpdf 1.19.2 Using activesupport 4.2.9 Using rails-html-sanitizer 1.0.3 Using mail 2.6.6 Using css_parser 1.5.0 Using rails-deprecated_sanitizer 1.0.3 Using globalid 0.4.0 Using activemodel 4.2.9 Using roadie 3.2.2 Using rails-dom-testing 1.0.8 Using activejob 4.2.9 Using activerecord 4.2.9 Using protected_attributes 1.1.4 Using actionview 4.2.9 Using actionpack 4.2.9 Using actionmailer 4.2.9 Using actionpack-action_caching 1.2.0 Using actionpack-xml_parser 1.0.2 Using railties 4.2.9 Using sprockets-rails 3.2.0 Using jquery-rails 4.3.1 Using roadie-rails 1.2.1 Using rails 4.2.9 Using deface 1.0.2 Bundle complete! 25 Gemfile dependencies, 56 gems now installed. Gems in the groups development and test were not installed. Error from Passenger in Apache log: [ 2017-07-28 00:30:46.2854 5565/7f4b20418700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /u sr/share/redmine: An error occurred while starting up the preloader. Error ID: ea7fc5a3 Error details saved to: /tmp/passenger-error-U5xzoP.html Message from application:

It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this ap plication needs. To install your gems, please run:

bundle install

If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:

  1. Is this app supposed to be run as the www-data user?
  2. Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.

-------- The exception is as follows: -------

Could not find gem 'webrat' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)
  /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:354:in `block in verify_gemfile_dependencies_are_found!'
  /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:330:in `each'
  /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:330:in `verify_gemfile_dependencies_are_found!'
  /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:199:in `start'
  /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:183:in `resolve'
  /usr/lib/ruby/vendor_ruby/bundler/definition.rb:198:in `resolve'
  /usr/lib/ruby/vendor_ruby/bundler/definition.rb:137:in `specs'
  /usr/lib/ruby/vendor_ruby/bundler/definition.rb:182:in `specs_for'
  /usr/lib/ruby/vendor_ruby/bundler/definition.rb:171:in `requested_specs'
  /usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs'
  /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup'
  /usr/lib/ruby/vendor_ruby/bundler.rb:92:in `setup'
  /usr/lib/ruby/vendor_ruby/bundler/setup.rb:18:in `<top (required)>'
  /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
From /var/log/unattended-upgrades/unattended-upgrades-dpkg.log Log started: 2017-07-28 00:30:15 Reading changelogs... (Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 286395 files and directories currently installed.) Preparing to unpack .../apache2_2.4.18-2ubuntu3.4_amd64.deb ... Unpacking apache2 (2.4.18-2ubuntu3.4) over (2.4.18-2ubuntu3.3) ... Preparing to unpack .../apache2-bin_2.4.18-2ubuntu3.4_amd64.deb ... Unpacking apache2-bin (2.4.18-2ubuntu3.4) over (2.4.18-2ubuntu3.3) ... Preparing to unpack .../apache2-utils_2.4.18-2ubuntu3.4_amd64.deb ... Unpacking apache2-utils (2.4.18-2ubuntu3.4) over (2.4.18-2ubuntu3.3) ... Preparing to unpack .../apache2-data_2.4.18-2ubuntu3.4_all.deb ... Unpacking apache2-data (2.4.18-2ubuntu3.4) over (2.4.18-2ubuntu3.3) ... Processing triggers for systemd (229-4ubuntu17) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for ufw (0.35-0ubuntu2) ... Processing triggers for man-db (2.7.5-1) ... Setting up redmine (3.2.1-2) ... Determining localhost credentials from /etc/mysql/debian.cnf: succeeded. ESC[31mCould not find gem 'webrat' in any of the gem sources listed in your Gemfile or available on this machine.ESC[0m dpkg: error processing package redmine (--configure): subprocess installed post-installation script returned error exit status 7 Setting up libruby2.3:amd64 (2.3.1-2~16.04.2) ... Setting up ruby2.3 (2.3.1-2~16.04.2) ... Setting up ruby2.3-dev:amd64 (2.3.1-2~16.04.2) ... Setting up apache2-bin (2.4.18-2ubuntu3.4) ... Setting up apache2-utils (2.4.18-2ubuntu3.4) ... Setting up apache2-data (2.4.18-2ubuntu3.4) ... Setting up apache2 (2.4.18-2ubuntu3.4) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... Errors were encountered while processing: redmine Log ended: 2017-07-28 00:30:28 From /var/log/unattended-upgrades/unattended-upgrades.log 2017-07-28 00:30:08,691 INFO Initial blacklisted packages: 2017-07-28 00:30:08,691 INFO Initial whitelisted packages: 2017-07-28 00:30:08,691 INFO Starting unattended upgrades script 2017-07-28 00:30:08,692 INFO Allowed origins are: ['o=Ubuntu,a=xenial', 'o=Ubuntu,a=xenial-security', 'o=UbuntuESM,a=xenial'] 2017-07-28 00:30:15,403 INFO Packages that will be upgraded: apache2 apache2-bin apache2-data apache2-utils 2017-07-28 00:30:15,403 INFO Writing dpkg log to '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log' 2017-07-28 00:30:28,328 ERROR Installing the upgrades failed! 2017-07-28 00:30:28,328 ERROR error message: 'installArchives() failed' 2017-07-28 00:30:28,329 ERROR dpkg returned a error! See '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log' for details