首页 > 解决方案 > 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

标签: ruby-on-railsrubyzeitwerk

解决方案


在目录中想要使用rvm use ruby-2.5.7命令行来强制使用这个特定版本的 ruby​​ 和 after gem install rails。几分钟前刚试过,效果很好


推荐阅读