source: general/prog/ruby.xml

trunk
Last change on this file was 3c95c92, checked in by Xi Ruoyao <xry111@…>, 5 days ago

ruby: Test uses internet

It downloads 6 ruby gems for testing.

  • Property mode set to 100644
File size: 12.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 "0931370806081135e80f4be24d4b27ed">
10 <!ENTITY ruby-size "16 MB">
11 <!ENTITY ruby-buildsize "663 MB (with tests and C API docs)">
12 <!ENTITY ruby-time "3.4 SBU (using parallelism=4; with tests and 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 &lfs121_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="doxygen"/>,
80 <xref linkend="graphviz"/>,
81 <xref linkend="rust"/>,
82 <xref linkend="tk"/>,
83 <xref linkend="valgrind"/>,
84 &berkeley-db; and
85 <ulink url="https://dtrace.org/about/">DTrace</ulink>
86 </para>
87
88 &test-use-internet;
89
90 </sect2>
91
92 <sect2 role="installation">
93 <title>Installation of Ruby</title>
94
95 <para>
96 Install <application>Ruby</application> by running the following
97 command:
98 </para>
99
100<screen><userinput>./configure --prefix=/usr \
101 --disable-rpath \
102 --enable-shared \
103 --without-valgrind \
104 --without-baseruby \
105 ac_cv_func_qsort_r=no \
106 --docdir=/usr/share/doc/ruby-&ruby-version; &amp;&amp;
107make</userinput></screen>
108
109 <para>
110 Optionally, build the CAPI documents by running the following
111 commands:
112 </para>
113
114<screen><userinput>make capi</userinput></screen>
115
116 <para>
117 To test the results, issue: <command>make -j1 -k check</command>.
118 Note that running the test suite with parallel jobs may cause test
119 failures outputted as cryptic <computeroutput>unknown
120 object</computeroutput> messages, resulting a summary falsely claiming
121 <quote>all tests passed</quote>. If the environment has variables
122 related to proxy settings (<envar>all_proxy</envar>,
123 <envar>ALL_PROXY</envar>, <envar>http_proxy</envar>, and etc.) set,
124 the test suite will bail out early with messages like
125 <computeroutput>net/ftp is not found</computeroutput>. Make sure that you
126 unset these variables for the test suite. There are over 26,000 tests.
127 <!-- https://bugs.ruby-lang.org/issues/20106 -->
128 12 tests are known to fail because of expired certificates in the
129 test data.
130 <!-- https://github.com/ruby/ruby/pull/10616
131 https://github.com/ruby/ruby/commit/dd5e625d7bcb -->
132 Three tests named
133 <literal>TestNetHTTPS#test_session_reuse_but_expire</literal>,
134 <literal>OpenSSL::TestASN1#test_utctime</literal>, and
135 <literal>OpenSSL::TestASN1#test_generalizedtime</literal> are known
136 to fail with OpenSSL-3.3.0 or later.
137 Some tests related to ipv6 may indicate errors. If the
138 tests are run in a directory that has a world writable component (e.g.
139 /tmp) then several additional tests may fail.
140 </para>
141
142 <para>
143 Now, as the <systemitem class="username">root</systemitem> user:
144 </para>
145
146<screen role="root"><userinput>make install</userinput></screen>
147
148 <note>
149 <para>
150 If you have Ruby-On-Rails applications installed and did an
151 upgrade of <application>Ruby</application> by installing this
152 package, you might need to run an update there, too
153 (as the &root; user):
154 </para>
155
156<screen role="nodump"><userinput>cd /path/to/web/app
157bundle update rake</userinput></screen>
158
159 <para>
160 and restart the webserver which serves the application.
161 </para>
162
163 </note>
164
165 </sect2>
166
167 <sect2 role="commands">
168 <title>Command Explanations</title>
169
170 <para>
171 <parameter>--disable-rpath</parameter>: This switch disables embedding
172 <filename class='directory'>/usr/lib</filename> as a library search
173 path into the <command>ruby</command> program. Doing so is not needed
174 (because <filename class='directory'>/usr/lib</filename> is a system
175 library path) and it may cause the test suite running with the system
176 <filename class='libraryfile'>libruby.so</filename> instead of the
177 just built one when Ruby has been installed.
178 </para>
179
180 <para>
181 <parameter>--enable-shared</parameter>: This switch enables building
182 the <filename class="libraryfile">libruby</filename> shared library.
183 </para>
184
185 <para>
186 <parameter>--without-baseruby</parameter>: This switch prevents using the
187 system <command>ruby</command> if it is already installed. The build
188 system will use the newly built version instead.
189 </para>
190
191 <para>
192 <parameter>ac_cv_func_qsort_r=no</parameter>: This switch prevents
193 using the <function>qsort_r</function> function from Glibc. Ruby
194 makes some aggressive optimization assuming some implementation
195 details of the sorting algorithm, but the assumption is not true with
196 the Glibc implementation. With this switch Ruby will use its own sort
197 implementation instead.
198 </para>
199
200 <para>
201 <option>--disable-install-doc</option>: This switch disables building and
202 installing rdoc indexes and C API documents.
203 </para>
204
205 <para>
206 <option>--disable-install-rdoc</option>: This switch disables building
207 and installing rdoc indexes.
208 </para>
209
210 <para>
211 <option>--disable-install-capi</option>: This switch disables building
212 and installing C API documents.
213 </para>
214
215 </sect2>
216
217 <sect2 role="content">
218 <title>Contents</title>
219
220 <segmentedlist>
221 <segtitle>Installed Programs</segtitle>
222 <segtitle>Installed Libraries</segtitle>
223 <segtitle>Installed Directories</segtitle>
224
225 <seglistitem>
226 <seg>
227 bundle,
228 bundler,
229 erb,
230 gem,
231 irb,
232 racc,
233 rake,
234 rbs,
235 rdbg,
236 rdoc,
237 ri,
238 ruby, and
239 typeprof
240 </seg>
241 <seg>
242 libruby.so
243 </seg>
244 <seg>
245 /usr/include/ruby-&ruby-minor-version;.0,
246 /usr/lib/ruby,
247 /usr/share/doc/ruby-&ruby-version; and
248 /usr/share/ri
249 </seg>
250 </seglistitem>
251 </segmentedlist>
252
253 <variablelist>
254 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
255 <?dbfo list-presentation="list"?>
256 <?dbhtml list-presentation="table"?>
257
258 <varlistentry id="bundle">
259 <term><command>bundle</command></term>
260 <listitem>
261 <para>
262 creates bundles of Ruby Gems
263 </para>
264 <indexterm zone="ruby bundle">
265 <primary sortas="b-bundle">bundle</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="bundler">
271 <term><command>bundler</command></term>
272 <listitem>
273 <para>
274 manages an application's dependencies throughout it's lifecycle
275 </para>
276 <indexterm zone="ruby bundler">
277 <primary sortas="b-bundler">bundler</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="erb">
283 <term><command>erb</command></term>
284 <listitem>
285 <para>
286 is a command line front-end for eRuby, which provides a templating
287 system for <application>Ruby</application>
288 </para>
289 <indexterm zone="ruby erb">
290 <primary sortas="b-erb">erb</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="gem">
296 <term><command>gem</command></term>
297 <listitem>
298 <para>
299 is the command for RubyGems, which is a sophisticated package
300 manager for <application>Ruby</application>. This is similar
301 to Python's 'pip' command
302 </para>
303 <indexterm zone="ruby gem">
304 <primary sortas="b-gem">gem</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="irb">
310 <term><command>irb</command></term>
311 <listitem>
312 <para>
313 is the interactive interface for
314 <application>Ruby</application>
315 </para>
316 <indexterm zone="ruby irb">
317 <primary sortas="b-irb">irb</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="rake">
323 <term><command>rake</command></term>
324 <listitem>
325 <para>
326 is a make-like build utility for <application>Ruby</application>
327 </para>
328 <indexterm zone="ruby rake">
329 <primary sortas="b-rake">rake</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="rdbg">
335 <term><command>rdbg</command></term>
336 <listitem>
337 <para>
338 is an interactive debugger for <application>Ruby</application>
339 </para>
340 <indexterm zone="ruby rdbg">
341 <primary sortas="b-rdbg">rdbg</primary>
342 </indexterm>
343 </listitem>
344 </varlistentry>
345
346 <varlistentry id="rdoc">
347 <term><command>rdoc</command></term>
348 <listitem>
349 <para>
350 generates <application>Ruby</application> documentation
351 </para>
352 <indexterm zone="ruby rdoc">
353 <primary sortas="b-rdoc">rdoc</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
358 <varlistentry id="ri">
359 <term><command>ri</command></term>
360 <listitem>
361 <para>
362 displays documentation from a database on
363 <application>Ruby</application> classes, modules, and methods
364 </para>
365 <indexterm zone="ruby ri">
366 <primary sortas="b-ri">ri</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="ruby-prog">
372 <term><command>ruby</command></term>
373 <listitem>
374 <para>
375 is an interpreted scripting language for quick
376 and easy object-oriented programming
377 </para>
378 <indexterm zone="ruby ruby-prog">
379 <primary sortas="b-ruby">ruby</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="libruby">
385 <term><filename role="libraryfile">libruby.so</filename></term>
386 <listitem>
387 <para>
388 contains the API functions required by <application>Ruby</application>
389 </para>
390 <indexterm zone="ruby libruby">
391 <primary sortas="c-libruby">libruby.so</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 </variablelist>
397
398 </sect2>
399
400</sect1>
Note: See TracBrowser for help on using the repository browser.