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