[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[cc13920] | 6 |
|
---|
[c6b192c] | 7 | <!ENTITY ruby-download-http "https://cache.ruby-lang.org/pub/ruby/&ruby-minor-version;/ruby-&ruby-version;.tar.xz">
|
---|
[2f3226d] | 8 | <!ENTITY ruby-download-ftp " ">
|
---|
[27f6955] | 9 | <!ENTITY ruby-md5sum "0931370806081135e80f4be24d4b27ed">
|
---|
[c4f5f1e] | 10 | <!ENTITY ruby-size "16 MB">
|
---|
[27f6955] | 11 | <!ENTITY ruby-buildsize "663 MB (with tests and C API docs)">
|
---|
[c4f5f1e] | 12 | <!ENTITY ruby-time "3.4 SBU (using parallelism=4; with tests and C API docs)">
|
---|
[52d29f7] | 13 | ]>
|
---|
| 14 |
|
---|
[5db3785e] | 15 | <sect1 id="ruby" xreflabel="Ruby-&ruby-version;">
|
---|
[16f3afb3] | 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 |
|
---|
[cc13920] | 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>
|
---|
[16f3afb3] | 33 |
|
---|
[5d0e7b8] | 34 | &lfs121_checked;
|
---|
[a1813d08] | 35 |
|
---|
[16f3afb3] | 36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem>
|
---|
[cc13920] | 39 | <para>
|
---|
| 40 | Download (HTTP): <ulink url="&ruby-download-http;"/>
|
---|
| 41 | </para>
|
---|
[16f3afb3] | 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
[cc13920] | 44 | <para>
|
---|
| 45 | Download (FTP): <ulink url="&ruby-download-ftp;"/>
|
---|
| 46 | </para>
|
---|
[16f3afb3] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[cc13920] | 49 | <para>
|
---|
| 50 | Download MD5 sum: &ruby-md5sum;
|
---|
| 51 | </para>
|
---|
[16f3afb3] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[cc13920] | 54 | <para>
|
---|
| 55 | Download size: &ruby-size;
|
---|
| 56 | </para>
|
---|
[16f3afb3] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[cc13920] | 59 | <para>
|
---|
| 60 | Estimated disk space required: &ruby-buildsize;
|
---|
| 61 | </para>
|
---|
[16f3afb3] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[cc13920] | 64 | <para>
|
---|
| 65 | Estimated build time: &ruby-time;
|
---|
| 66 | </para>
|
---|
[16f3afb3] | 67 | </listitem>
|
---|
| 68 | </itemizedlist>
|
---|
| 69 |
|
---|
| 70 | <bridgehead renderas="sect3">Ruby Dependencies</bridgehead>
|
---|
| 71 |
|
---|
[dbdd6ff4] | 72 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 73 | <para role="required">
|
---|
| 74 | <xref linkend="libyaml"/>
|
---|
| 75 | </para>
|
---|
| 76 |
|
---|
[16f3afb3] | 77 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[955b7fd2] | 78 | <para role="optional">
|
---|
| 79 | <xref linkend="doxygen"/>,
|
---|
[cc13920] | 80 | <xref linkend="graphviz"/>,
|
---|
[382633a] | 81 | <xref linkend="rust"/>,
|
---|
[d28648d] | 82 | <xref linkend="tk"/>,
|
---|
[dcd5a063] | 83 | <xref linkend="valgrind"/>,
|
---|
| 84 | &berkeley-db; and
|
---|
[497d485] | 85 | <ulink url="https://dtrace.org/about/">DTrace</ulink>
|
---|
[955b7fd2] | 86 | </para>
|
---|
[16f3afb3] | 87 |
|
---|
| 88 | </sect2>
|
---|
| 89 |
|
---|
| 90 | <sect2 role="installation">
|
---|
| 91 | <title>Installation of Ruby</title>
|
---|
[33884d36] | 92 |
|
---|
[cc13920] | 93 | <para>
|
---|
| 94 | Install <application>Ruby</application> by running the following
|
---|
[75457cc] | 95 | command:
|
---|
[cc13920] | 96 | </para>
|
---|
[16f3afb3] | 97 |
|
---|
[77b45595] | 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 \
|
---|
[e02c1e3] | 104 | --docdir=/usr/share/doc/ruby-&ruby-version; &&
|
---|
| 105 | make</userinput></screen>
|
---|
[75457cc] | 106 |
|
---|
| 107 | <para>
|
---|
| 108 | Optionally, build the CAPI documents by running the following
|
---|
| 109 | commands:
|
---|
| 110 | </para>
|
---|
| 111 |
|
---|
[e02c1e3] | 112 | <screen><userinput>make capi</userinput></screen>
|
---|
[16f3afb3] | 113 |
|
---|
[cc13920] | 114 | <para>
|
---|
[0905b41] | 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
|
---|
[27f6955] | 123 | <computeroutput>net/ftp is not found</computeroutput>. Make sure that you
|
---|
| 124 | unset these variables for the test suite. There are over 26,000 tests.
|
---|
[0905b41] | 125 | <!-- https://bugs.ruby-lang.org/issues/20106 -->
|
---|
| 126 | 12 tests are known to fail because of expired certificates in the
|
---|
[551641f] | 127 | test data.
|
---|
| 128 | <!-- https://github.com/ruby/ruby/pull/10616
|
---|
| 129 | https://github.com/ruby/ruby/commit/dd5e625d7bcb -->
|
---|
| 130 | Three tests named
|
---|
| 131 | <literal>TestNetHTTPS#test_session_reuse_but_expire</literal>,
|
---|
| 132 | <literal>OpenSSL::TestASN1#test_utctime</literal>, and
|
---|
| 133 | <literal>OpenSSL::TestASN1#test_generalizedtime</literal> are known
|
---|
| 134 | to fail with OpenSSL-3.3.0 or later.
|
---|
| 135 | Some tests related to ipv6 may indicate errors. If the
|
---|
[372597e] | 136 | tests are run in a directory that has a world writable component (e.g.
|
---|
[5b78d1c] | 137 | /tmp) then several additional tests may fail.
|
---|
[cc13920] | 138 | </para>
|
---|
[25a9be8a] | 139 |
|
---|
[c4f5f1e] | 140 | <para>
|
---|
| 141 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 142 | </para>
|
---|
| 143 |
|
---|
| 144 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 145 |
|
---|
[edfcf34d] | 146 | <note>
|
---|
| 147 | <para>
|
---|
| 148 | If you have Ruby-On-Rails applications installed and did an
|
---|
| 149 | upgrade of <application>Ruby</application> by installing this
|
---|
[eb19100e] | 150 | package, you might need to run an update there, too
|
---|
| 151 | (as the &root; user):
|
---|
[edfcf34d] | 152 | </para>
|
---|
| 153 |
|
---|
[eb19100e] | 154 | <screen role="nodump"><userinput>cd /path/to/web/app
|
---|
[809c6b5] | 155 | bundle update rake</userinput></screen>
|
---|
| 156 |
|
---|
| 157 | <para>
|
---|
| 158 | and restart the webserver which serves the application.
|
---|
| 159 | </para>
|
---|
| 160 |
|
---|
[edfcf34d] | 161 | </note>
|
---|
| 162 |
|
---|
[16f3afb3] | 163 | </sect2>
|
---|
| 164 |
|
---|
| 165 | <sect2 role="commands">
|
---|
| 166 | <title>Command Explanations</title>
|
---|
| 167 |
|
---|
[fbb82131] | 168 | <para>
|
---|
| 169 | <parameter>--disable-rpath</parameter>: This switch disables embedding
|
---|
| 170 | <filename class='directory'>/usr/lib</filename> as a library search
|
---|
| 171 | path into the <command>ruby</command> program. Doing so is not needed
|
---|
| 172 | (because <filename class='directory'>/usr/lib</filename> is a system
|
---|
| 173 | library path) and it may cause the test suite running with the system
|
---|
| 174 | <filename class='libraryfile'>libruby.so</filename> instead of the
|
---|
| 175 | just built one when Ruby has been installed.
|
---|
| 176 | </para>
|
---|
| 177 |
|
---|
[b9d56ad4] | 178 | <para>
|
---|
[0771e2f] | 179 | <parameter>--enable-shared</parameter>: This switch enables building
|
---|
[cc13920] | 180 | the <filename class="libraryfile">libruby</filename> shared library.
|
---|
| 181 | </para>
|
---|
[16f3afb3] | 182 |
|
---|
[25a9be8a] | 183 | <para>
|
---|
| 184 | <parameter>--without-baseruby</parameter>: This switch prevents using the
|
---|
| 185 | system <command>ruby</command> if it is already installed. The build
|
---|
| 186 | system will use the newly built version instead.
|
---|
| 187 | </para>
|
---|
| 188 |
|
---|
[77b45595] | 189 | <para>
|
---|
| 190 | <parameter>ac_cv_func_qsort_r=no</parameter>: This switch prevents
|
---|
| 191 | using the <function>qsort_r</function> function from Glibc. Ruby
|
---|
[8f9d03f] | 192 | makes some aggressive optimization assuming some implementation
|
---|
| 193 | details of the sorting algorithm, but the assumption is not true with
|
---|
| 194 | the Glibc implementation. With this switch Ruby will use its own sort
|
---|
[77b45595] | 195 | implementation instead.
|
---|
| 196 | </para>
|
---|
| 197 |
|
---|
[5d388f2] | 198 | <para>
|
---|
| 199 | <option>--disable-install-doc</option>: This switch disables building and
|
---|
| 200 | installing rdoc indexes and C API documents.
|
---|
| 201 | </para>
|
---|
| 202 |
|
---|
| 203 | <para>
|
---|
| 204 | <option>--disable-install-rdoc</option>: This switch disables building
|
---|
| 205 | and installing rdoc indexes.
|
---|
| 206 | </para>
|
---|
| 207 |
|
---|
| 208 | <para>
|
---|
| 209 | <option>--disable-install-capi</option>: This switch disables building
|
---|
| 210 | and installing C API documents.
|
---|
| 211 | </para>
|
---|
| 212 |
|
---|
[16f3afb3] | 213 | </sect2>
|
---|
| 214 |
|
---|
| 215 | <sect2 role="content">
|
---|
| 216 | <title>Contents</title>
|
---|
| 217 |
|
---|
| 218 | <segmentedlist>
|
---|
| 219 | <segtitle>Installed Programs</segtitle>
|
---|
| 220 | <segtitle>Installed Libraries</segtitle>
|
---|
| 221 | <segtitle>Installed Directories</segtitle>
|
---|
| 222 |
|
---|
| 223 | <seglistitem>
|
---|
[cc13920] | 224 | <seg>
|
---|
[8558044] | 225 | bundle,
|
---|
| 226 | bundler,
|
---|
| 227 | erb,
|
---|
| 228 | gem,
|
---|
| 229 | irb,
|
---|
| 230 | racc,
|
---|
| 231 | rake,
|
---|
| 232 | rbs,
|
---|
[6b8f495] | 233 | rdbg,
|
---|
[8558044] | 234 | rdoc,
|
---|
| 235 | ri,
|
---|
[e4c4af6] | 236 | ruby, and
|
---|
| 237 | typeprof
|
---|
[cc13920] | 238 | </seg>
|
---|
| 239 | <seg>
|
---|
[d28648d] | 240 | libruby.so
|
---|
[cc13920] | 241 | </seg>
|
---|
| 242 | <seg>
|
---|
[6b8f495] | 243 | /usr/include/ruby-&ruby-minor-version;.0,
|
---|
[cc13920] | 244 | /usr/lib/ruby,
|
---|
[7cc1bcd] | 245 | /usr/share/doc/ruby-&ruby-version; and
|
---|
[cc13920] | 246 | /usr/share/ri
|
---|
| 247 | </seg>
|
---|
[16f3afb3] | 248 | </seglistitem>
|
---|
| 249 | </segmentedlist>
|
---|
| 250 |
|
---|
| 251 | <variablelist>
|
---|
| 252 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 253 | <?dbfo list-presentation="list"?>
|
---|
| 254 | <?dbhtml list-presentation="table"?>
|
---|
| 255 |
|
---|
[d28648d] | 256 | <varlistentry id="bundle">
|
---|
| 257 | <term><command>bundle</command></term>
|
---|
| 258 | <listitem>
|
---|
| 259 | <para>
|
---|
[4c24eb0a] | 260 | creates bundles of Ruby Gems
|
---|
[d28648d] | 261 | </para>
|
---|
| 262 | <indexterm zone="ruby bundle">
|
---|
| 263 | <primary sortas="b-bundle">bundle</primary>
|
---|
| 264 | </indexterm>
|
---|
| 265 | </listitem>
|
---|
| 266 | </varlistentry>
|
---|
| 267 |
|
---|
| 268 | <varlistentry id="bundler">
|
---|
| 269 | <term><command>bundler</command></term>
|
---|
| 270 | <listitem>
|
---|
| 271 | <para>
|
---|
[4c24eb0a] | 272 | manages an application's dependencies throughout it's lifecycle
|
---|
[d28648d] | 273 | </para>
|
---|
| 274 | <indexterm zone="ruby bundler">
|
---|
| 275 | <primary sortas="b-bundler">bundler</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
[909a015] | 280 | <varlistentry id="erb">
|
---|
| 281 | <term><command>erb</command></term>
|
---|
[16f3afb3] | 282 | <listitem>
|
---|
[cc13920] | 283 | <para>
|
---|
[0771e2f] | 284 | is a command line front-end for eRuby, which provides a templating
|
---|
| 285 | system for <application>Ruby</application>
|
---|
[cc13920] | 286 | </para>
|
---|
[909a015] | 287 | <indexterm zone="ruby erb">
|
---|
| 288 | <primary sortas="b-erb">erb</primary>
|
---|
| 289 | </indexterm>
|
---|
| 290 | </listitem>
|
---|
| 291 | </varlistentry>
|
---|
| 292 |
|
---|
| 293 | <varlistentry id="gem">
|
---|
| 294 | <term><command>gem</command></term>
|
---|
| 295 | <listitem>
|
---|
| 296 | <para>
|
---|
[0771e2f] | 297 | is the command for RubyGems, which is a sophisticated package
|
---|
| 298 | manager for <application>Ruby</application>. This is similar
|
---|
| 299 | to Python's 'pip' command
|
---|
[909a015] | 300 | </para>
|
---|
| 301 | <indexterm zone="ruby gem">
|
---|
| 302 | <primary sortas="b-gem">gem</primary>
|
---|
[16f3afb3] | 303 | </indexterm>
|
---|
| 304 | </listitem>
|
---|
| 305 | </varlistentry>
|
---|
| 306 |
|
---|
| 307 | <varlistentry id="irb">
|
---|
| 308 | <term><command>irb</command></term>
|
---|
| 309 | <listitem>
|
---|
[cc13920] | 310 | <para>
|
---|
| 311 | is the interactive interface for
|
---|
[4c24eb0a] | 312 | <application>Ruby</application>
|
---|
[cc13920] | 313 | </para>
|
---|
[16f3afb3] | 314 | <indexterm zone="ruby irb">
|
---|
| 315 | <primary sortas="b-irb">irb</primary>
|
---|
| 316 | </indexterm>
|
---|
| 317 | </listitem>
|
---|
| 318 | </varlistentry>
|
---|
| 319 |
|
---|
[909a015] | 320 | <varlistentry id="rake">
|
---|
| 321 | <term><command>rake</command></term>
|
---|
[16f3afb3] | 322 | <listitem>
|
---|
[cc13920] | 323 | <para>
|
---|
[0771e2f] | 324 | is a make-like build utility for <application>Ruby</application>
|
---|
[cc13920] | 325 | </para>
|
---|
[909a015] | 326 | <indexterm zone="ruby rake">
|
---|
| 327 | <primary sortas="b-rake">rake</primary>
|
---|
| 328 | </indexterm>
|
---|
| 329 | </listitem>
|
---|
| 330 | </varlistentry>
|
---|
| 331 |
|
---|
[6b8f495] | 332 | <varlistentry id="rdbg">
|
---|
| 333 | <term><command>rdbg</command></term>
|
---|
| 334 | <listitem>
|
---|
| 335 | <para>
|
---|
| 336 | is an interactive debugger for <application>Ruby</application>
|
---|
| 337 | </para>
|
---|
| 338 | <indexterm zone="ruby rdbg">
|
---|
| 339 | <primary sortas="b-rdbg">rdbg</primary>
|
---|
| 340 | </indexterm>
|
---|
| 341 | </listitem>
|
---|
| 342 | </varlistentry>
|
---|
| 343 |
|
---|
[909a015] | 344 | <varlistentry id="rdoc">
|
---|
| 345 | <term><command>rdoc</command></term>
|
---|
| 346 | <listitem>
|
---|
| 347 | <para>
|
---|
[4c24eb0a] | 348 | generates <application>Ruby</application> documentation
|
---|
[909a015] | 349 | </para>
|
---|
| 350 | <indexterm zone="ruby rdoc">
|
---|
| 351 | <primary sortas="b-rdoc">rdoc</primary>
|
---|
[16f3afb3] | 352 | </indexterm>
|
---|
| 353 | </listitem>
|
---|
| 354 | </varlistentry>
|
---|
| 355 |
|
---|
| 356 | <varlistentry id="ri">
|
---|
| 357 | <term><command>ri</command></term>
|
---|
| 358 | <listitem>
|
---|
[cc13920] | 359 | <para>
|
---|
| 360 | displays documentation from a database on
|
---|
[4c24eb0a] | 361 | <application>Ruby</application> classes, modules, and methods
|
---|
[cc13920] | 362 | </para>
|
---|
[16f3afb3] | 363 | <indexterm zone="ruby ri">
|
---|
| 364 | <primary sortas="b-ri">ri</primary>
|
---|
| 365 | </indexterm>
|
---|
| 366 | </listitem>
|
---|
| 367 | </varlistentry>
|
---|
| 368 |
|
---|
[909a015] | 369 | <varlistentry id="ruby-prog">
|
---|
| 370 | <term><command>ruby</command></term>
|
---|
| 371 | <listitem>
|
---|
| 372 | <para>
|
---|
| 373 | is an interpreted scripting language for quick
|
---|
[4c24eb0a] | 374 | and easy object-oriented programming
|
---|
[909a015] | 375 | </para>
|
---|
| 376 | <indexterm zone="ruby ruby-prog">
|
---|
| 377 | <primary sortas="b-ruby">ruby</primary>
|
---|
| 378 | </indexterm>
|
---|
| 379 | </listitem>
|
---|
| 380 | </varlistentry>
|
---|
| 381 |
|
---|
[16f3afb3] | 382 | <varlistentry id="libruby">
|
---|
[92b0b42] | 383 | <term><filename role="libraryfile">libruby.so</filename></term>
|
---|
[16f3afb3] | 384 | <listitem>
|
---|
[cc13920] | 385 | <para>
|
---|
[4c24eb0a] | 386 | contains the API functions required by <application>Ruby</application>
|
---|
[cc13920] | 387 | </para>
|
---|
[16f3afb3] | 388 | <indexterm zone="ruby libruby">
|
---|
| 389 | <primary sortas="c-libruby">libruby.so</primary>
|
---|
| 390 | </indexterm>
|
---|
| 391 | </listitem>
|
---|
| 392 | </varlistentry>
|
---|
| 393 |
|
---|
| 394 | </variablelist>
|
---|
| 395 |
|
---|
| 396 | </sect2>
|
---|
[a1f7daa] | 397 |
|
---|
| 398 | </sect1>
|
---|