source: general/prog/ruby.xml@ d0c049f

trunk
Last change on this file since d0c049f was 497d485, checked in by Xi Ruoyao <xry111@…>, 3 weeks ago

Update or remove broken URLs

Reported-by: rhubarbpieguy@…
Suggested-by: Vladimir Pertsev <info@…>

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