Merge pull request #1128 from voxik/patch-1
[rubygems] / UPGRADING.rdoc
1 = How to upgrade/downgrade Rubygems:
2
3 == For RubyGems 1.5.0 and 1.5.1:
4
5 RubyGems 1.5.0 and 1.5.1 shipped with a broken <tt>gem update --system</tt>.
6 You will need to use the Manual Upgrade Recipe below.
7
8 == On Ruby 1.9.x:
9
10 === From stock ruby shipping with 1.9:
11
12 Use the Normal Upgrade Method below. (finally!)
13
14 == On Ruby 1.8.x:
15
16 === From rubygems 1.3.x:
17
18 Use the Normal Upgrade Recipe below.
19
20 === From rubygems 1-1.x through 1.2.x:
21
22 RubyGems 1.1 and 1.2 have problems upgrading when there is no
23 rubygems-update installed. You will need to use the following
24 instructions if you see "Nothing to update".
25
26 Use the Manual Upgrade Recipe below.
27
28 === From rubygems < 1.1.x:
29
30 Use the Normal Upgrade Recipe below.
31
32 == Downgrade Recipe
33
34 === Normal Downgrade
35
36 ==== With rubygems 1.5.2 and higher:
37
38     $ gem update --system 1.3.7
39
40 ==== With rubygems 1.5.1 and lower:
41
42 Use sudo/su as appropriate:
43
44     $ gem install rubygems-update -v 1.3.7
45     $ update_rubygems _1.3.7_
46
47 Replace 1.3.7 with whatever version you want to downgrade to. This
48 recipe can also be used to upgrade to a specific version instead of
49 the latest.
50
51 Do make sure that you don't have any other versions of rubygems-update
52 installed when you run the second command.
53
54 === 1.9.2 Downgrade from Rubygems 1.4.x+ to stock 1.9 rubygems:
55
56 Use sudo/su as appropriate:
57
58     $ ruby --disable-gems -S gem which rubygems
59     ~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb
60     $ rm ~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb
61     $ rm -rf ~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems
62     $ gem -v
63     1.3.7
64
65 == Upgrade Recipes
66
67 === Normal Upgrade
68
69 Use sudo/su as appropriate:
70
71     $ gem update --system
72
73 === Manual Upgrade
74
75 If you have an older version of RubyGems installed, then you can still
76 do it in two steps:
77
78 Use sudo/su as appropriate:
79
80     $ gem install rubygems-update
81     $ update_rubygems
82
83 === Manual Install
84
85 If you don't have any RubyGems install, there is still the pre-gem
86 approach to getting software, doing it manually:
87
88 Use sudo/su as appropriate:
89
90 * Download from: https://rubygems.org/pages/download
91 * Unpack into a directory and cd there
92 * Install with: ruby setup.rb