On Thu, Apr 17, 2025 at 02:33:19AM +0530, Pirate Praveen wrote:
> 
> 
> On 4/17/25 2:21 AM, Ananthu C V wrote:
> > Hi,
> > 
> > I do not know what the problem that's causing this is, but from a quick
> > lookup it seems a "gem pristine --all" can rebuild all native
> > extensions, if manually tracking each native gem is a concern (with
> > bundler probably something lile "bundle exec gem pristine --all"?). I am
> > not really aware of any side effects this would have though.
> 
> Thanks, for now I just removed /var/lib/gitlab/.gem and ran bundle install
> --prefer-local again, which rebuilt all native gems. But it would download
> all the gems again. I think your solution is better, though if bundler could
> do this automatically, that would be ideal, as we will have to do the
> rebuild for every gitlab version too if we just add it in postinst, which is
> not really required.

I think you need to make gems location dependent on the Ruby version,
e.g. /var/lib/gitlab/.gem-${ruby_version}. This way, the the Ruby
version changes, bundle will notice the installation directory is empty
and install everything fresh.

You will also want some logic to clean up after old versions.

Attachment: signature.asc
Description: PGP signature

Reply via email to