我想使用GitHub上的最新RubyGems修复当前Rubygems 1.8.10中无效的gemspec时间错误。后一版本是您在使用rvm
并说rvm rubygems current
或rvm rubygems latest
时获得的。
如何教rvm
在github上安装rubygems主分支的头部,或者,我应该如何在本地构建该头以使rvm能够安装它;或者将它安装到RVM中以便它能够正确地知道它?
答案 0 :(得分:2)
您可以通过运行
更新到最新的提交oe1320:rubygems augusto$ gem -v
1.8.8
oe1320:ruby augusto$ git clone https://github.com/rubygems/rubygems.git
Cloning into rubygems...
remote: Counting objects: 22915, done.
remote: Compressing objects: 100% (6405/6405), done.
remote: Total 22915 (delta 16488), reused 22305 (delta 15937)
Receiving objects: 100% (22915/22915), 3.53 MiB | 676 KiB/s, done.
Resolving deltas: 100% (16488/16488), done.
oe1320:ruby augusto$ cd rubygems/
oe1320:rubygems augusto$ git log -1
commit 57c969dac7e9e989ee9078d0803d0e2614c15761
Author: Eric Hodel <drbrain@segment7.net>
Date: Thu Sep 15 12:13:12 2011 -0700
Add jruby and rubinius to travis-ci
oe1320:rubygems augusto$ ruby setup.rb
RubyGems 1.8.10 installed
[...]
oe1320:rubygems augusto$ cd
oe1320:~ augusto$ gem -v
1.8.10
如您所见,我刚刚从gem 1.8.8更新为latest commit from 1.8.10
正如我在评论中提到的,我也在RVM下运行。当您在rubygems forlder中运行ruby setup.rb
时,它会将gem
脚本和源安装在正确的文件夹中。你不需要做任何特别的事情。
$ gem which rubygems
/home/augusto/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb
$ rvm -v
rvm 1.6.32 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]