新手问题 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- net/https (LoadError) 求解决方发

lianyutao · 2013年12月05日 · 最后由 luikore 回复于 2013年12月05日 · 12782 次阅读

gem install bundler 的时候报 root@tzy:~# gem install bundler /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- net/https (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:241:in connection_for' from /usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:320:inrequest' from /usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:279:in open_uri_or_path' from /usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:288:inopen_uri_or_path' from /usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:164:in fetch_path' from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:227:inload_specs' from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:192:in list' from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:188:ineach' from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:188:in list' from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:123:infind_matching' from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:69:in fetch' from /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:99:infind_gems_with_sources' from /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:192:in find_spec_by_name_and_version' from /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:213:ininstall' from /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:118:in execute' from /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:115:ineach' from /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:115:in execute' from /usr/lib/ruby/1.8/rubygems/command.rb:257:ininvoke' from /usr/lib/ruby/1.8/rubygems/command_manager.rb:132:in process_args' from /usr/lib/ruby/1.8/rubygems/command_manager.rb:102:inrun' from /usr/lib/ruby/1.8/rubygems/gem_runner.rb:58:in `run' from /usr/bin/gem:21

@hlcfan 什么意思???

ruby版本看起来有点老。。。

首先,你的帖子从题目到内容都很差,很难让人不怀疑你是一个伸手党。

建议题目改成:gem install bundler 的时候报错,找不到 'net/https' 建议帖子内容用插入代码的方式格式化一下,方便查看。

如果你在 console 里面进入 irb 输入

require 'net/https'

会不会报错?如果会报错,说明你的 Ruby 安装的有问题。

1.8 应该没有 net/https, 或者是系统自带的 ruby 缺少 stdlib/openssl

建议安装 Ruby 2.0

\curl -sSL https://get.rvm.io | bash -s stable
需要 登录 后方可回复, 如果你还没有账号请 注册新账号