[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 |
|
---|
[909a015] | 7 | <!ENTITY ruby-download-http "http://cache.ruby-lang.org/pub/ruby/&ruby-minor-version;/ruby-&ruby-version;.tar.xz">
|
---|
[2f3226d] | 8 | <!ENTITY ruby-download-ftp " ">
|
---|
[16bb2cb] | 9 | <!ENTITY ruby-md5sum "b8a4e2bdbb76485c3d6690e57be67750">
|
---|
[b0c65e84] | 10 | <!ENTITY ruby-size "11 MB">
|
---|
[16bb2cb] | 11 | <!ENTITY ruby-buildsize "423 MB (add 139 MB for C API docs)">
|
---|
| 12 | <!ENTITY ruby-time "1.2 SBU (using parallelism=4; add 3.8 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 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>Ruby-&ruby-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="ruby">
|
---|
| 26 | <primary sortas="a-Ruby">Ruby</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to Ruby</title>
|
---|
| 31 |
|
---|
[cc13920] | 32 | <para>
|
---|
| 33 | The <application>Ruby</application> package contains the
|
---|
| 34 | <application>Ruby</application> development environment. This
|
---|
| 35 | is useful for object-oriented scripting.
|
---|
| 36 | </para>
|
---|
[16f3afb3] | 37 |
|
---|
[6030130] | 38 | &lfs90_checked;
|
---|
[a1813d08] | 39 |
|
---|
[16f3afb3] | 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
[cc13920] | 43 | <para>
|
---|
| 44 | Download (HTTP): <ulink url="&ruby-download-http;"/>
|
---|
| 45 | </para>
|
---|
[16f3afb3] | 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
[cc13920] | 48 | <para>
|
---|
| 49 | Download (FTP): <ulink url="&ruby-download-ftp;"/>
|
---|
| 50 | </para>
|
---|
[16f3afb3] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[cc13920] | 53 | <para>
|
---|
| 54 | Download MD5 sum: &ruby-md5sum;
|
---|
| 55 | </para>
|
---|
[16f3afb3] | 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[cc13920] | 58 | <para>
|
---|
| 59 | Download size: &ruby-size;
|
---|
| 60 | </para>
|
---|
[16f3afb3] | 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
[cc13920] | 63 | <para>
|
---|
| 64 | Estimated disk space required: &ruby-buildsize;
|
---|
| 65 | </para>
|
---|
[16f3afb3] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
[cc13920] | 68 | <para>
|
---|
| 69 | Estimated build time: &ruby-time;
|
---|
| 70 | </para>
|
---|
[16f3afb3] | 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
| 73 |
|
---|
| 74 | <bridgehead renderas="sect3">Ruby Dependencies</bridgehead>
|
---|
| 75 |
|
---|
| 76 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[955b7fd2] | 77 | <para role="optional">
|
---|
[82fac2c] | 78 | <xref linkend="db"/>,
|
---|
[955b7fd2] | 79 | <xref linkend="doxygen"/>,
|
---|
[cc13920] | 80 | <xref linkend="graphviz"/>,
|
---|
[b738ceb] | 81 | <xref linkend="libyaml"/>,
|
---|
[d28648d] | 82 | <xref linkend="tk"/>,
|
---|
| 83 | <xref linkend="valgrind"/>, and
|
---|
| 84 | <ulink url="http://dtrace.org/blogs/about/">DTrace</ulink>
|
---|
[955b7fd2] | 85 | </para>
|
---|
[16f3afb3] | 86 |
|
---|
[1039de3] | 87 | <para condition="html" role="usernotes">User Notes:
|
---|
[cc13920] | 88 | <ulink url="&blfs-wiki;/ruby"/>
|
---|
| 89 | </para>
|
---|
[16f3afb3] | 90 | </sect2>
|
---|
| 91 |
|
---|
| 92 | <sect2 role="installation">
|
---|
| 93 | <title>Installation of Ruby</title>
|
---|
| 94 |
|
---|
[cc13920] | 95 | <para>
|
---|
| 96 | Install <application>Ruby</application> by running the following
|
---|
[75457cc] | 97 | command:
|
---|
[cc13920] | 98 | </para>
|
---|
[16f3afb3] | 99 |
|
---|
[9d4de3fb] | 100 | <screen><userinput>./configure --prefix=/usr \
|
---|
[b9d56ad4] | 101 | --enable-shared \
|
---|
[e02c1e3] | 102 | --docdir=/usr/share/doc/ruby-&ruby-version; &&
|
---|
| 103 | make</userinput></screen>
|
---|
[75457cc] | 104 |
|
---|
| 105 | <para>
|
---|
| 106 | Optionally, build the CAPI documents by running the following
|
---|
| 107 | commands:
|
---|
| 108 | </para>
|
---|
| 109 |
|
---|
[e02c1e3] | 110 | <screen><userinput>make capi</userinput></screen>
|
---|
[16f3afb3] | 111 |
|
---|
[cc13920] | 112 | <para>
|
---|
[0f73c155] | 113 | To test the results, issue: <command>make check</command>. There are
|
---|
[7eaa8018] | 114 | over 20,000 tests. Some tests (up to 0.5 percent) may fail.
|
---|
| 115 | If the tests are run in a directory
|
---|
[0f73c155] | 116 | that has a world writable component (e.g. /tmp) then several additional
|
---|
[7eaa8018] | 117 | tests may fail. Several jit (just-in-time) tests are known to fail.
|
---|
[cc13920] | 118 | </para>
|
---|
[40d6bab] | 119 |
|
---|
[cc13920] | 120 | <para>
|
---|
| 121 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 122 | </para>
|
---|
[16f3afb3] | 123 |
|
---|
| 124 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 125 |
|
---|
| 126 | </sect2>
|
---|
| 127 |
|
---|
| 128 | <sect2 role="commands">
|
---|
| 129 | <title>Command Explanations</title>
|
---|
| 130 |
|
---|
[b9d56ad4] | 131 | <para>
|
---|
| 132 | <parameter>--enable-shared</parameter>: This switch enables building of
|
---|
[cc13920] | 133 | the <filename class="libraryfile">libruby</filename> shared library.
|
---|
| 134 | </para>
|
---|
[16f3afb3] | 135 |
|
---|
[5d388f2] | 136 | <para>
|
---|
| 137 | <option>--disable-install-doc</option>: This switch disables building and
|
---|
| 138 | installing rdoc indexes and C API documents.
|
---|
| 139 | </para>
|
---|
| 140 |
|
---|
| 141 | <para>
|
---|
| 142 | <option>--disable-install-rdoc</option>: This switch disables building
|
---|
| 143 | and installing rdoc indexes.
|
---|
| 144 | </para>
|
---|
| 145 |
|
---|
| 146 | <para>
|
---|
| 147 | <option>--disable-install-capi</option>: This switch disables building
|
---|
| 148 | and installing C API documents.
|
---|
| 149 | </para>
|
---|
| 150 |
|
---|
[16f3afb3] | 151 | </sect2>
|
---|
| 152 |
|
---|
| 153 | <sect2 role="content">
|
---|
| 154 | <title>Contents</title>
|
---|
| 155 |
|
---|
| 156 | <segmentedlist>
|
---|
| 157 | <segtitle>Installed Programs</segtitle>
|
---|
| 158 | <segtitle>Installed Libraries</segtitle>
|
---|
| 159 | <segtitle>Installed Directories</segtitle>
|
---|
| 160 |
|
---|
| 161 | <seglistitem>
|
---|
[cc13920] | 162 | <seg>
|
---|
[d28648d] | 163 | bundle, bundler, erb, gem, irb, rake, rdoc, ri, and ruby
|
---|
[cc13920] | 164 | </seg>
|
---|
| 165 | <seg>
|
---|
[d28648d] | 166 | libruby.so
|
---|
[cc13920] | 167 | </seg>
|
---|
| 168 | <seg>
|
---|
[909a015] | 169 | /usr/include/ruby-&ruby-minor-version;.0
|
---|
[cc13920] | 170 | /usr/lib/ruby,
|
---|
[7cc1bcd] | 171 | /usr/share/doc/ruby-&ruby-version; and
|
---|
[cc13920] | 172 | /usr/share/ri
|
---|
| 173 | </seg>
|
---|
[16f3afb3] | 174 | </seglistitem>
|
---|
| 175 | </segmentedlist>
|
---|
| 176 |
|
---|
| 177 | <variablelist>
|
---|
| 178 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 179 | <?dbfo list-presentation="list"?>
|
---|
| 180 | <?dbhtml list-presentation="table"?>
|
---|
| 181 |
|
---|
[d28648d] | 182 | <varlistentry id="bundle">
|
---|
| 183 | <term><command>bundle</command></term>
|
---|
| 184 | <listitem>
|
---|
| 185 | <para>
|
---|
| 186 | creates bundles of Ruby Gems.
|
---|
| 187 | </para>
|
---|
| 188 | <indexterm zone="ruby bundle">
|
---|
| 189 | <primary sortas="b-bundle">bundle</primary>
|
---|
| 190 | </indexterm>
|
---|
| 191 | </listitem>
|
---|
| 192 | </varlistentry>
|
---|
| 193 |
|
---|
| 194 | <varlistentry id="bundler">
|
---|
| 195 | <term><command>bundler</command></term>
|
---|
| 196 | <listitem>
|
---|
| 197 | <para>
|
---|
| 198 | manages an application's dependencies throughout it's lifecycle.
|
---|
| 199 | </para>
|
---|
| 200 | <indexterm zone="ruby bundler">
|
---|
| 201 | <primary sortas="b-bundler">bundler</primary>
|
---|
| 202 | </indexterm>
|
---|
| 203 | </listitem>
|
---|
| 204 | </varlistentry>
|
---|
| 205 |
|
---|
[909a015] | 206 | <varlistentry id="erb">
|
---|
| 207 | <term><command>erb</command></term>
|
---|
[16f3afb3] | 208 | <listitem>
|
---|
[cc13920] | 209 | <para>
|
---|
[909a015] | 210 | is Tiny eRuby. It interprets a
|
---|
| 211 | <application>Ruby</application> code embedded text file.
|
---|
[cc13920] | 212 | </para>
|
---|
[909a015] | 213 | <indexterm zone="ruby erb">
|
---|
| 214 | <primary sortas="b-erb">erb</primary>
|
---|
| 215 | </indexterm>
|
---|
| 216 | </listitem>
|
---|
| 217 | </varlistentry>
|
---|
| 218 |
|
---|
| 219 | <varlistentry id="gem">
|
---|
| 220 | <term><command>gem</command></term>
|
---|
| 221 | <listitem>
|
---|
| 222 | <para>
|
---|
| 223 | command for RubyGems - a sophisticated package manager for
|
---|
| 224 | <application>Ruby</application>.
|
---|
| 225 | </para>
|
---|
| 226 | <indexterm zone="ruby gem">
|
---|
| 227 | <primary sortas="b-gem">gem</primary>
|
---|
[16f3afb3] | 228 | </indexterm>
|
---|
| 229 | </listitem>
|
---|
| 230 | </varlistentry>
|
---|
| 231 |
|
---|
| 232 | <varlistentry id="irb">
|
---|
| 233 | <term><command>irb</command></term>
|
---|
| 234 | <listitem>
|
---|
[cc13920] | 235 | <para>
|
---|
| 236 | is the interactive interface for
|
---|
| 237 | <application>Ruby</application>.
|
---|
| 238 | </para>
|
---|
[16f3afb3] | 239 | <indexterm zone="ruby irb">
|
---|
| 240 | <primary sortas="b-irb">irb</primary>
|
---|
| 241 | </indexterm>
|
---|
| 242 | </listitem>
|
---|
| 243 | </varlistentry>
|
---|
| 244 |
|
---|
[909a015] | 245 | <varlistentry id="rake">
|
---|
| 246 | <term><command>rake</command></term>
|
---|
[16f3afb3] | 247 | <listitem>
|
---|
[cc13920] | 248 | <para>
|
---|
[909a015] | 249 | a make-like build utility for <application>Ruby</application>.
|
---|
[cc13920] | 250 | </para>
|
---|
[909a015] | 251 | <indexterm zone="ruby rake">
|
---|
| 252 | <primary sortas="b-rake">rake</primary>
|
---|
| 253 | </indexterm>
|
---|
| 254 | </listitem>
|
---|
| 255 | </varlistentry>
|
---|
| 256 |
|
---|
| 257 | <varlistentry id="rdoc">
|
---|
| 258 | <term><command>rdoc</command></term>
|
---|
| 259 | <listitem>
|
---|
| 260 | <para>
|
---|
| 261 | generates <application>Ruby</application> documentation.
|
---|
| 262 | </para>
|
---|
| 263 | <indexterm zone="ruby rdoc">
|
---|
| 264 | <primary sortas="b-rdoc">rdoc</primary>
|
---|
[16f3afb3] | 265 | </indexterm>
|
---|
| 266 | </listitem>
|
---|
| 267 | </varlistentry>
|
---|
| 268 |
|
---|
| 269 | <varlistentry id="ri">
|
---|
| 270 | <term><command>ri</command></term>
|
---|
| 271 | <listitem>
|
---|
[cc13920] | 272 | <para>
|
---|
| 273 | displays documentation from a database on
|
---|
[00217270] | 274 | <application>Ruby</application> classes, modules, and methods.
|
---|
[cc13920] | 275 | </para>
|
---|
[16f3afb3] | 276 | <indexterm zone="ruby ri">
|
---|
| 277 | <primary sortas="b-ri">ri</primary>
|
---|
| 278 | </indexterm>
|
---|
| 279 | </listitem>
|
---|
| 280 | </varlistentry>
|
---|
| 281 |
|
---|
[909a015] | 282 | <varlistentry id="ruby-prog">
|
---|
| 283 | <term><command>ruby</command></term>
|
---|
| 284 | <listitem>
|
---|
| 285 | <para>
|
---|
| 286 | is an interpreted scripting language for quick
|
---|
| 287 | and easy object-oriented programming.
|
---|
| 288 | </para>
|
---|
| 289 | <indexterm zone="ruby ruby-prog">
|
---|
| 290 | <primary sortas="b-ruby">ruby</primary>
|
---|
| 291 | </indexterm>
|
---|
| 292 | </listitem>
|
---|
| 293 | </varlistentry>
|
---|
| 294 |
|
---|
[16f3afb3] | 295 | <varlistentry id="libruby">
|
---|
[92b0b42] | 296 | <term><filename role="libraryfile">libruby.so</filename></term>
|
---|
[16f3afb3] | 297 | <listitem>
|
---|
[cc13920] | 298 | <para>
|
---|
| 299 | contains the API functions required by <application>Ruby</application>.
|
---|
| 300 | </para>
|
---|
[16f3afb3] | 301 | <indexterm zone="ruby libruby">
|
---|
| 302 | <primary sortas="c-libruby">libruby.so</primary>
|
---|
| 303 | </indexterm>
|
---|
| 304 | </listitem>
|
---|
| 305 | </varlistentry>
|
---|
| 306 |
|
---|
| 307 | </variablelist>
|
---|
| 308 |
|
---|
| 309 | </sect2>
|
---|
[a1f7daa] | 310 |
|
---|
| 311 | </sect1>
|
---|