[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[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 " ">
|
---|
[25a9be8a] | 9 | <!ENTITY ruby-md5sum "377853f31d10bfe37c58b8537fc3e05d">
|
---|
[de944b9] | 10 | <!ENTITY ruby-size "14 MB">
|
---|
[25a9be8a] | 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)">
|
---|
[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 |
|
---|
[15445ab] | 34 | &lfs113_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">
|
---|
[82fac2c] | 79 | <xref linkend="db"/>,
|
---|
[955b7fd2] | 80 | <xref linkend="doxygen"/>,
|
---|
[cc13920] | 81 | <xref linkend="graphviz"/>,
|
---|
[382633a] | 82 | <xref linkend="rust"/>,
|
---|
[d28648d] | 83 | <xref linkend="tk"/>,
|
---|
| 84 | <xref linkend="valgrind"/>, and
|
---|
| 85 | <ulink url="http://dtrace.org/blogs/about/">DTrace</ulink>
|
---|
[955b7fd2] | 86 | </para>
|
---|
[16f3afb3] | 87 |
|
---|
[1039de3] | 88 | <para condition="html" role="usernotes">User Notes:
|
---|
[cc13920] | 89 | <ulink url="&blfs-wiki;/ruby"/>
|
---|
| 90 | </para>
|
---|
[16f3afb3] | 91 | </sect2>
|
---|
| 92 |
|
---|
| 93 | <sect2 role="installation">
|
---|
| 94 | <title>Installation of Ruby</title>
|
---|
| 95 |
|
---|
[cc13920] | 96 | <para>
|
---|
| 97 | Install <application>Ruby</application> by running the following
|
---|
[75457cc] | 98 | command:
|
---|
[cc13920] | 99 | </para>
|
---|
[16f3afb3] | 100 |
|
---|
[33c11ec1] | 101 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 102 | --enable-shared \
|
---|
| 103 | --without-valgrind \
|
---|
[25a9be8a] | 104 | --without-baseruby \
|
---|
[e02c1e3] | 105 | --docdir=/usr/share/doc/ruby-&ruby-version; &&
|
---|
| 106 | make</userinput></screen>
|
---|
[75457cc] | 107 |
|
---|
| 108 | <para>
|
---|
| 109 | Optionally, build the CAPI documents by running the following
|
---|
| 110 | commands:
|
---|
| 111 | </para>
|
---|
| 112 |
|
---|
[e02c1e3] | 113 | <screen><userinput>make capi</userinput></screen>
|
---|
[16f3afb3] | 114 |
|
---|
[25a9be8a] | 115 | <para>
|
---|
| 116 | The tests require that the new version of Ruby is already installed to
|
---|
| 117 | run correctly. If you want to run the tests, execute them after installing
|
---|
| 118 | the package. <!-- Ticket #17887 -->
|
---|
| 119 | </para>
|
---|
| 120 |
|
---|
| 121 | <para>
|
---|
| 122 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 123 | </para>
|
---|
| 124 |
|
---|
| 125 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 126 |
|
---|
[cc13920] | 127 | <para>
|
---|
[e6b445c] | 128 | To test the results, issue: <command>make check</command>. There are over
|
---|
[de944b9] | 129 | 25,000 tests. Some tests related to ipv6 may indicate errors. If the
|
---|
[372597e] | 130 | tests are run in a directory that has a world writable component (e.g.
|
---|
[c6d1a80c] | 131 | /tmp) then several additional tests may fail. A few tests may fail due
|
---|
[e4c4af6] | 132 | to system configuration expectations.
|
---|
[cc13920] | 133 | </para>
|
---|
[25a9be8a] | 134 |
|
---|
[8558044] | 135 | <!-- With 3.0.2:
|
---|
[de944b9] | 136 | Finished tests in 443.541527s, 47.5739 tests/s, 6031.9921 assertions/s.
|
---|
[54d58907] | 137 | 21101 tests, 2675439 assertions, 4 failures, 1 errors, 45 skips
|
---|
[de944b9] | 138 |
|
---|
| 139 | with 3.2.0 there are several summaries:
|
---|
| 140 | * PASS all 1789 tests
|
---|
| 141 | * Finished tests in 6.815561s, 45.6309 tests/s, 264.2482 assertions/s.
|
---|
| 142 | 311 tests, 1801 assertions, 0 failures, 0 errors, 12 skips
|
---|
| 143 | * Finished tests in 462.613063s, 50.5649 tests/s, 12069.0885 assertions/s.
|
---|
| 144 | 23392 tests, 5583318 assertions, 3 failures, 0 errors, 79 skips
|
---|
| 145 | -->
|
---|
[40d6bab] | 146 |
|
---|
[edfcf34d] | 147 | <note>
|
---|
| 148 | <para>
|
---|
| 149 | If you have Ruby-On-Rails applications installed and did an
|
---|
| 150 | upgrade of <application>Ruby</application> by installing this
|
---|
[eb19100e] | 151 | package, you might need to run an update there, too
|
---|
| 152 | (as the &root; user):
|
---|
[edfcf34d] | 153 | </para>
|
---|
| 154 |
|
---|
[eb19100e] | 155 | <screen role="nodump"><userinput>cd /path/to/web/app
|
---|
[809c6b5] | 156 | bundle update rake</userinput></screen>
|
---|
| 157 |
|
---|
| 158 | <para>
|
---|
| 159 | and restart the webserver which serves the application.
|
---|
| 160 | </para>
|
---|
| 161 |
|
---|
[edfcf34d] | 162 | </note>
|
---|
| 163 |
|
---|
[16f3afb3] | 164 | </sect2>
|
---|
| 165 |
|
---|
| 166 | <sect2 role="commands">
|
---|
| 167 | <title>Command Explanations</title>
|
---|
| 168 |
|
---|
[b9d56ad4] | 169 | <para>
|
---|
[0771e2f] | 170 | <parameter>--enable-shared</parameter>: This switch enables building
|
---|
[cc13920] | 171 | the <filename class="libraryfile">libruby</filename> shared library.
|
---|
| 172 | </para>
|
---|
[16f3afb3] | 173 |
|
---|
[25a9be8a] | 174 | <para>
|
---|
| 175 | <parameter>--without-baseruby</parameter>: This switch prevents using the
|
---|
| 176 | system <command>ruby</command> if it is already installed. The build
|
---|
| 177 | system will use the newly built version instead.
|
---|
| 178 | </para>
|
---|
| 179 |
|
---|
[5d388f2] | 180 | <para>
|
---|
| 181 | <option>--disable-install-doc</option>: This switch disables building and
|
---|
| 182 | installing rdoc indexes and C API documents.
|
---|
| 183 | </para>
|
---|
| 184 |
|
---|
| 185 | <para>
|
---|
| 186 | <option>--disable-install-rdoc</option>: This switch disables building
|
---|
| 187 | and installing rdoc indexes.
|
---|
| 188 | </para>
|
---|
| 189 |
|
---|
| 190 | <para>
|
---|
| 191 | <option>--disable-install-capi</option>: This switch disables building
|
---|
| 192 | and installing C API documents.
|
---|
| 193 | </para>
|
---|
| 194 |
|
---|
[16f3afb3] | 195 | </sect2>
|
---|
| 196 |
|
---|
| 197 | <sect2 role="content">
|
---|
| 198 | <title>Contents</title>
|
---|
| 199 |
|
---|
| 200 | <segmentedlist>
|
---|
| 201 | <segtitle>Installed Programs</segtitle>
|
---|
| 202 | <segtitle>Installed Libraries</segtitle>
|
---|
| 203 | <segtitle>Installed Directories</segtitle>
|
---|
| 204 |
|
---|
| 205 | <seglistitem>
|
---|
[cc13920] | 206 | <seg>
|
---|
[8558044] | 207 | bundle,
|
---|
| 208 | bundler,
|
---|
| 209 | erb,
|
---|
| 210 | gem,
|
---|
| 211 | irb,
|
---|
| 212 | racc,
|
---|
| 213 | rake,
|
---|
| 214 | rbs,
|
---|
[6b8f495] | 215 | rdbg,
|
---|
[8558044] | 216 | rdoc,
|
---|
| 217 | ri,
|
---|
[e4c4af6] | 218 | ruby, and
|
---|
| 219 | typeprof
|
---|
[cc13920] | 220 | </seg>
|
---|
| 221 | <seg>
|
---|
[d28648d] | 222 | libruby.so
|
---|
[cc13920] | 223 | </seg>
|
---|
| 224 | <seg>
|
---|
[6b8f495] | 225 | /usr/include/ruby-&ruby-minor-version;.0,
|
---|
[cc13920] | 226 | /usr/lib/ruby,
|
---|
[7cc1bcd] | 227 | /usr/share/doc/ruby-&ruby-version; and
|
---|
[cc13920] | 228 | /usr/share/ri
|
---|
| 229 | </seg>
|
---|
[16f3afb3] | 230 | </seglistitem>
|
---|
| 231 | </segmentedlist>
|
---|
| 232 |
|
---|
| 233 | <variablelist>
|
---|
| 234 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 235 | <?dbfo list-presentation="list"?>
|
---|
| 236 | <?dbhtml list-presentation="table"?>
|
---|
| 237 |
|
---|
[d28648d] | 238 | <varlistentry id="bundle">
|
---|
| 239 | <term><command>bundle</command></term>
|
---|
| 240 | <listitem>
|
---|
| 241 | <para>
|
---|
[4c24eb0a] | 242 | creates bundles of Ruby Gems
|
---|
[d28648d] | 243 | </para>
|
---|
| 244 | <indexterm zone="ruby bundle">
|
---|
| 245 | <primary sortas="b-bundle">bundle</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
| 249 |
|
---|
| 250 | <varlistentry id="bundler">
|
---|
| 251 | <term><command>bundler</command></term>
|
---|
| 252 | <listitem>
|
---|
| 253 | <para>
|
---|
[4c24eb0a] | 254 | manages an application's dependencies throughout it's lifecycle
|
---|
[d28648d] | 255 | </para>
|
---|
| 256 | <indexterm zone="ruby bundler">
|
---|
| 257 | <primary sortas="b-bundler">bundler</primary>
|
---|
| 258 | </indexterm>
|
---|
| 259 | </listitem>
|
---|
| 260 | </varlistentry>
|
---|
| 261 |
|
---|
[909a015] | 262 | <varlistentry id="erb">
|
---|
| 263 | <term><command>erb</command></term>
|
---|
[16f3afb3] | 264 | <listitem>
|
---|
[cc13920] | 265 | <para>
|
---|
[0771e2f] | 266 | is a command line front-end for eRuby, which provides a templating
|
---|
| 267 | system for <application>Ruby</application>
|
---|
[cc13920] | 268 | </para>
|
---|
[909a015] | 269 | <indexterm zone="ruby erb">
|
---|
| 270 | <primary sortas="b-erb">erb</primary>
|
---|
| 271 | </indexterm>
|
---|
| 272 | </listitem>
|
---|
| 273 | </varlistentry>
|
---|
| 274 |
|
---|
| 275 | <varlistentry id="gem">
|
---|
| 276 | <term><command>gem</command></term>
|
---|
| 277 | <listitem>
|
---|
| 278 | <para>
|
---|
[0771e2f] | 279 | is the command for RubyGems, which is a sophisticated package
|
---|
| 280 | manager for <application>Ruby</application>. This is similar
|
---|
| 281 | to Python's 'pip' command
|
---|
[909a015] | 282 | </para>
|
---|
| 283 | <indexterm zone="ruby gem">
|
---|
| 284 | <primary sortas="b-gem">gem</primary>
|
---|
[16f3afb3] | 285 | </indexterm>
|
---|
| 286 | </listitem>
|
---|
| 287 | </varlistentry>
|
---|
| 288 |
|
---|
| 289 | <varlistentry id="irb">
|
---|
| 290 | <term><command>irb</command></term>
|
---|
| 291 | <listitem>
|
---|
[cc13920] | 292 | <para>
|
---|
| 293 | is the interactive interface for
|
---|
[4c24eb0a] | 294 | <application>Ruby</application>
|
---|
[cc13920] | 295 | </para>
|
---|
[16f3afb3] | 296 | <indexterm zone="ruby irb">
|
---|
| 297 | <primary sortas="b-irb">irb</primary>
|
---|
| 298 | </indexterm>
|
---|
| 299 | </listitem>
|
---|
| 300 | </varlistentry>
|
---|
| 301 |
|
---|
[909a015] | 302 | <varlistentry id="rake">
|
---|
| 303 | <term><command>rake</command></term>
|
---|
[16f3afb3] | 304 | <listitem>
|
---|
[cc13920] | 305 | <para>
|
---|
[0771e2f] | 306 | is a make-like build utility for <application>Ruby</application>
|
---|
[cc13920] | 307 | </para>
|
---|
[909a015] | 308 | <indexterm zone="ruby rake">
|
---|
| 309 | <primary sortas="b-rake">rake</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
[6b8f495] | 314 | <varlistentry id="rdbg">
|
---|
| 315 | <term><command>rdbg</command></term>
|
---|
| 316 | <listitem>
|
---|
| 317 | <para>
|
---|
| 318 | is an interactive debugger for <application>Ruby</application>
|
---|
| 319 | </para>
|
---|
| 320 | <indexterm zone="ruby rdbg">
|
---|
| 321 | <primary sortas="b-rdbg">rdbg</primary>
|
---|
| 322 | </indexterm>
|
---|
| 323 | </listitem>
|
---|
| 324 | </varlistentry>
|
---|
| 325 |
|
---|
[909a015] | 326 | <varlistentry id="rdoc">
|
---|
| 327 | <term><command>rdoc</command></term>
|
---|
| 328 | <listitem>
|
---|
| 329 | <para>
|
---|
[4c24eb0a] | 330 | generates <application>Ruby</application> documentation
|
---|
[909a015] | 331 | </para>
|
---|
| 332 | <indexterm zone="ruby rdoc">
|
---|
| 333 | <primary sortas="b-rdoc">rdoc</primary>
|
---|
[16f3afb3] | 334 | </indexterm>
|
---|
| 335 | </listitem>
|
---|
| 336 | </varlistentry>
|
---|
| 337 |
|
---|
| 338 | <varlistentry id="ri">
|
---|
| 339 | <term><command>ri</command></term>
|
---|
| 340 | <listitem>
|
---|
[cc13920] | 341 | <para>
|
---|
| 342 | displays documentation from a database on
|
---|
[4c24eb0a] | 343 | <application>Ruby</application> classes, modules, and methods
|
---|
[cc13920] | 344 | </para>
|
---|
[16f3afb3] | 345 | <indexterm zone="ruby ri">
|
---|
| 346 | <primary sortas="b-ri">ri</primary>
|
---|
| 347 | </indexterm>
|
---|
| 348 | </listitem>
|
---|
| 349 | </varlistentry>
|
---|
| 350 |
|
---|
[909a015] | 351 | <varlistentry id="ruby-prog">
|
---|
| 352 | <term><command>ruby</command></term>
|
---|
| 353 | <listitem>
|
---|
| 354 | <para>
|
---|
| 355 | is an interpreted scripting language for quick
|
---|
[4c24eb0a] | 356 | and easy object-oriented programming
|
---|
[909a015] | 357 | </para>
|
---|
| 358 | <indexterm zone="ruby ruby-prog">
|
---|
| 359 | <primary sortas="b-ruby">ruby</primary>
|
---|
| 360 | </indexterm>
|
---|
| 361 | </listitem>
|
---|
| 362 | </varlistentry>
|
---|
| 363 |
|
---|
[16f3afb3] | 364 | <varlistentry id="libruby">
|
---|
[92b0b42] | 365 | <term><filename role="libraryfile">libruby.so</filename></term>
|
---|
[16f3afb3] | 366 | <listitem>
|
---|
[cc13920] | 367 | <para>
|
---|
[4c24eb0a] | 368 | contains the API functions required by <application>Ruby</application>
|
---|
[cc13920] | 369 | </para>
|
---|
[16f3afb3] | 370 | <indexterm zone="ruby libruby">
|
---|
| 371 | <primary sortas="c-libruby">libruby.so</primary>
|
---|
| 372 | </indexterm>
|
---|
| 373 | </listitem>
|
---|
| 374 | </varlistentry>
|
---|
| 375 |
|
---|
| 376 | </variablelist>
|
---|
| 377 |
|
---|
| 378 | </sect2>
|
---|
[a1f7daa] | 379 |
|
---|
| 380 | </sect1>
|
---|