FS#49252 - [gitlab-shell] gitlab shell setup task doesn't work

Attached to Project: Community Packages
Opened by Thom Wiggers (twiggers) - Saturday, 07 May 2016, 15:14 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 27 May 2016, 14:57 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
I'm trying to run this command:

sudo -u gitlab bundle-2.1 exec rake gitlab:shell:setup RAILS_ENV=production

Which should rebuild authorized_keys. However, I get the following output:

This will rebuild an authorized_keys file.
You will lose any data stored in authorized_keys file.
Do you want to continue (yes/no)? yes

............Ignoring RedCloth-4.2.9 because its extensions are not built. Try: gem pristine RedCloth --version 4.2.9
Ignoring allocations-1.0.4 because its extensions are not built. Try: gem pristine allocations --version 1.0.4
Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.10
Ignoring charlock_holmes-0.7.3 because its extensions are not built. Try: gem pristine charlock_holmes --version 0.7.3
Ignoring escape_utils-1.1.0 because its extensions are not built. Try: gem pristine escape_utils --version 1.1.0
Ignoring eventmachine-1.0.8 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.8
Ignoring http_parser.rb-0.5.3 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.5.3
Ignoring kgio-2.10.0 because its extensions are not built. Try: gem pristine kgio --version 2.10.0
Ignoring mysql2-0.3.20 because its extensions are not built. Try: gem pristine mysql2 --version 0.3.20
Ignoring nokogiri-1.6.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.2
Ignoring pg-0.18.4 because its extensions are not built. Try: gem pristine pg --version 0.18.4
Ignoring posix-spawn-0.3.11 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.11
Ignoring raindrops-0.15.0 because its extensions are not built. Try: gem pristine raindrops --version 0.15.0
Ignoring redcarpet-3.3.3 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.3
Ignoring rinku-1.7.3 because its extensions are not built. Try: gem pristine rinku --version 1.7.3
Ignoring rugged-0.24.0 because its extensions are not built. Try: gem pristine rugged --version 0.24.0
Ignoring unf_ext-0.0.7.2 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.2
Ignoring unicorn-4.9.0 because its extensions are not built. Try: gem pristine unicorn --version 4.9.0
Ignoring version_sorter-2.0.0 because its extensions are not built. Try: gem pristine version_sorter --version 2.0.0
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.

Failed to add keys...


Additional info:
* This may be related to  FS#49186  because the output looks pretty much the same.
* gitlab-shell 2.7.2-10
* gitlab 8.7.3-1

Steps to reproduce:
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Friday, 27 May 2016, 14:57 GMT
Reason for closing:  Fixed
Comment by Nick (nanny) - Wednesday, 11 May 2016, 17:09 GMT
I have the same issue, even after wiping gitlab completely. I've tried deleting all the gems and reinstalling as well.
Comment by Janne Heß (das_j) - Tuesday, 17 May 2016, 09:08 GMT
I have the same problem but with activesupport:

[...]
Ignoring unf_ext-0.0.7.2 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.2
Ignoring unicorn-4.9.0 because its extensions are not built. Try: gem pristine unicorn --version 4.9.0
Ignoring version_sorter-2.0.0 because its extensions are not built. Try: gem pristine version_sorter --version 2.0.0
Could not find activesupport-4.2.6 in any of the sources
Run `bundle install` to install missing gems.
Comment by Janne Heß (das_j) - Tuesday, 17 May 2016, 09:13 GMT
I'm not sure, but I think the ruby-2.1 packge might be broken:

$ gem-2.1 --version
2.2.5

Or is this the expected behaviour?
Comment by Janne Heß (das_j) - Tuesday, 17 May 2016, 09:24 GMT
Oh the gem version seems to be different from the ruby version, I guess that's okay.
Comment by Janne Heß (das_j) - Tuesday, 17 May 2016, 10:11 GMT
It looks like I fixed it.

In /usr/share/webapps/gitlab-shell/bin/check replace `ruby` in the first line with `ruby-2.1`.
I guess this goes for all ruby scripts.
Comment by Janne Heß (das_j) - Tuesday, 17 May 2016, 10:14 GMT
Inside the bin directory, just run:

# sed -i 's:#!/usr/bin/env ruby:\0-2.1:g' *

Loading...