简体   繁体   中英

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. I'm running Lubuntu 18.04 LTS, and I recently tried to install RubyGems, as to aid my development in 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM