# Ruby

**URL:** https://www.ruby-forum.com/c/ruby/7.md?page=1208

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 1209

---

## [Getting IP address using UDP Socket](https://www.ruby-forum.com/t/getting-ip-address-using-udp-socket/129311)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 2\
**Last updated:** [February 16, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/getting-ip-address-using-udp-socket/129311 "2008-02-16T18:45:36Z")

</div>

Hi Ruby Forum… I have a simple UDP Socket that I’m opening which listens for Syslog messages on port 514. I am receiving all syslog messages with no problem but I need to log what IP address is sending the messages. …

---

## [Problems sending mail](https://www.ruby-forum.com/t/problems-sending-mail/129319)

<div class="topic-metadata">

**Author:** [@blackhawkf1](https://www.ruby-forum.com/u/blackhawkf1)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 6:21pm UTC](https://www.ruby-forum.com/t/problems-sending-mail/129319 "2008-02-16T18:21:14Z")

</div>

Hi! I want the program send me a email when a exception happens (sending it from any computer). But this throws an error: require ‘net/smtp’ … def sendMeError to = ‘removed\_email\_address@domain.invalid’ from = ‘re…

---

## [Hash#identifed\_by](https://www.ruby-forum.com/t/hash-identifed-by/129322)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 6:15pm UTC](https://www.ruby-forum.com/t/hash-identifed-by/129322 "2008-02-16T18:15:44Z")

</div>

e$B$J$+$@$G$9!#e(B compared\_bye$B$H$$$&L\>A0$K$7$h$&$+$H;W$$$^$7$?$,!"Hf3S$@$1$G$O$J$$e(B e$B$N$Ge(Bidentifed\_bye$B$H$7$F$\_$^$7$?!#e(B marshal.ce$B$Ne(Bw\_encoding()e$B$b@0M}$7$F$"$j$^$9!#e(B Index: hash.c — hash.c (r…

---

## [Trunk: $B%$%s%9%H!\<%k%U%!%$%k$N%"%/%;%98"(B](https://www.ruby-forum.com/t/trunk-b-s-9-h-k-u-k-n-98-b/128781)

<div class="topic-metadata">

**Author:** [@pegacorn](https://www.ruby-forum.com/u/pegacorn)\
**Replies:** 6\
**Last updated:** [February 16, 2008, 5:39pm UTC](https://www.ruby-forum.com/t/trunk-b-s-9-h-k-u-k-n-98-b/128781 "2008-02-16T17:39:17Z")

</div>

trunk ã§ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ãŒé©åˆ‡ã«è¨­å®šã•ã‚Œãªã„ã‚‚ã®ãŒ ã‚ã‚Šã¾ã™ã€‚ Index: instruby.rb — instruby.rb (ãƒªãƒ“ã‚¸ãƒ§ãƒ³ 15429) +++ instruby.rb (ä½œæ¥­ã‚³ãƒ”ãƒ¼) @@ -123…

---

## [Handling rename of a gem](https://www.ruby-forum.com/t/handling-rename-of-a-gem/129315)

<div class="topic-metadata">

**Author:** [@Laurent\_Cerveau](https://www.ruby-forum.com/u/Laurent_Cerveau)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 5:27pm UTC](https://www.ruby-forum.com/t/handling-rename-of-a-gem/129315 "2008-02-16T17:27:31Z")

</div>

Hi I am trying to make some web services client code with SOAP and so have installed soap4r. However this one needs http-access2 to work properly. This last one has however been renamed to httpclient (http://raa.ruby…

---

## [Thin errors out -\> \`gem\_original\_require': no such file to load -- daemons](https://www.ruby-forum.com/t/thin-errors-out-gem-original-require-no-such-file-to-load-daemons/129307)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 1\
**Last updated:** [February 16, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/thin-errors-out-gem-original-require-no-such-file-to-load-daemons/129307 "2008-02-16T16:00:51Z")

</div>

i installed thin thin 0.6.4 (x86-mswin32-60) and eventmachine 0.8.1 (i386-mswin32) i went to my script folder under rails and want to start it. but it fails with this error. not sure what gem i am missing. E:\\Tradin…

---

## [Readline history bug on Windows](https://www.ruby-forum.com/t/readline-history-bug-on-windows/129312)

<div class="topic-metadata">

**Author:** [@h3rald](https://www.ruby-forum.com/u/h3rald)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/readline-history-bug-on-windows/129312 "2008-02-16T15:52:12Z")

</div>

I just wanted to know if anyone had any idea on how to solve a rather unpleasant bug involving the readline library on Windows. I’m using readline in a Ruby program of mine and apparently whenever I try to re-edit a l…

---

## [Broken Ruby framework symlinks in Leopard SDK?](https://www.ruby-forum.com/t/broken-ruby-framework-symlinks-in-leopard-sdk/129218)

<div class="topic-metadata">

**Author:** [@has](https://www.ruby-forum.com/u/has)\
**Replies:** 2\
**Last updated:** [February 16, 2008, 2:55pm UTC](https://www.ruby-forum.com/t/broken-ruby-framework-symlinks-in-leopard-sdk/129218 "2008-02-16T14:55:34Z")

</div>

Hi all, Been trying to embed Ruby.framework in an application and after scratching my head a bit at gcc/Xcode build errors discovered that all of the header/dylib symlinks under /Developer/SDKs/MacOSX10.5.sdk/ System…

---

## [Inferior Ruby for Emacs](https://www.ruby-forum.com/t/inferior-ruby-for-emacs/129306)

<div class="topic-metadata">

**Author:** [@arg](https://www.ruby-forum.com/u/arg)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 2:30pm UTC](https://www.ruby-forum.com/t/inferior-ruby-for-emacs/129306 "2008-02-16T14:30:53Z")

</div>

Hi, I’ve recently switched to Emacs for programming in Ruby. The stock Inferior Ruby M. (inf-ruby.el) has 2 inconveniences: There’s no command history, i.e. M-p and M-n don’t work The output of irb isn’t read-only, i…

---

## [How to put a Ruby website online without rails](https://www.ruby-forum.com/t/how-to-put-a-ruby-website-online-without-rails/124975)

<div class="topic-metadata">

**Author:** [@softmind](https://www.ruby-forum.com/u/softmind)\
**Replies:** 28\
**Last updated:** [February 16, 2008, 12:10pm UTC](https://www.ruby-forum.com/t/how-to-put-a-ruby-website-online-without-rails/124975 "2008-02-16T12:10:49Z")

</div>

Hi, I would like to develop a website totally in Ruby. But i do not want to go the MVC way. Neither i want to go Ruby on Rails way. I have heard many stories about rails deployment. Its no as easy as PHP deployment,…

---

## [My Boggle Solver: I welcome any tips and tricks!](https://www.ruby-forum.com/t/my-boggle-solver-i-welcome-any-tips-and-tricks/129293)

<div class="topic-metadata">

**Author:** [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Replies:** 3\
**Last updated:** [February 16, 2008, 8:45am UTC](https://www.ruby-forum.com/t/my-boggle-solver-i-welcome-any-tips-and-tricks/129293 "2008-02-16T08:45:48Z")

</div>

So, I wrote a Boggle solver so that I could win at Scramble and Griddle on Facebook, and it works great! However, I’m pretty new at Ruby, so if you know any “rubyisms” or “ruby ways” that would help clean up my progra…

---

## [Collection sum](https://www.ruby-forum.com/t/collection-sum/129284)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 1\
**Last updated:** [February 16, 2008, 8:29am UTC](https://www.ruby-forum.com/t/collection-sum/129284 "2008-02-16T08:29:24Z")

</div>

Hello, I really like the ability to do sums right in the object model, for example @items.sum(:unit\_price), etc! works great! However I wonder how you step down through an association to do a sum current\_user.carts…

---

## [Floating point exception by "".center(1, "\\x80".force\_encoding("utf-8")\*40)](https://www.ruby-forum.com/t/floating-point-exception-by-center-1-x80-force-encoding-utf-8-40/129294)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 6:39am UTC](https://www.ruby-forum.com/t/floating-point-exception-by-center-1-x80-force-encoding-utf-8-40/129294 "2008-02-16T06:39:16Z")

</div>

e$B0J2\<$N$h$&$K$9$k$HIbF0\>.?tE@Nc30$GMn$A$^$9!#e(B % ./ruby -ve ‘"".center(1, “\\x80”.force\_encoding(“utf-8”)\*40)’ ruby 1.9.0 (2008-02-16 revision 15502) \[i686-linux\] zsh: floating point exception ./ruby -ve ‘"".cente…

---

## [Noone's mentioned it yet](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 5\
**Last updated:** [February 16, 2008, 5:37am UTC](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183 "2008-02-16T05:37:12Z")

</div>

But I noticed it yesterday, there’s a new SVN revision out there. Lot’s of changes to the DLR, which can affect stuff people may be working on. You may want to get latest and merge your changes. I assume this is a re…

---

## [Tools for working with x86 assembly in Ruby?](https://www.ruby-forum.com/t/tools-for-working-with-x86-assembly-in-ruby/129262)

<div class="topic-metadata">

**Author:** [@ljp](https://www.ruby-forum.com/u/ljp)\
**Replies:** 2\
**Last updated:** [February 16, 2008, 5:16am UTC](https://www.ruby-forum.com/t/tools-for-working-with-x86-assembly-in-ruby/129262 "2008-02-16T05:16:42Z")

</div>

Hi all, I’m starting a project that will involve injecting instructions into x86 assembly code. I’d like to write this tool in Ruby. In the interest of not reinventing wheels, I’m appealing to the Ruby community: d…

---

## [Favorite Ruby idioms, shortcuts?](https://www.ruby-forum.com/t/favorite-ruby-idioms-shortcuts/129273)

<div class="topic-metadata">

**Author:** [@Serg\_K](https://www.ruby-forum.com/u/Serg_K)\
**Replies:** 3\
**Last updated:** [February 16, 2008, 4:38am UTC](https://www.ruby-forum.com/t/favorite-ruby-idioms-shortcuts/129273 "2008-02-16T04:38:02Z")

</div>

Hi As relatively new to Ruby, I’d be interested in seeing what people think are the best idioms for Ruby. I’m trying to get used to doing things the “Ruby way” (no pun intended). I’m interested in what you think ar…

---

## [Watir general question](https://www.ruby-forum.com/t/watir-general-question/128441)

<div class="topic-metadata">

**Author:** [@bskaggs](https://www.ruby-forum.com/u/bskaggs)\
**Replies:** 1\
**Last updated:** [February 16, 2008, 4:15am UTC](https://www.ruby-forum.com/t/watir-general-question/128441 "2008-02-16T04:15:44Z")

</div>

hi everyone it was really difficult to find a watir forum at all, so i hope i can find some help in here anyway. is there a way of veryfying that an IE spawned browser window exists? from what i can gather on the wat…

---

## [Icanhasaudio 0.1.0 Released](https://www.ruby-forum.com/t/icanhasaudio-0-1-0-released/129282)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 1\
**Last updated:** [February 16, 2008, 4:13am UTC](https://www.ruby-forum.com/t/icanhasaudio-0-1-0-released/129282 "2008-02-16T04:13:23Z")

</div>

icanhasaudio version 0.1.0 has been released! http://seattlerb.rubyforge.org/ Hai! icanhasaudio? is an interface to lame for decoding ur MP3s. I iz in ur computer. Decodin ur mp3s. Whatevs! I also decodin ur OGGz…

---

## [Betabrite 1.0.1 Released](https://www.ruby-forum.com/t/betabrite-1-0-1-released/129283)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 3:34am UTC](https://www.ruby-forum.com/t/betabrite-1-0-1-released/129283 "2008-02-16T03:34:43Z")

</div>

betabrite version 1.0.1 has been released! http://rubyforge.org/projects/betabrite/ http://betabrite.rubyforge.org/ removed\_email\_address@domain.invalid Provides a Ruby interface to BetaBrite LED signs. Changes: 1.…

---

## [Cannot install eventmachine](https://www.ruby-forum.com/t/cannot-install-eventmachine/129279)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 2\
**Last updated:** [February 16, 2008, 2:55am UTC](https://www.ruby-forum.com/t/cannot-install-eventmachine/129279 "2008-02-16T02:55:26Z")

</div>

i cannot install event machine. i get error. i tried all the options. E:\\Documents and Settings\\Trade\>gem install eventmachine Select which gem to install for your platform (i386-mswin32) eventmachine 0.10.0 (ruby) e…

---

## [Encoding.default\_external and -r option](https://www.ruby-forum.com/t/encoding-default-external-and-r-option/129271)

<div class="topic-metadata">

**Author:** [@Masaki\_S](https://www.ruby-forum.com/u/Masaki_S)\
**Replies:** 2\
**Last updated:** [February 16, 2008, 2:15am UTC](https://www.ruby-forum.com/t/encoding-default-external-and-r-option/129271 "2008-02-16T02:15:02Z")

</div>

e$B=uED$G$9!#e(B e$B\<!$N7k2L$ON\>J}$H$be(BUTF-8e$B$K$J$C$F$\[$7$$$G$9!#e(B $ ruby -v ruby 1.9.0 (2008-02-16 revision 15495) \[i686-linux\] $ cat encd.rb puts Encoding.default\_external $ ruby -Eutf-8 -r./encd.rb -e ‘’ …

---

## [Complex(-0.0, -0.0) & Unify](https://www.ruby-forum.com/t/complex-0-0-0-0-unify/129274)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 1:24am UTC](https://www.ruby-forum.com/t/complex-0-0-0-0-unify/129274 "2008-02-16T01:24:39Z")

</div>

r14020 e$B$G!"5uIt$Ne(B -0.0 e$B$rJ\]B8$9$k$h$&$K$J$C$?$h$&$G$9$,!"e(Bmathn e$B$7$Fe(B Unify e$B$5$l$k$He(B -0.0 e$B$K$J$C$F$7$^$$!"7k2LE\*$K\>pJs$,\<:$o$l$k$3$H$K$J$j$^e(B e$B$9!#e(B $ ruby19 -r complex -e ‘c=Complex(-…

---

## [EOF in TreeTop?](https://www.ruby-forum.com/t/eof-in-treetop/129227)

<div class="topic-metadata">

**Author:** [@Day](https://www.ruby-forum.com/u/Day)\
**Replies:** 2\
**Last updated:** [February 15, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/eof-in-treetop/129227 "2008-02-15T23:51:50Z")

</div>

I ran into a problem writing my praser: there’s a comment in the last line of my file and I’d defined comments to be ‘\*’ followed by anything that’s not a newline followed by a newline. The final comment isn’t followe…

---

## [Qtruby install on redhat](https://www.ruby-forum.com/t/qtruby-install-on-redhat/129258)

<div class="topic-metadata">

**Author:** [@sclaerhout](https://www.ruby-forum.com/u/sclaerhout)\
**Replies:** 3\
**Last updated:** [February 15, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/qtruby-install-on-redhat/129258 "2008-02-15T23:51:47Z")

</div>

running ./configure after untarring korundum-3.5.5 I get: checking if UIC has KDE plugins available… no configure: error: you need to install kdelibs first. If you did install kdelibs, then the Qt version that is pi…

---

## [Finding smallest integer division?](https://www.ruby-forum.com/t/finding-smallest-integer-division/129249)

<div class="topic-metadata">

**Author:** [@Jari\_W](https://www.ruby-forum.com/u/Jari_W)\
**Replies:** 4\
**Last updated:** [February 15, 2008, 11:42pm UTC](https://www.ruby-forum.com/t/finding-smallest-integer-division/129249 "2008-02-15T23:42:26Z")

</div>

In Ruby, what would be the most efficient way to find the smallest number that an array of different numbers can be divided by with integer math? For example: \[1,2\] would return 2 \[1,2,3\] would return 6 \[1,2,4\] wou…

---

## [Which data-type can I use for this task?](https://www.ruby-forum.com/t/which-data-type-can-i-use-for-this-task/129235)

<div class="topic-metadata">

**Author:** [@Adna\_rim](https://www.ruby-forum.com/u/Adna_rim)\
**Replies:** 5\
**Last updated:** [February 15, 2008, 11:18pm UTC](https://www.ruby-forum.com/t/which-data-type-can-i-use-for-this-task/129235 "2008-02-15T23:18:18Z")

</div>

Hi, I have a little question. I have a list here like this: street house person age street house person age street house person age … Now I wanna store them in a data type like an array. I tied this here: …

---

## [Sqlite3-ruby 64bit bug](https://www.ruby-forum.com/t/sqlite3-ruby-64bit-bug/129270)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 0\
**Last updated:** [February 15, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby-64bit-bug/129270 "2008-02-15T23:15:19Z")

</div>

Hey all, It appears that I have found a bug in sqlite3-ruby relating to 64bit integer inserts. http://rubyforge.org/tracker/index.php?func=detail&aid=18087&group\_id=254&atid=1043 I figured I should say something here…

---

## [Closing files with abrupt interruptions](https://www.ruby-forum.com/t/closing-files-with-abrupt-interruptions/129212)

<div class="topic-metadata">

**Author:** [@backz](https://www.ruby-forum.com/u/backz)\
**Replies:** 2\
**Last updated:** [February 15, 2008, 11:10pm UTC](https://www.ruby-forum.com/t/closing-files-with-abrupt-interruptions/129212 "2008-02-15T23:10:35Z")

</div>

loop do File.open somefile, ‘r’ do |io| next end end Does somefile get closed? How would I test that? I have the same question if it raises an error (that gets rescued) or throws a symbol. Daniel Brumbaugh K.

---

## [Array of here documents](https://www.ruby-forum.com/t/array-of-here-documents/128579)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 9\
**Last updated:** [February 15, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/array-of-here-documents/128579 "2008-02-15T23:05:51Z")

</div>

Question: is it possible to create an array of here documents? a = \[\<\<END some stuff more stuff END, \<\<END even more END \] ?

---

## [Syntax problem: @var=="v" ? { ... } : { ... }](https://www.ruby-forum.com/t/syntax-problem-var-v/129266)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 5\
**Last updated:** [February 15, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/syntax-problem-var-v/129266 "2008-02-15T22:56:28Z")

</div>

Hi All I tried to print an “M” or “V” depending on the value of a variable, like @var = “v” @var == “v” ? { p “V” } : { p “M” } this however doesn’t work, but I’m sure something like this can be done! Any suggestio…

[Previous page](https://www.ruby-forum.com/c/ruby/7.md?page=1207)

[Next page](https://www.ruby-forum.com/c/ruby/7.md?page=1209)
