1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY ruby-download-http "https://cache.ruby-lang.org/pub/ruby/&ruby-minor-version;/ruby-&ruby-version;.tar.xz">
|
---|
8 | <!ENTITY ruby-download-ftp " ">
|
---|
9 | <!ENTITY ruby-md5sum "377853f31d10bfe37c58b8537fc3e05d">
|
---|
10 | <!ENTITY ruby-size "14 MB">
|
---|
11 | <!ENTITY ruby-buildsize "694 MB (add 1.0 GB for C API docs)">
|
---|
12 | <!ENTITY ruby-time "1.2 SBU (using parallelism=4; add 4.6 SBU for tests; add 0.6 SBU for C API docs)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="ruby" xreflabel="Ruby-&ruby-version;">
|
---|
16 | <?dbhtml filename="ruby.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>Ruby-&ruby-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="ruby">
|
---|
22 | <primary sortas="a-Ruby">Ruby</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to Ruby</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | The <application>Ruby</application> package contains the
|
---|
30 | <application>Ruby</application> development environment. This
|
---|
31 | is useful for object-oriented scripting.
|
---|
32 | </para>
|
---|
33 |
|
---|
34 | &lfs120_checked;
|
---|
35 |
|
---|
36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
37 | <itemizedlist spacing="compact">
|
---|
38 | <listitem>
|
---|
39 | <para>
|
---|
40 | Download (HTTP): <ulink url="&ruby-download-http;"/>
|
---|
41 | </para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>
|
---|
45 | Download (FTP): <ulink url="&ruby-download-ftp;"/>
|
---|
46 | </para>
|
---|
47 | </listitem>
|
---|
48 | <listitem>
|
---|
49 | <para>
|
---|
50 | Download MD5 sum: &ruby-md5sum;
|
---|
51 | </para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>
|
---|
55 | Download size: &ruby-size;
|
---|
56 | </para>
|
---|
57 | </listitem>
|
---|
58 | <listitem>
|
---|
59 | <para>
|
---|
60 | Estimated disk space required: &ruby-buildsize;
|
---|
61 | </para>
|
---|
62 | </listitem>
|
---|
63 | <listitem>
|
---|
64 | <para>
|
---|
65 | Estimated build time: &ruby-time;
|
---|
66 | </para>
|
---|
67 | </listitem>
|
---|
68 | </itemizedlist>
|
---|
69 |
|
---|
70 | <bridgehead renderas="sect3">Ruby Dependencies</bridgehead>
|
---|
71 |
|
---|
72 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
73 | <para role="required">
|
---|
74 | <xref linkend="libyaml"/>
|
---|
75 | </para>
|
---|
76 |
|
---|
77 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
78 | <para role="optional">
|
---|
79 | <xref linkend="db"/>,
|
---|
80 | <xref linkend="doxygen"/>,
|
---|
81 | <xref linkend="graphviz"/>,
|
---|
82 | <xref linkend="rust"/>,
|
---|
83 | <xref linkend="tk"/>,
|
---|
84 | <xref linkend="valgrind"/>, and
|
---|
85 | <ulink url="http://dtrace.org/blogs/about/">DTrace</ulink>
|
---|
86 | </para>
|
---|
87 |
|
---|
88 | </sect2>
|
---|
89 |
|
---|
90 | <sect2 role="installation">
|
---|
91 | <title>Installation of Ruby</title>
|
---|
92 | <!--
|
---|
93 | <para>
|
---|
94 | If you wish to run the tests after installing this package, fix a problem
|
---|
95 | that results in a crash during the test suite, due to an undefined
|
---|
96 | variable:
|
---|
97 | </para>
|
---|
98 |
|
---|
99 | <screen><userinput>sed -i '283d' tool/lib/leakchecker.rb</userinput></screen>
|
---|
100 | -->
|
---|
101 | <para>
|
---|
102 | Install <application>Ruby</application> by running the following
|
---|
103 | command:
|
---|
104 | </para>
|
---|
105 |
|
---|
106 | <screen><userinput>./configure --prefix=/usr \
|
---|
107 | --enable-shared \
|
---|
108 | --without-valgrind \
|
---|
109 | --without-baseruby \
|
---|
110 | --docdir=/usr/share/doc/ruby-&ruby-version; &&
|
---|
111 | make</userinput></screen>
|
---|
112 |
|
---|
113 | <para>
|
---|
114 | Optionally, build the CAPI documents by running the following
|
---|
115 | commands:
|
---|
116 | </para>
|
---|
117 |
|
---|
118 | <screen><userinput>make capi</userinput></screen>
|
---|
119 |
|
---|
120 | <para>
|
---|
121 | The tests require that the new version of Ruby is already installed to
|
---|
122 | run correctly. If you want to run the tests, execute them after installing
|
---|
123 | the package. <!-- Ticket #17887 -->
|
---|
124 | </para>
|
---|
125 |
|
---|
126 | <para>
|
---|
127 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
128 | </para>
|
---|
129 |
|
---|
130 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
131 |
|
---|
132 | <para>
|
---|
133 | To test the results, issue: <command>make -k check</command>. There are over
|
---|
134 | 25,000 tests. Some tests related to ipv6 may indicate errors. If the
|
---|
135 | tests are run in a directory that has a world writable component (e.g.
|
---|
136 | /tmp) then several additional tests may fail. A few tests may fail due
|
---|
137 | to system configuration expectations.
|
---|
138 | </para>
|
---|
139 |
|
---|
140 | <!-- With 3.0.2:
|
---|
141 | Finished tests in 443.541527s, 47.5739 tests/s, 6031.9921 assertions/s.
|
---|
142 | 21101 tests, 2675439 assertions, 4 failures, 1 errors, 45 skips
|
---|
143 |
|
---|
144 | with 3.2.0 there are several summaries:
|
---|
145 | * PASS all 1789 tests
|
---|
146 | * Finished tests in 6.815561s, 45.6309 tests/s, 264.2482 assertions/s.
|
---|
147 | 311 tests, 1801 assertions, 0 failures, 0 errors, 12 skips
|
---|
148 | * Finished tests in 462.613063s, 50.5649 tests/s, 12069.0885 assertions/s.
|
---|
149 | 23392 tests, 5583318 assertions, 3 failures, 0 errors, 79 skips
|
---|
150 | -->
|
---|
151 |
|
---|
152 | <note>
|
---|
153 | <para>
|
---|
154 | If you have Ruby-On-Rails applications installed and did an
|
---|
155 | upgrade of <application>Ruby</application> by installing this
|
---|
156 | package, you might need to run an update there, too
|
---|
157 | (as the &root; user):
|
---|
158 | </para>
|
---|
159 |
|
---|
160 | <screen role="nodump"><userinput>cd /path/to/web/app
|
---|
161 | bundle update rake</userinput></screen>
|
---|
162 |
|
---|
163 | <para>
|
---|
164 | and restart the webserver which serves the application.
|
---|
165 | </para>
|
---|
166 |
|
---|
167 | </note>
|
---|
168 |
|
---|
169 | </sect2>
|
---|
170 |
|
---|
171 | <sect2 role="commands">
|
---|
172 | <title>Command Explanations</title>
|
---|
173 |
|
---|
174 | <para>
|
---|
175 | <parameter>--enable-shared</parameter>: This switch enables building
|
---|
176 | the <filename class="libraryfile">libruby</filename> shared library.
|
---|
177 | </para>
|
---|
178 |
|
---|
179 | <para>
|
---|
180 | <parameter>--without-baseruby</parameter>: This switch prevents using the
|
---|
181 | system <command>ruby</command> if it is already installed. The build
|
---|
182 | system will use the newly built version instead.
|
---|
183 | </para>
|
---|
184 |
|
---|
185 | <para>
|
---|
186 | <option>--disable-install-doc</option>: This switch disables building and
|
---|
187 | installing rdoc indexes and C API documents.
|
---|
188 | </para>
|
---|
189 |
|
---|
190 | <para>
|
---|
191 | <option>--disable-install-rdoc</option>: This switch disables building
|
---|
192 | and installing rdoc indexes.
|
---|
193 | </para>
|
---|
194 |
|
---|
195 | <para>
|
---|
196 | <option>--disable-install-capi</option>: This switch disables building
|
---|
197 | and installing C API documents.
|
---|
198 | </para>
|
---|
199 |
|
---|
200 | </sect2>
|
---|
201 |
|
---|
202 | <sect2 role="content">
|
---|
203 | <title>Contents</title>
|
---|
204 |
|
---|
205 | <segmentedlist>
|
---|
206 | <segtitle>Installed Programs</segtitle>
|
---|
207 | <segtitle>Installed Libraries</segtitle>
|
---|
208 | <segtitle>Installed Directories</segtitle>
|
---|
209 |
|
---|
210 | <seglistitem>
|
---|
211 | <seg>
|
---|
212 | bundle,
|
---|
213 | bundler,
|
---|
214 | erb,
|
---|
215 | gem,
|
---|
216 | irb,
|
---|
217 | racc,
|
---|
218 | rake,
|
---|
219 | rbs,
|
---|
220 | rdbg,
|
---|
221 | rdoc,
|
---|
222 | ri,
|
---|
223 | ruby, and
|
---|
224 | typeprof
|
---|
225 | </seg>
|
---|
226 | <seg>
|
---|
227 | libruby.so
|
---|
228 | </seg>
|
---|
229 | <seg>
|
---|
230 | /usr/include/ruby-&ruby-minor-version;.0,
|
---|
231 | /usr/lib/ruby,
|
---|
232 | /usr/share/doc/ruby-&ruby-version; and
|
---|
233 | /usr/share/ri
|
---|
234 | </seg>
|
---|
235 | </seglistitem>
|
---|
236 | </segmentedlist>
|
---|
237 |
|
---|
238 | <variablelist>
|
---|
239 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
240 | <?dbfo list-presentation="list"?>
|
---|
241 | <?dbhtml list-presentation="table"?>
|
---|
242 |
|
---|
243 | <varlistentry id="bundle">
|
---|
244 | <term><command>bundle</command></term>
|
---|
245 | <listitem>
|
---|
246 | <para>
|
---|
247 | creates bundles of Ruby Gems
|
---|
248 | </para>
|
---|
249 | <indexterm zone="ruby bundle">
|
---|
250 | <primary sortas="b-bundle">bundle</primary>
|
---|
251 | </indexterm>
|
---|
252 | </listitem>
|
---|
253 | </varlistentry>
|
---|
254 |
|
---|
255 | <varlistentry id="bundler">
|
---|
256 | <term><command>bundler</command></term>
|
---|
257 | <listitem>
|
---|
258 | <para>
|
---|
259 | manages an application's dependencies throughout it's lifecycle
|
---|
260 | </para>
|
---|
261 | <indexterm zone="ruby bundler">
|
---|
262 | <primary sortas="b-bundler">bundler</primary>
|
---|
263 | </indexterm>
|
---|
264 | </listitem>
|
---|
265 | </varlistentry>
|
---|
266 |
|
---|
267 | <varlistentry id="erb">
|
---|
268 | <term><command>erb</command></term>
|
---|
269 | <listitem>
|
---|
270 | <para>
|
---|
271 | is a command line front-end for eRuby, which provides a templating
|
---|
272 | system for <application>Ruby</application>
|
---|
273 | </para>
|
---|
274 | <indexterm zone="ruby erb">
|
---|
275 | <primary sortas="b-erb">erb</primary>
|
---|
276 | </indexterm>
|
---|
277 | </listitem>
|
---|
278 | </varlistentry>
|
---|
279 |
|
---|
280 | <varlistentry id="gem">
|
---|
281 | <term><command>gem</command></term>
|
---|
282 | <listitem>
|
---|
283 | <para>
|
---|
284 | is the command for RubyGems, which is a sophisticated package
|
---|
285 | manager for <application>Ruby</application>. This is similar
|
---|
286 | to Python's 'pip' command
|
---|
287 | </para>
|
---|
288 | <indexterm zone="ruby gem">
|
---|
289 | <primary sortas="b-gem">gem</primary>
|
---|
290 | </indexterm>
|
---|
291 | </listitem>
|
---|
292 | </varlistentry>
|
---|
293 |
|
---|
294 | <varlistentry id="irb">
|
---|
295 | <term><command>irb</command></term>
|
---|
296 | <listitem>
|
---|
297 | <para>
|
---|
298 | is the interactive interface for
|
---|
299 | <application>Ruby</application>
|
---|
300 | </para>
|
---|
301 | <indexterm zone="ruby irb">
|
---|
302 | <primary sortas="b-irb">irb</primary>
|
---|
303 | </indexterm>
|
---|
304 | </listitem>
|
---|
305 | </varlistentry>
|
---|
306 |
|
---|
307 | <varlistentry id="rake">
|
---|
308 | <term><command>rake</command></term>
|
---|
309 | <listitem>
|
---|
310 | <para>
|
---|
311 | is a make-like build utility for <application>Ruby</application>
|
---|
312 | </para>
|
---|
313 | <indexterm zone="ruby rake">
|
---|
314 | <primary sortas="b-rake">rake</primary>
|
---|
315 | </indexterm>
|
---|
316 | </listitem>
|
---|
317 | </varlistentry>
|
---|
318 |
|
---|
319 | <varlistentry id="rdbg">
|
---|
320 | <term><command>rdbg</command></term>
|
---|
321 | <listitem>
|
---|
322 | <para>
|
---|
323 | is an interactive debugger for <application>Ruby</application>
|
---|
324 | </para>
|
---|
325 | <indexterm zone="ruby rdbg">
|
---|
326 | <primary sortas="b-rdbg">rdbg</primary>
|
---|
327 | </indexterm>
|
---|
328 | </listitem>
|
---|
329 | </varlistentry>
|
---|
330 |
|
---|
331 | <varlistentry id="rdoc">
|
---|
332 | <term><command>rdoc</command></term>
|
---|
333 | <listitem>
|
---|
334 | <para>
|
---|
335 | generates <application>Ruby</application> documentation
|
---|
336 | </para>
|
---|
337 | <indexterm zone="ruby rdoc">
|
---|
338 | <primary sortas="b-rdoc">rdoc</primary>
|
---|
339 | </indexterm>
|
---|
340 | </listitem>
|
---|
341 | </varlistentry>
|
---|
342 |
|
---|
343 | <varlistentry id="ri">
|
---|
344 | <term><command>ri</command></term>
|
---|
345 | <listitem>
|
---|
346 | <para>
|
---|
347 | displays documentation from a database on
|
---|
348 | <application>Ruby</application> classes, modules, and methods
|
---|
349 | </para>
|
---|
350 | <indexterm zone="ruby ri">
|
---|
351 | <primary sortas="b-ri">ri</primary>
|
---|
352 | </indexterm>
|
---|
353 | </listitem>
|
---|
354 | </varlistentry>
|
---|
355 |
|
---|
356 | <varlistentry id="ruby-prog">
|
---|
357 | <term><command>ruby</command></term>
|
---|
358 | <listitem>
|
---|
359 | <para>
|
---|
360 | is an interpreted scripting language for quick
|
---|
361 | and easy object-oriented programming
|
---|
362 | </para>
|
---|
363 | <indexterm zone="ruby ruby-prog">
|
---|
364 | <primary sortas="b-ruby">ruby</primary>
|
---|
365 | </indexterm>
|
---|
366 | </listitem>
|
---|
367 | </varlistentry>
|
---|
368 |
|
---|
369 | <varlistentry id="libruby">
|
---|
370 | <term><filename role="libraryfile">libruby.so</filename></term>
|
---|
371 | <listitem>
|
---|
372 | <para>
|
---|
373 | contains the API functions required by <application>Ruby</application>
|
---|
374 | </para>
|
---|
375 | <indexterm zone="ruby libruby">
|
---|
376 | <primary sortas="c-libruby">libruby.so</primary>
|
---|
377 | </indexterm>
|
---|
378 | </listitem>
|
---|
379 | </varlistentry>
|
---|
380 |
|
---|
381 | </variablelist>
|
---|
382 |
|
---|
383 | </sect2>
|
---|
384 |
|
---|
385 | </sect1>
|
---|