--=-EygfuRDdatpkI6ArhKTJ
Content-Type: multipart/alternative; boundary="=-R/QUUDJeh125Nhm/Xjmn"


--=-R/QUUDJeh125Nhm/Xjmn
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

So, I installed the stick gem and gave it a run through its paces.  I
stumbled at the first hurdle.  From the documentation found at
"http://stick.rubyforge.org/rdoc/index.html" I get the following snippet
of code (the obvious spelling error of "require" corrected):


require 'stick/units'
1.bit/s + 8.bytes/s
(1.bit/s).to(byte/s)
1.mile.to(feet)
1.acre.to(yd**2)
1.acre.to(sq_yd)
1.gallon.to(self.L)
1.lb.to(kg)
1.m.s.to(m.s)
1.sq_mi.to(km**2)
1.mile.to(km)
1.usd.to(twd)


Cutting and pasting that very code into irb:


irb(main):003:0> require 'stick/units'
=3D> false
irb(main):004:0> 1.bit/s + 8.bytes/s
NameError: undefined local variable or method `s' for main:Object
        from (irb):4
irb(main):005:0> (1.bit/s).to(byte/s)
NameError: undefined local variable or method `s' for main:Object
        from (irb):5
irb(main):006:0> 1.mile.to(feet)
NameError: undefined local variable or method `feet' for main:Object
        from (irb):6
irb(main):007:0> 1.acre.to(yd**2)
NameError: undefined local variable or method `yd' for main:Object
        from (irb):7
irb(main):008:0> 1.acre.to(sq_yd)
NameError: undefined local variable or method `sq_yd' for main:Object
        from (irb):8
irb(main):009:0> 1.gallon.to(self.L)
NoMethodError: undefined method `L' for main:Object
        from (irb):9
irb(main):010:0> 1.lb.to(kg)
NameError: undefined local variable or method `kg' for main:Object
        from (irb):10
irb(main):011:0> 1.m.s.to(m.s)
NameError: undefined local variable or method `m' for main:Object
        from (irb):11
irb(main):012:0> 1.sq_mi.to(km**2)
NameError: undefined local variable or method `km' for main:Object
        from (irb):12
irb(main):013:0> 1.mile.to(km)
NameError: undefined local variable or method `km' for main:Object
        from (irb):13
irb(main):014:0> 1.usd.to(twd)
NoMethodError: undefined method `usd' for 1:Fixnum
        from (irb):14


Not a single one of the supplied examples works.  Digging around in the
docs more closely finds me nothing to show what went wrong and the
source isn't helping a whole lot either.  So what's the magic trick to
get stick to work?

--=20
Michael T. Richter <ttmrichter / gmail.com> (GoogleTalk:
ttmrichter / gmail.com)
So much of what we call management consists in making it difficult for
people to work. (Peter Drucker)

--=-R/QUUDJeh125Nhm/Xjmn
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; CHARSET=3DUTF-8">
  <META NAME=3D"GENERATOR" CONTENT=3D"GtkHTML/3.16.1">
</HEAD>
<BODY>
So, I installed the stick gem and gave it a run through its paces.&nbsp; I =
stumbled at the first hurdle.&nbsp; From the documentation found at &quot;<=
A HREF=3D"http://stick.rubyforge.org/rdoc/index.html">http://stick.rubyforg=
e.org/rdoc/index.html</A>&quot; I get the following snippet of code (the ob=
vious spelling error of &quot;require&quot; corrected):<BR>
<BR>
<PRE>
<TT>require 'stick/units'</TT>
<TT>1.bit/s + 8.bytes/s</TT>
<TT>(1.bit/s).to(byte/s)</TT>
<TT>1.mile.to(feet)</TT>
<TT>1.acre.to(yd**2)</TT>
<TT>1.acre.to(sq_yd)</TT>
<TT>1.gallon.to(self.L)</TT>
<TT>1.lb.to(kg)</TT>
<TT>1.m.s.to(m.s)</TT>
<TT>1.sq_mi.to(km**2)</TT>
<TT>1.mile.to(km)</TT>
<TT>1.usd.to(twd)</TT>
</PRE>
<BR>
Cutting and pasting that very code into irb:<BR>
<BR>
<PRE>
<TT>irb(main):003:0&gt; require 'stick/units'</TT>
<TT>=3D&gt; false</TT>
<TT>irb(main):004:0&gt; 1.bit/s + 8.bytes/s</TT>
<TT>NameError: undefined local variable or method `s' for main:Object</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):4</TT>
<TT>irb(main):005:0&gt; (1.bit/s).to(byte/s)</TT>
<TT>NameError: undefined local variable or method `s' for main:Object</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):5</TT>
<TT>irb(main):006:0&gt; 1.mile.to(feet)</TT>
<TT>NameError: undefined local variable or method `feet' for main:Object</T=
T>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):6</TT>
<TT>irb(main):007:0&gt; 1.acre.to(yd**2)</TT>
<TT>NameError: undefined local variable or method `yd' for main:Object</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):7</TT>
<TT>irb(main):008:0&gt; 1.acre.to(sq_yd)</TT>
<TT>NameError: undefined local variable or method `sq_yd' for main:Object</=
TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):8</TT>
<TT>irb(main):009:0&gt; 1.gallon.to(self.L)</TT>
<TT>NoMethodError: undefined method `L' for main:Object</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):9</TT>
<TT>irb(main):010:0&gt; 1.lb.to(kg)</TT>
<TT>NameError: undefined local variable or method `kg' for main:Object</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):10</TT>
<TT>irb(main):011:0&gt; 1.m.s.to(m.s)</TT>
<TT>NameError: undefined local variable or method `m' for main:Object</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):11</TT>
<TT>irb(main):012:0&gt; 1.sq_mi.to(km**2)</TT>
<TT>NameError: undefined local variable or method `km' for main:Object</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):12</TT>
<TT>irb(main):013:0&gt; 1.mile.to(km)</TT>
<TT>NameError: undefined local variable or method `km' for main:Object</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):13</TT>
<TT>irb(main):014:0&gt; 1.usd.to(twd)</TT>
<TT>NoMethodError: undefined method `usd' for 1:Fixnum</TT>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from (irb):14</TT>
</PRE>
<BR>
Not a single one of the supplied examples works.&nbsp; Digging around in th=
e docs more closely finds me nothing to show what went wrong and the source=
 isn't helping a whole lot either.&nbsp; So what's the magic trick to get s=
tick to work?<BR>
<BR>
<TABLE CELLSPACING=3D"0" CELLPADDING=3D"0" WIDTH=3D"100%">
<TR>
<TD>
-- <BR>
<B>Michael T. Richter</B> &lt;<A HREF=3D"mailto:ttmrichter / gmail.com">ttmri=
chter / gmail.com</A>&gt; (<B>GoogleTalk:</B> ttmrichter / gmail.com)<BR>
<I>So much of what we call management consists in making it difficult for p=
eople to work. (Peter Drucker)</I>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

--=-R/QUUDJeh125Nhm/Xjmn--

--=-EygfuRDdatpkI6ArhKTJ
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIA1wVLqyWkKVQ54QRAq4sAJ0RxBqK9//iuRzHyIJMwaz8MnEJ7wCcDvBv
n2wZ0hAktILZYgA812LotRs=
=2mQn
-----END PGP SIGNATURE-----

--=-EygfuRDdatpkI6ArhKTJ--