Bug #19070
closed"Could not locate Gemfile (Bundler::GemfileNotFound)" starting standalone Foreman service
Description
It seems that a package-based installation (following 3.3.1 in the installation docs) do not currently work in either 1.13 or 1.14. As far as I can tell, using foreman-installer still works, but in our environment we cannot use the installer-based approach.
I am able to reproduce this on a new CentOS 7 AWS AMI or local CentOS install from media by doing the following on a fresh install:
sudo yum install -y http://yum.theforeman.org/releases/1.14/el7/x86_64/foreman-release.rpm
sudo yum install -y foreman-release-scl epel-release
sudo yum install -y foreman foreman-proxy foreman-debug foreman-cli foreman-sqlite
sudo -u foreman /usr/share/foreman/extras/dbmigrate
sudo systemctl start foreman
Foreman logs the following to syslog:
Starting foreman: /opt/rh/rh-ruby22/root/usr/share/gems/gems/bundler-1.7.8/lib/bundler/shared_helpers.rb:26:in `default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound)
from /opt/rh/rh-ruby22/root/usr/share/gems/gems/bundler-1.7.8/lib/bundler/shared_helpers.rb:31:in `default_lockfile'
from /opt/rh/rh-ruby22/root/usr/share/gems/gems/bundler-1.7.8/lib/bundler.rb:253:in `default_lockfile'
from /usr/share/foreman/bin/spring:10:in `<top (required)>'
from /usr/share/foreman/bin/rails:3:in `load'
from /usr/share/foreman/bin/rails:3:in `<main>'
Attempting to start foreman manually by invoking the rails server (using tfm-ruby) throws the same error.
As far as I can tell, I can't reproduce this behavior for installations using foreman-installer. This seems to only happen to package-based installs, and only on versions 1.13 and 1.14.