Lars Bo Wassini Lars Bo Wassini - 2 months ago 35
Ruby Question

Gitlab installation - Ruby rail error

I'm using Ubuntu 16.10 and was updating my Gitlab from 6.8 to 7 and everything went wrong. Now I have removed it and is trying to install a new version but ran into a problem with Ruby.

When I try install it

$ sudo apt install gitlab

I get an error after some time:

Could not find gem 'rails (>=, ~> 4.2.7)' in any of the gem sources
listed in your Gemfile.

I have tried to run

$ sudo gem install rails

but this gives me another error:

ERROR: Error installing rails:
activesupport requires Ruby version >= 2.2.2.

I don't know what to do now...

I have started all over... Removed gitlab* and postgresql. Rebooted and installed gitlab again. Now I got another error:

Could not find gem 'pg (~> 0.18.2)' in any of the gem sources listed in your Gemfile.

Tried to install pg manually:

$ sudo gem install pg
Successfully installed pg-0.20.0

But still sudo apt upgrade gives the same error: "Could not find gem 'pg'

Answer Source

I gave up! I reinstalled the Linux server with the Linux LTS version and used the Omnibus package installation..

Problem solved!