问题描述
我试图在Ubuntu 13.10上使用RVM创建Ruby和Rubygems的全新安装。我之前已经安装了一个安装程序,然后以某种方式被损坏。我决定重新安装所有东西,所以我跑了
事实证明,我的问题是,我已经在 / usr / bin中手动创建了 gem 的符号链接。删除符号链接后,我使用以下命令重新安装了所有内容:
rvm implode
\curl -L https ://get.rvm.io | bash -s stable --ruby
source /home/<username>/.rvm/scripts/rvm
之后
gem install rails
就像一个魅力一样。
I was trying to create a fresh installation of Ruby and Rubygems using RVM on Ubuntu 13.10. I had already had an installation before which somehow got corrupted. I decided to reinstall everything, so I ran
rvm implodewhich seemed to delete all traces of ruby and rubygems.
However, after reinstalling it using
\curl -L https://get.rvm.io | bash -s stable --ruby source /home/<username>/.rvm/scripts/rvmwhen I run gem install rails, i get the following error:
<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)from <internal:gem_prelude>:1:in `<compiled>'What's the problem here?
解决方案It turns out that my problem was the fact that I had created a symbolic link to gem manually in /usr/bin. After deleting the symbolic link, I reinstalled everything using the following commands:
rvm implode \curl -L https://get.rvm.io | bash -s stable --ruby source /home/<username>/.rvm/scripts/rvmafter which
gem install railsworked like a charm.
这篇关于`require':无法加载这样的文件 - rubygems.rb在安装ruby和rubygems时使用rvm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!