|
1 '\" t |
|
2 .\"RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim Weirich and others. |
|
3 .\" |
|
4 .\" CDDL HEADER START |
|
5 .\" |
|
6 .\" The contents of this file are subject to the terms of the |
|
7 .\" Common Development and Distribution License (the "License"). |
|
8 .\" You may not use this file except in compliance with the License. |
|
9 .\" |
|
10 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
11 .\" or http://www.opensolaris.org/os/licensing. |
|
12 .\" See the License for the specific language governing permissions |
|
13 .\" and limitations under the License. |
|
14 .\" |
|
15 .\" When distributing Covered Code, include this CDDL HEADER in each |
|
16 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
17 .\" If applicable, add the following below this CDDL HEADER, with the |
|
18 .\" fields enclosed by brackets "[]" replaced with your own identifying |
|
19 .\" information: Portions Copyright [yyyy] [name of copyright owner] |
|
20 .\" |
|
21 .\" CDDL HEADER END |
|
22 .\" |
|
23 .\" Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. |
|
24 .\" |
|
25 .\" gem.1 |
|
26 .\" |
|
27 .TH gem 1 "3 June 2013" "" "" |
|
28 .SH NAME |
|
29 gem \-\- Command-line interface to RubyGems |
|
30 .SH SYNOPSIS |
|
31 .B gem |
|
32 .RB \-h | \-\-help |
|
33 .PP |
|
34 .B gem |
|
35 .RB \-v | \-\-version |
|
36 .PP |
|
37 .B gem |
|
38 .I command |
|
39 [ arguments\.\.\. ] |
|
40 [ options\.\.\. ] |
|
41 .SH DESCRIPTION |
|
42 A gem is a packaged Ruby application or library, while RubyGems is the premier ruby packaging system which is used to manage gems. |
|
43 |
|
44 Gems are managed on your computer using the |
|
45 .I gem |
|
46 command. You can install, remove, and query gem packages using the |
|
47 .I gem |
|
48 command. |
|
49 |
|
50 .SH FEATURES |
|
51 |
|
52 * Easy Installation and removal of RubyGems packages and their dependencies |
|
53 |
|
54 * Management and control of local packages |
|
55 |
|
56 * Package dependency management |
|
57 |
|
58 * Query, search and list local and remote packages |
|
59 |
|
60 * Multiple version support for installed packages |
|
61 |
|
62 * Web-based interface to view the documentation for your installed gems |
|
63 |
|
64 * Easy to use interface for building gem packages |
|
65 |
|
66 * Simple server for distributing your own gem packages |
|
67 |
|
68 .SH OPTIONS |
|
69 .TP |
|
70 \fB\-h | \-\-help\fP |
|
71 Get the basic help message for |
|
72 .I gem |
|
73 command. |
|
74 |
|
75 .TP |
|
76 \fB\-v | \-\-version\fP |
|
77 Get the version of |
|
78 .I gem |
|
79 command. |
|
80 |
|
81 .TP |
|
82 .I command |
|
83 .sp |
|
84 .ne 2 |
|
85 .mk |
|
86 \fBbuild\fP |
|
87 .in +16n |
|
88 .rt |
|
89 Build a gem from a gemspec |
|
90 .sp |
|
91 .sp 1 |
|
92 .in -16n |
|
93 .sp |
|
94 .ne 2 |
|
95 .mk |
|
96 \fBcert\fP |
|
97 .in +16n |
|
98 .rt |
|
99 Manage RubyGems certificates and signing settings |
|
100 .sp |
|
101 .sp 1 |
|
102 .in -16n |
|
103 .sp |
|
104 .ne 2 |
|
105 .mk |
|
106 \fBcheck\fP |
|
107 .in +16n |
|
108 .rt |
|
109 Check installed gems |
|
110 .sp |
|
111 .sp 1 |
|
112 .in -16n |
|
113 .sp |
|
114 .ne 2 |
|
115 .mk |
|
116 \fBcleanup\fP |
|
117 .in +16n |
|
118 .rt |
|
119 Clean up old versions of installed gems in the local repository |
|
120 .sp |
|
121 .sp 1 |
|
122 .in -16n |
|
123 .sp |
|
124 .ne 2 |
|
125 .mk |
|
126 \fBcontents\fP |
|
127 .in +16n |
|
128 .rt |
|
129 Display the contents of the installed gems |
|
130 .sp |
|
131 .sp 1 |
|
132 .in -16n |
|
133 .sp |
|
134 .ne 2 |
|
135 .mk |
|
136 \fBdependency\fP |
|
137 .in +16n |
|
138 .rt |
|
139 Show the dependencies of an installed gem |
|
140 .sp |
|
141 .sp 1 |
|
142 .in -16n |
|
143 .sp |
|
144 .ne 2 |
|
145 .mk |
|
146 \fBenvironment\fP |
|
147 .in +16n |
|
148 .rt |
|
149 Display information about the RubyGems environment |
|
150 .sp |
|
151 .sp 1 |
|
152 .in -16n |
|
153 .sp |
|
154 .ne 2 |
|
155 .mk |
|
156 \fBfetch\fP |
|
157 .in +16n |
|
158 .rt |
|
159 Download a gem and place it in the current directory |
|
160 .sp |
|
161 .sp 1 |
|
162 .in -16n |
|
163 .sp |
|
164 .ne 2 |
|
165 .mk |
|
166 \fBgenerate_index\fP |
|
167 .in +16n |
|
168 .rt |
|
169 Generates the index files for a gem server directory |
|
170 .sp |
|
171 .sp 1 |
|
172 .in -16n |
|
173 .sp |
|
174 .ne 2 |
|
175 .mk |
|
176 \fBhelp\fP |
|
177 .in +16n |
|
178 .rt |
|
179 Provide help on the 'gem' command |
|
180 .sp |
|
181 .sp 1 |
|
182 .in -16n |
|
183 .sp |
|
184 .ne 2 |
|
185 .mk |
|
186 \fBinstall\fP |
|
187 .in +16n |
|
188 .rt |
|
189 Install a gem into the local repository |
|
190 .sp |
|
191 .sp 1 |
|
192 .in -16n |
|
193 .sp |
|
194 .ne 2 |
|
195 .mk |
|
196 \fBlist\fP |
|
197 .in +16n |
|
198 .rt |
|
199 Display all gems whose name starts with STRING |
|
200 .sp |
|
201 .sp 1 |
|
202 .in -16n |
|
203 .sp |
|
204 .ne 2 |
|
205 .mk |
|
206 \fBlock\fP |
|
207 .in +16n |
|
208 .rt |
|
209 Generate a lockdown list of gems |
|
210 .sp |
|
211 .sp 1 |
|
212 .in -16n |
|
213 .sp |
|
214 .ne 2 |
|
215 .mk |
|
216 \fBmirror\fP |
|
217 .in +16n |
|
218 .rt |
|
219 Mirror a gem repository |
|
220 .sp |
|
221 .sp 1 |
|
222 .in -16n |
|
223 .sp |
|
224 .ne 2 |
|
225 .mk |
|
226 \fBoutdated\fP |
|
227 .in +16n |
|
228 .rt |
|
229 Display all gems that need updates |
|
230 .sp |
|
231 .sp 1 |
|
232 .in -16n |
|
233 .sp |
|
234 .ne 2 |
|
235 .mk |
|
236 \fBpristine\fP |
|
237 .in +16n |
|
238 .rt |
|
239 Restores installed gems to pristine condition from files located in the gem cache |
|
240 .sp |
|
241 .sp 1 |
|
242 .in -16n |
|
243 .sp |
|
244 .ne 2 |
|
245 .mk |
|
246 \fBquery\fP |
|
247 .in +16n |
|
248 .rt |
|
249 Query gem information in local or remote repositories |
|
250 .sp |
|
251 .sp 1 |
|
252 .in -16n |
|
253 .sp |
|
254 .ne 2 |
|
255 .mk |
|
256 \fBrdoc\fP |
|
257 .in +16n |
|
258 .rt |
|
259 Generates RDoc for pre-installed gems |
|
260 .sp |
|
261 .sp 1 |
|
262 .in -16n |
|
263 .sp |
|
264 .ne 2 |
|
265 .mk |
|
266 \fBsearch\fP |
|
267 .in +16n |
|
268 .rt |
|
269 Display all gems whose name contains STRING |
|
270 .sp |
|
271 .sp 1 |
|
272 .in -16n |
|
273 .sp |
|
274 .ne 2 |
|
275 .mk |
|
276 \fBserver\fP |
|
277 .in +16n |
|
278 .rt |
|
279 Documentation and gem repository HTTP server |
|
280 .sp |
|
281 .sp 1 |
|
282 .in -16n |
|
283 .sp |
|
284 .ne 2 |
|
285 .mk |
|
286 \fBsources\fP |
|
287 .in +16n |
|
288 .rt |
|
289 Manage the sources and cache file RubyGems will search for gems |
|
290 .sp |
|
291 .sp 1 |
|
292 .in -16n |
|
293 .sp |
|
294 .ne 2 |
|
295 .mk |
|
296 \fBspecification\fP |
|
297 .in +16n |
|
298 .rt |
|
299 Display gem specification (in yaml) |
|
300 .sp |
|
301 .sp 1 |
|
302 .in -16n |
|
303 .sp |
|
304 .ne 2 |
|
305 .mk |
|
306 \fBstale\fP |
|
307 .in +16n |
|
308 .rt |
|
309 List gems along with access times |
|
310 .sp |
|
311 .sp 1 |
|
312 .in -16n |
|
313 .sp |
|
314 .ne 2 |
|
315 .mk |
|
316 \fBuninstall\fP |
|
317 .in +16n |
|
318 .rt |
|
319 Uninstall gems from the local repository |
|
320 .sp |
|
321 .sp 1 |
|
322 .in -16n |
|
323 .sp |
|
324 .ne 2 |
|
325 .mk |
|
326 \fBunpack\fP |
|
327 .in +16n |
|
328 .rt |
|
329 Unpack an installed gem to the current directory |
|
330 .sp |
|
331 .sp 1 |
|
332 .in -16n |
|
333 .sp |
|
334 .ne 2 |
|
335 .mk |
|
336 \fBupdate\fP |
|
337 .in +16n |
|
338 .rt |
|
339 Update the named gem (or all installed gems) in the local repository |
|
340 .sp |
|
341 .sp 1 |
|
342 .in -16n |
|
343 .sp |
|
344 .ne 2 |
|
345 .mk |
|
346 \fBwhich\fP |
|
347 .in +16n |
|
348 .rt |
|
349 Find the location of a library file you can require |
|
350 .sp |
|
351 .sp 1 |
|
352 .in -16n |
|
353 .sp |
|
354 .ne 2 |
|
355 .mk |
|
356 For more detailed help on a particular command with its arguments and options, |
|
357 use 'gem help |
|
358 .I command |
|
359 \'. |
|
360 |
|
361 For example: |
|
362 |
|
363 # gem help install |
|
364 |
|
365 Commands may be abbreviated, so long as they are unambiguous. |
|
366 e.g. 'gem i thor' is short for 'gem install thor'. |
|
367 |
|
368 .SH ENVIRONMENT |
|
369 .TP |
|
370 .B GEM_HOME |
|
371 Directory containing the master gem repository. |
|
372 |
|
373 .TP |
|
374 .B GEM_PATH |
|
375 Path list of directories containing gem repositories to be searched in addition to the GEM_HOME directory. The list should be delimited by the appropriate path separator ':' |
|
376 |
|
377 .TP |
|
378 .B GEM_SKIP |
|
379 List of gems should should not be loaded (normally used for development). The list should be delimited by the appropriate path separator ':' |
|
380 |
|
381 .TP |
|
382 .B http_proxy / HTTP_PROXY |
|
383 URL of the HTTP protocol proxy to be used to get out of the firewall. The lower case version will be used first. |
|
384 |
|
385 .TP |
|
386 .B make |
|
387 Name of the make program that should be used to build extensions. |
|
388 |
|
389 .TP |
|
390 .B HOME |
|
391 Home directory of the user (see below). |
|
392 |
|
393 .TP |
|
394 .B USERPROFILE |
|
395 Home directory of the user (used if HOME is not defined) |
|
396 |
|
397 .TP |
|
398 .B HOMEDRIVE |
|
399 Drive containing the user's home directory. |
|
400 |
|
401 .TP |
|
402 .B HOMEPATH |
|
403 Path to the user's home directory. |
|
404 |
|
405 .SH EXAMPLES |
|
406 .PP |
|
407 \fBExample 1: Install 'thor', either from local directory or remote server |
|
408 .PP |
|
409 .nf |
|
410 # gem install thor |
|
411 .fi |
|
412 .PP |
|
413 \fBExample 2: Install 'thor', only from remote server |
|
414 .PP |
|
415 .nf |
|
416 # gem install thor --remote |
|
417 .fi |
|
418 .PP |
|
419 \fBExample 3: Install 'thor' from remote server, and run unit tests, and generate RDocs |
|
420 .PP |
|
421 .nf |
|
422 # gem install --remote thor --test --rdoc --ri |
|
423 .fi |
|
424 .PP |
|
425 \fBExample 4: Install 'thor', but only version 0.18.1, even if dependencies are not met, and into a specific directory |
|
426 .PP |
|
427 .nf |
|
428 # gem install thor --version 0.18.1 --force --install-dir $HOME/.gem/ruby/RUBY_LIB_VER |
|
429 .fi |
|
430 .PP |
|
431 \fBExample 5: List local gems whose name begins with 'D' |
|
432 .PP |
|
433 .nf |
|
434 # gem list D |
|
435 .fi |
|
436 .PP |
|
437 \fBExample 6: List local and remote gems whose name contains 'log' |
|
438 .PP |
|
439 .nf |
|
440 # gem search log --both |
|
441 .fi |
|
442 .PP |
|
443 \fBExample 7: List only remote gems whose name contains 'log' |
|
444 .PP |
|
445 .nf |
|
446 # gem search log --remote |
|
447 .fi |
|
448 .PP |
|
449 \fBExample 8: Uninstall 'thor' |
|
450 .PP |
|
451 .nf |
|
452 # gem uninstall thor |
|
453 .fi |
|
454 .PP |
|
455 \fBExample 9: See information about RubyGems |
|
456 .PP |
|
457 .nf |
|
458 # gem environment |
|
459 .TE |
|
460 .sp |
|
461 .SH SEE ALSO |
|
462 \fBruby\fR(1) |
|
463 .sp |
|
464 .SH FILES |
|
465 The following files specify the installation locations for Ruby: |
|
466 .PP |
|
467 .TP |
|
468 /usr/ruby/RUBY_VER/lib/MACH64/ruby/gems/RUBY_LIB_VER |
|
469 Contains the Rubygems repository. Configure the GEM_HOME environment variable to point to /usr/ruby/RUBY_VER/lib/MACH64/ruby/gems/RUBY_LIB_VER as the installation of Rubygems repository. |
|
470 .PP |
|
471 .TP |
|
472 ~/.gem/ruby/RUBY_LIB_VER |
|
473 Per user location to install gems. This is automatically added to GEM_PATH. |
|
474 .PP |
|
475 .TP |
|
476 ~/.gem/ruby/RUBY_LIB_VER/bin |
|
477 Per user location for gem executables. |
|
478 .PP |
|
479 .TP |
|
480 /usr/ruby/RUBY_VER/bin |
|
481 Contains the Rubygems program with all other Ruby related programs. These programs are linked from /usr/bin. |
|
482 For example: /usr/ruby/RUBY_VER/bin/gem is linked from /usr/bin/gem19, and may be linked from /usr/bin/gem if the package mediator "ruby" is version "RUBY_VER" (see pkg(1)). |
|
483 Also contains executables for any installed gems that supply them (i.e.: thor, rails, etc). |
|
484 .PP |
|
485 .PP |
|
486 .SH NOTES |
|
487 Detailed documentation for RubyGems is available at http://guides.rubygems.org/ |