[英]I tried installing RubyGems, and now I get some errors
First time asking a question, and i'm also a novice at ruby, so please be gentle. 第一次问一个问题,我也是ruby的新手,所以请保持温柔。 I'm running Lubuntu 18.04 LTS, and I recently tried to install RubyGems, as to aid my development in Ruby.
我正在运行Lubuntu 18.04 LTS,最近我尝试安装RubyGems,以帮助我在Ruby中进行开发。 Problem is, I get some strange errors when I installed it, and the same error when I try to run any script in my terminal.
问题是,安装时出现一些奇怪的错误,而尝试在终端中运行任何脚本时也出现相同的错误。 I am pretty stuck on what to do, so...
我非常执着于做事,所以...
Traceback (most recent call last):
4: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
3: from <internal:gem_prelude>:2:in `require'
2: from /usr/local/lib/site_ruby/2.5.0/rubygems.rb:1231:in `<top (required)>'
1: from /usr/local/lib/site_ruby/2.5.0/rubygems.rb:1231:in `require'
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:43:in `<top (required)>': uninitialized constant Gem::BasicSpecification (NameError)
As per the description mentioned in the post it seems like there is a problem with the current version of bundler. 根据帖子中提到的描述,当前的捆绑器版本似乎有问题。
Try running the below mentioned command: 尝试运行以下提到的命令:
gem update bundler
If the problem still does not resolves then you might need to run the below mentioned command: 如果问题仍然无法解决,那么您可能需要运行以下提到的命令:
gem update --system
Above command will be updating all the gems in the system based on the ruby version. 上面的命令将基于ruby版本更新系统中的所有宝石。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.