Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#68569 - [gitlab] 13.5.2-1 rails console not working

Attached to Project: Community Packages
Opened by Marcus Hoffmann (BubuIIC) - Monday, 09 November 2020, 01:22 GMT
Last edited by Toolybird (Toolybird) - Friday, 28 April 2023, 21:56 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Description: running sudo -u gitlab $(cat environment | xargs) bundle exec rails console is failing with the following error:

Traceback (most recent call last):
12: from bin/rails:4:in `<main>'
11: from bin/rails:4:in `require'
10: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `<top (required)>'
9: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `invoke'
8: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `find_by_namespace'
7: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `lookup'
6: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `each'
5: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `block in lookup'
4: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `each'
3: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `block (2 levels) in lookup'
2: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `require'
1: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `<top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties- `require': cannot load such file -- irb (LoadError)

Additional info:
* package version(s) 13.5.2-1

ruby-irb is installed on the system, but I guess this isn't really relevant either way?

This was actually working a few releases back. I've used the rails console on this installation already.

A workaround is using rails runner instead:

sudo -u gitlab $(cat environment | xargs) bundle exec rails runner "command"
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 28 April 2023, 21:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  gitlab 13.6.1-1
Comment by Anatol Pomozov (anatolik) - Thursday, 19 November 2020, 00:05 GMT
Thank you for the report.

> This was actually working a few releases back.
I think I know the reason. There was an extra 'irb' gem dependency in the Arch's package needed to fix other issue. The issue got fixed and 'irb' is removed.

Adding 'irb' back to the package's bundler fixes the 'rails console'. I merged the fix to the SVN repo. It will be available with the next gitlab build (probably in the next couple of weeks).