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