D
D
Djan22017-11-29 13:37:27
Ruby on Rails
Djan2, 2017-11-29 13:37:27

Error when trying to install gem?

When installing any gem, it says that this or that file is supposedly corrupted:
$ sudo gem install unicorn
ERROR: Error installing unicorn:
invalid gem: package is corrupt, exception while verifying: undefined method `path2class' for # (NoMethodError) in /usr /local/share/gems/cache/kgio-2.11.0.gem
How can I fix this?
$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
$ ruby ​​-v
ruby ​​2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
$ gem -v
2.6.13
$rails -v
Rails 5.1.4

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CityCat4, 2017-11-29
@CityCat4

gem and ruby ​​do not fit? I would try to rearrange the gem first, then the whole ruby, and put the ruby ​​first, and then the gem

C
caution, 2017-12-02
@caution

what if you run it without sudo?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question