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

Details

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-6.0.3.3/lib/rails/commands.rb:18:in `<top (required)>'
9: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command.rb:44:in `invoke'
8: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command.rb:70:in `find_by_namespace'
7: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command/behavior.rb:39:in `lookup'
6: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command/behavior.rb:39:in `each'
5: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command/behavior.rb:40:in `block in lookup'
4: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command/behavior.rb:40:in `each'
3: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command/behavior.rb:44:in `block (2 levels) in lookup'
2: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command/behavior.rb:44:in `require'
1: from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/commands/console/console_command.rb:3:in `<top (required)>'
/usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/commands/console/console_command.rb:3:in `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).

Loading...