rubygems IOError:函数未实现(https://rubygems.org/latest_specs.4.8.gz

时间:2014-04-26 12:09:08

标签: ruby rubygems jruby freebsd rbenv

我在FreeBSD 10上安装了Oracle Java:

bb@rails:~/redmine-2.5.1 % java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Server VM (build 25.5-b02, mixed mode)

另外,我在rbenv下运行了jruby 1.7.12:

bb@rails:~/redmine-2.5.1 % jruby -v
jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on Java HotSpot(TM) Server VM 1.8.0_05-b13 +indy [linux-i386]

jirb工作正常:

bb@rails:~/redmine-2.5.1 % jirb
irb(main):001:0> 2+3
=> 5
irb(main):002:0>

当我尝试安装gem(我需要的第一个是bundler)时,我收到一条奇怪的错误消息:

bb@rails:~/redmine-2.5.1 % jruby -S gem install bundler
ERROR:  Could not find a valid gem 'bundler' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - IOError: Function not implemented (https://rubygems.org/latest_specs.4.8.gz)

我试图从http下载rubygems,但结果不是更好:

bb@rails:~/redmine-2.5.1 % jruby -S gem install bundler --source http://rubygems.org/
ERROR:  Could not find a valid gem 'bundler' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - IOError: Function not implemented (https://rubygems.org/latest_specs.4.8.gz)
          Unable to download data from http://rubygems.org/ - IOError: Function not implemented (http://rubygems.org/latest_specs.4.8.gz)

任何帮助表示赞赏!

1 个答案:

答案 0 :(得分:-1)

我找到了两个解决方案:

  1. 在FreeBSD主机上安装Oracle Java + JRuby,而不是在jail中安装。
  2. 用户Rubinius或MRI代替