Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

ruby on rails - cannot load such file -- rubygems.rb

OK, it drives me crazy! I try to run ruby / rails.

    MacBook-Pro-2:Library me$ rvm list
    rvm rubies
       ruby-1.9.3-p194 [ x86_64 ]
       ruby-2.1.0 [ x86_64 ]
    # => - current
    # =* - current && default
    #  * - default
    MacBook-Pro-2:Library me$ rvm use 2.1.0
    Using /usr/local/rvm/gems/ruby-2.1.0
    <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb    (LoadError)
from <internal:gem_prelude>:1:in `<compiled>'

   MacBook-Pro-2:Library me$gem list
   <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
   from <internal:gem_prelude>:1:in `<compiled>'

I provide any information to solve that problem. What is wrong? I can't find a solution so far.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I would recommend uninstalling ruby-2.1.0 and then reinstalling it as it seems like your current installation is corrupted.

rvm uninstall 2.1.0
rvm install 2.1.0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...