Missing bigdecimal and psych dependencies in Gemfile and Gemfile.lock
Summary
I have a source installation (from git). When trying to upgrade to v9.3.0-rc3 or higher (I think this started with rc3, and does not happen with rc2. I’m not 100% sure), various steps of the install fail because of missing dependencies:
% bundle exec rake db:migrate RAILS_ENV=production
rake aborted!
LoadError: cannot load such file -- bigdecimal/util
or
/usr/share/ruby/yaml.rb:7:in `<main>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
rake aborted!
LoadError: cannot load such file -- psych/exception
Steps to reproduce
I think it’s hard to reproduce, because on some installs psych and bigdecimal are embeded directly with ruby (according to a few search, and the error message above), so I don’t know exactly how to trigger these, this is probably very platform-dependent.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: gitlab Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.3.3 2.4.8 Bundler Version:1.10.4 Rake Version: 10.5.0 Redis Version: 3.2.7 Git Version: 2.9.4 Sidekiq Version:5.0.0 Go Version: go1.7.6 linux/amd64
GitLab information Version: 9.3.0-rc6 Revision: 391b857 Directory: /home/gitlab/gitlab DB Adapter: postgresql URL: https://lab.louiz.org HTTP Clone URL: https://lab.louiz.org/some-group/some-project.git SSH Clone URL: gitlab@lab.louiz.org:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: github
GitLab Shell Version: 5.0.5 Repository storage paths:
- default: /home/gitlab/repositories Hooks: /home/gitlab/gitlab-shell/hooks Git: /usr/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 5.0.5 ? ... OK (5.0.5) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by gitlab:root, or gitlab:gitlab? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 2/1 ... ok 2/3 ... ok 2/7 ... ok 2/9 ... ok 2/14 ... ok 23/18 ... ok 23/19 ... ok 26/21 ... ok 2/22 ... ok 36/23 ... ok 2/24 ... ok Running /home/gitlab/gitlab-shell/bin/check 2.3.3 Check GitLab API access: OK Access to /home/gitlab/.ssh/authorized_keys: 2.3.3 OK Send ping to redis server: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... no Try fixing it: Install the init script For more information see: doc/install/installation.md in section "Install Init Script" Please fix the error above and rerun the checks. Init script up-to-date? ... can't check because of previous errors Projects have namespace: ... 2/1 ... yes 2/3 ... yes 2/7 ... yes 2/9 ... yes 2/14 ... yes 23/18 ... yes 23/19 ... yes 26/21 ... yes 2/22 ... yes 36/23 ... yes 2/24 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.3) Git version >= 2.7.3 ? ... yes (2.9.4) Active users: ... 35
Checking GitLab ... Finished
Possible fixes
Here’s what I applied to my repository to fix this issue:
---
Gemfile | 7 +++++--
Gemfile.lock | 4 ++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Gemfile b/Gemfile
index c78c1f2..a61d08a 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,6 +4,9 @@ gem 'rails', '4.2.8'
gem 'rails-deprecated_sanitizer', '~> 1.0.3'
gem 'bootsnap', '~> 1.0.0'
+gem 'psych'
+gem 'bigdecimal'
+
# Responders respond_to and respond_with
gem 'responders', '~> 2.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 676cd97..cbe9cda 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -80,6 +80,7 @@ GEM
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
+ bigdecimal (1.3.2)
bindata (2.3.5)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
@@ -608,6 +609,7 @@ GEM
pry (~> 0.10)
pry-rails (0.3.5)
pry (>= 0.9.10)
+ psych (2.2.4)
pyu-ruby-sasl (0.0.3.3)
rack (1.6.5)
rack-accept (0.4.5)
@@ -923,6 +925,7 @@ DEPENDENCIES
base32 (~> 0.3.0)
benchmark-ips (~> 2.3.0)
better_errors (~> 2.1.0)
+ bigdecimal
binding_of_caller (~> 0.7.2)
bootsnap (~> 1.0.0)
bootstrap-sass (~> 3.3.0)
@@ -1047,6 +1050,7 @@ DEPENDENCIES
prometheus-client-mmap (~> 0.7.0.beta5)
pry-byebug (~> 3.4.1)
pry-rails (~> 0.3.4)
+ psych
rack-attack (~> 4.4.1)
rack-cors (~> 0.4.0)
rack-oauth2 (~> 1.2.1)