Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Error installing rails zeitwerk requires Ruby version >= 2.4.4

I recently changed my laptop and tried installing rails with

gem install rails

and I got this error

ERROR:  Error installing rails:
    zeitwerk requires Ruby version >= 2.4.4.

I have installed ruby version 2.4.4, 2.5.7, and 2.6.5 and I'm still getting the same error. Any pointers how to resolve this will be greatly appreciated. thanks

like image 642
Ayogu Chibueze Avatar asked Dec 18 '19 17:12

Ayogu Chibueze


People also ask

How do I install a specific version of a gem?

Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.


1 Answers

In directory wanted use rvm use ruby-2.5.7 command line to force the usage of this specific version of ruby and after gem install rails. Just tryed minutes ago and works fine

like image 71
fl0_9 Avatar answered Sep 21 '22 15:09

fl0_9