错误:安装goliath时出错:goliath需要Ruby版本> = 1.9.2(ERROR: Error installing goliath: goliath requires Ruby v

编程入门 行业动态 更新时间:2024-10-27 12:24:56
错误:安装goliath时出错:goliath需要Ruby版本> = 1.9.2(ERROR: Error installing goliath: goliath requires Ruby version >= 1.9.2) sudo gem install goliath

给出错误

ERROR: Error installing goliath: goliath requires Ruby version >= 1

但是当试过ruby -v就会显示出来

ruby 1.9.3p374 (2013-01-15 revision 38858) [i686-linux]

为什么会这样?

sudo gem install goliath

giving error

ERROR: Error installing goliath: goliath requires Ruby version >= 1

but when tried ruby -v it shows

ruby 1.9.3p374 (2013-01-15 revision 38858) [i686-linux]

Why is it so??

最满意答案

在使用rvm安装Ruby时,通过sudo安装gem时,这是一个常见错误。 如果是这种情况,那么sudo会触发原始系统Ruby,它往往是1.8.7,因此会阻塞。

所以,如果你使用rvm停止使用sudo gem install xxx只需使用gem install goliath ,你应该没问题。

This is a common error when installing gems via sudo while Ruby is installed with rvm. If this is the case, then sudo triggers the original system Ruby which tends to be 1.8.7 and therefore blocks.

So, if you're using rvm stop using sudo gem install xxx just use gem install goliath and you should be fine.

更多推荐

本文发布于:2023-08-07 19:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465647.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   版本   goliath   Ruby   version

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!