[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fq4uedx8XZrgsSZgDugc119-zKCLwkIBWabpfOnivQZI":3},{"code":4,"message":5,"data":6},200,"成功",{"id":7,"createdAt":8,"title":9,"content":10,"summary":11,"image":12,"uid":13,"user":14,"categoryId":21,"category":22,"subCategoryId":24,"subCategory":25,"comments":27,"status":17,"reason":32,"notice":32,"visitCount":37,"commentCount":17,"keywords":38},87,"2024-02-23T08:00:20.265Z","ruby - Your Ruby version is 2.6.3, but your Gemfile specified >= 2.6.10，或者 Error running '__rvm_make install'","当运行iOS工程时，遇到gemfile文件，对ruby的版本是有要求的。\n\n或者你因为其他原因导致需要安装或者升级ruby版本。\n\n有时候会遇到以下报错：\n\n报错：\n1. ruby版本过低\n> Your Ruby version is 2.6.3, but your Gemfile specified >= 2.6.10\n\n![ruby version fail](https://image.xinwei.ltd/%E6%88%AA%E5%B1%8F2024-02-23%20151708673908208.png)\n\n2. ruby安装失败\n> Error running '__rvm_make install',\nplease read /Users/hanweixing/.rvm/log/1708659865_ruby-2.7.5/install.log\nThere has been an error while running make install. Halting the installation.\n\n![ruby install fail](https://image.xinwei.ltd/%E6%88%AA%E5%B1%8F2024-02-23%20151708673957020.png)\n\n当遇到这样的错误时，你可以按照以下步骤进行解决：\n1. 查看本地ruby版本情况：\n```\nruby -v\n```\n\n2. 清理本地rvm下载安装的缓存\n```\nrvm cleanup all\n```\n\n3. 获取rvm的稳定版本\n```\nrvm get stable --verbose\n```\n\n4. 如果你需要重新安装rvm\n```\ncurl -sSL https://get.rvm.io | bash -s stable --ruby\n```\n\n5. 尝试安装ruby\n```\nrvm install ruby --verbose\n```\n\n6. 如果安装失败，可以使用以下命令获取可用的ruby版本\n```\nrvm list known\n```\n\n7. 指定ruby版本安装\n```\nrvm install ruby-3.2.2 --verbose\n```\n或者\n```\nrvm install 3.2.2 -C --with-openssl-dir=/opt/homebrew/opt/openssl@3.1 --verbose\n```\n这2个命令基本可以让安装ruby成功\n![ruby install success](https://image.xinwei.ltd/%E6%88%AA%E5%B1%8F2024-02-23%20151708674829430.png)\n\n8. 通过`ruby -v`命令查看ruby对应版本是否是刚安装的那个版本。\n\n9. 查看本地安装的ruby版本\n```\nrvm list\n```\n![](https://image.xinwei.ltd/%E6%88%AA%E5%B1%8F2024-02-23%20151708675069734.png)\n\n10. 如果不是，可以使用rvm的use命令来切换\n![ruby切换](https://image.xinwei.ltd/%E6%88%AA%E5%B1%8F2024-02-23%20151708674940438.png)\n\n```\nrvm use 3.2.2\n```","这篇文章针对ruby的安装或者报错给出对应的解决方案，当运行iOS工程时，遇到gemfile文件，对ruby的版本是有要求的。","https://image.xinwei.ltd/%E6%88%AA%E5%B1%8F2024-02-23%20151708673908208.png",499668042977349,{"phone":15,"userId":13,"nickName":16,"vipType":17,"avatar":18,"sign":19,"createdAt":20},"13121171998","全栈老韩",1,"https://image.xinwei.ltd/images/IMG_5430.JPG","全栈工程师，擅长iOS App开发、前端（vue、react、nuxt、小程序&Taro）开发、Flutter、React Native、后端（midwayjs、golang、express、koa）开发、docker容器、seo优化等。","2024-01-01T16:14:30.305Z",2,{"id":21,"name":23},"IT技术",18,{"id":24,"name":26,"parentId":21},"Linux",[28],{"id":21,"createAt":29,"content":30,"articleId":7,"userId":13,"user":31,"replyToUid":33,"replyToUser":34,"status":17,"statusDes":32,"replies":36},"2024-02-23T08:06:10.771Z","补充一下，在查看本地的ruby版本后，如果要设置默认的以及当前应该使用的ruby版本，可以使用命令：rvm --default use 3.2.2 来进行设置。之后默认的ruby版本就是3.2.2。",{"phone":15,"userId":13,"nickName":16,"vipType":17,"avatar":18,"sign":32,"createdAt":20},"",0,{"phone":32,"userId":33,"nickName":32,"vipType":33,"avatar":32,"sign":32,"createdAt":35},"0001-01-01T00:00:00Z",null,6528,"ruby,ruby install,ruby error,ruby开发,ruby issue,ruby编码"]