[英]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.我已经安装了 ruby 版本 2.4.4、2.5.7 和 2.6.5,但仍然遇到相同的错误。 Any pointers how to resolve this will be greatly appreciated.
任何有关如何解决此问题的指示将不胜感激。 thanks
谢谢
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
.在想要使用
rvm use ruby-2.5.7
目录中, rvm use ruby-2.5.7
命令行强制使用此特定版本的 ruby 并在gem install rails
。 Just tryed minutes ago and works fine几分钟前刚试过,效果很好
如果您不关心拥有较新版本的 Ruby(和rails
),则此特定问题的另一种解决方法,您只需安装最新兼容版本的rails
与您的 ruby 版本,类似的示例与需要ruby v2.5.0
sprockets
ruby v2.5.0
通过安装旧版本的rails v4.1.16
查看依赖关系图解决:
sudo gem install rails -v 4.1.16
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.