# Ruby

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

[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:** 524

---

## [Re: Wanted: AI tutorial](https://www.ruby-forum.com/t/re-wanted-ai-tutorial/195721)

<div class="topic-metadata">

**Author:** [@iaindooley](https://www.ruby-forum.com/u/iaindooley)\
**Replies:** 2\
**Last updated:** [September 29, 2010, 8:28pm UTC](https://www.ruby-forum.com/t/re-wanted-ai-tutorial/195721 "2010-09-29T20:28:03Z")

</div>

André wrote: Hello, i’ve searched the internet for an tutorial on programming Artificial Intelligence to a game. im pretty new to programming, so would be good with a nice guide how to create an AI. Thanks AI, even…

---

## [Using JRuby to obfuscate Ruby code](https://www.ruby-forum.com/t/using-jruby-to-obfuscate-ruby-code/195754)

<div class="topic-metadata">

**Author:** [@hawe](https://www.ruby-forum.com/u/hawe)\
**Replies:** 4\
**Last updated:** [September 29, 2010, 7:35pm UTC](https://www.ruby-forum.com/t/using-jruby-to-obfuscate-ruby-code/195754 "2010-09-29T19:35:10Z")

</div>

Hi! Can I use Jruby to obfuscate my Ruby code so the client can’t re-use my code? I want to deploy a Rails application to a machine operated by the client. The client wants to operate the database, the server and eve…

---

## [Error message, undefined method in Set](https://www.ruby-forum.com/t/error-message-undefined-method-in-set/195643)

<div class="topic-metadata">

**Author:** [@tensaiji](https://www.ruby-forum.com/u/tensaiji)\
**Replies:** 7\
**Last updated:** [September 29, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/error-message-undefined-method-in-set/195643 "2010-09-29T18:36:03Z")

</div>

Hi, I run some tests and get this: Error: test\_construction(TestTask): NoMethodError: undefined method \`include?’ for #Set:0x000001009aa2d0 … the offending line of code is this: @@available\_classes \<\< file unles…

---

## [Metadata 0.5](https://www.ruby-forum.com/t/metadata-0-5/114774)

<div class="topic-metadata">

**Author:** [@Ilmari\_H](https://www.ruby-forum.com/u/Ilmari_H)\
**Replies:** 17\
**Last updated:** [September 29, 2010, 6:32pm UTC](https://www.ruby-forum.com/t/metadata-0-5/114774 "2010-09-29T18:32:44Z")

</div>

Konrad M. removed\_email\_address@domain.invalid wrote: Any chance you could wrap this up as a gem? I already have a gemspec file, but gem screws up bin/chardet by plastering it with #!/usr/bin/ruby boilerplate (it’s …

---

## [Method\_missing](https://www.ruby-forum.com/t/method-missing/195747)

<div class="topic-metadata">

**Author:** [@simon780](https://www.ruby-forum.com/u/simon780)\
**Replies:** 3\
**Last updated:** [September 29, 2010, 3:38pm UTC](https://www.ruby-forum.com/t/method-missing/195747 "2010-09-29T15:38:39Z")

</div>

Hi, I have extended BDI::Row as below in order to use dot notation to retrieve columns values from result rows. It seems however that some methods like inspect for example now get caught as missing by this hook and ar…

---

## [Unknown regexp options](https://www.ruby-forum.com/t/unknown-regexp-options/195736)

<div class="topic-metadata">

**Author:** [@greedolol](https://www.ruby-forum.com/u/greedolol)\
**Replies:** 8\
**Last updated:** [September 29, 2010, 3:16pm UTC](https://www.ruby-forum.com/t/unknown-regexp-options/195736 "2010-09-29T15:16:52Z")

</div>

When I try to “require”, “load” or use rdoc on a .rb file in IRB I get the error “SyntaxError: compile error (irb):5: unknown regexp options - gary from (irb):5” Also, i’m using the preloaded irb on my mac which use…

---

## [\[Ruby 1.9.2-Backport#3708\]\[Closed\] Array#permutation $B$,$\*$+$7$J7k2L$rJV$9(B](https://www.ruby-forum.com/t/ruby-1-9-2-backport-3708-closed-array-permutation-b-7-j7k2l-rjv-9-b/195751)

<div class="topic-metadata">

**Author:** [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Replies:** 0\
**Last updated:** [September 29, 2010, 2:27pm UTC](https://www.ruby-forum.com/t/ruby-1-9-2-backport-3708-closed-array-permutation-b-7-j7k2l-rjv-9-b/195751 "2010-09-29T14:27:14Z")

</div>

e$B%A%1%C%He(B #3708 e$B$,99?7$5$l$^$7$?!#e(B (by Yuki S.) e$B%9%F!\<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B This issue was solved with changeset r29370. Shumpei, thank you for reporting this issue. Your contribu…

---

## [\[Ruby 1.9-Bug#3886\]\[Assigned\] cannot list the pathname of my own modules in backtrace on mswin64](https://www.ruby-forum.com/t/ruby-1-9-bug-3886-assigned-cannot-list-the-pathname-of-my-own-modules-in-backtrace-on-mswin64/195729)

<div class="topic-metadata">

**Author:** [@Usaku\_NAKAMURA](https://www.ruby-forum.com/u/Usaku_NAKAMURA)\
**Replies:** 2\
**Last updated:** [September 29, 2010, 12:47pm UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-3886-assigned-cannot-list-the-pathname-of-my-own-modules-in-backtrace-on-mswin64/195729 "2010-09-29T12:47:08Z")

</div>

Bug #3886: cannot list the pathname of my own modules in backtrace on mswin64 http://redmine.ruby-lang.org/issues/show/3886 e$B5/I\<\<Te(B: Usaku NAKAMURA e$B%9%F!\<%?%9e(B: Assigned, e$BM%@hEYe(B: Low e$BC4Ev\<Te(B: Us…

---

## [New file arrivals into a specific directory / folder](https://www.ruby-forum.com/t/new-file-arrivals-into-a-specific-directory-folder/195631)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 3\
**Last updated:** [September 29, 2010, 9:20am UTC](https://www.ruby-forum.com/t/new-file-arrivals-into-a-specific-directory-folder/195631 "2010-09-29T09:20:22Z")

</div>

greetings one and all, My need is this. Get my program to be executed when ever something new arrives into a directory. the data in the directory could be an email or it could be a file. most likely plain text the t…

---

## [Error - "\`+': can't convert nil into String"](https://www.ruby-forum.com/t/error-cant-convert-nil-into-string/195726)

<div class="topic-metadata">

**Author:** [@prichard](https://www.ruby-forum.com/u/prichard)\
**Replies:** 3\
**Last updated:** [September 29, 2010, 9:10am UTC](https://www.ruby-forum.com/t/error-cant-convert-nil-into-string/195726 "2010-09-29T09:10:33Z")

</div>

Why does the code below give me this error? What can I do to fix it? /people3.rb:4:in +': can't convert nil into String (TypeError) om C:/Ruby192/people3.rb:4:into\_s’ class Person attr\_accessor :fname, :lname, :age d…

---

## [Problem connecting to hotmail using the pony gem](https://www.ruby-forum.com/t/problem-connecting-to-hotmail-using-the-pony-gem/194628)

<div class="topic-metadata">

**Author:** [@jen](https://www.ruby-forum.com/u/jen)\
**Replies:** 5\
**Last updated:** [September 29, 2010, 7:41am UTC](https://www.ruby-forum.com/t/problem-connecting-to-hotmail-using-the-pony-gem/194628 "2010-09-29T07:41:35Z")

</div>

Hello, I have only just started seariously playing with Ruby. I have a script that needs to e-mail data it has gathered to a specific address. I want to use my hotmail account to send out the e-mail until I sort my o…

---

## [Showing the REPL console in a Silverlight app](https://www.ruby-forum.com/t/showing-the-repl-console-in-a-silverlight-app/195731)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 0\
**Last updated:** [September 29, 2010, 7:10am UTC](https://www.ruby-forum.com/t/showing-the-repl-console-in-a-silverlight-app/195731 "2010-09-29T07:10:54Z")

</div>

I’m playing with the Chiron examples (\\silverlight\\samples\\Clock\\ruby) and I want to bring up the REPL console. If I throw an exception by adding raising an exception, then I can see the console when the error is disp…

---

## [General purpose TCP proxy?](https://www.ruby-forum.com/t/general-purpose-tcp-proxy/195677)

<div class="topic-metadata">

**Author:** [@Markus\_F](https://www.ruby-forum.com/u/Markus_F)\
**Replies:** 8\
**Last updated:** [September 29, 2010, 5:25am UTC](https://www.ruby-forum.com/t/general-purpose-tcp-proxy/195677 "2010-09-29T05:25:48Z")

</div>

Hi, I’m trying to figure out if there’s a gem or software available in Ruby which allows me to act as a general purpose in-between proxy between a server and multiple clients? Basically: – – - - etc. It’s n…

---

## [How to update ruby to version 1.9.2 on linux platform](https://www.ruby-forum.com/t/how-to-update-ruby-to-version-1-9-2-on-linux-platform/195499)

<div class="topic-metadata">

**Author:** [@tanawatl](https://www.ruby-forum.com/u/tanawatl)\
**Replies:** 8\
**Last updated:** [September 29, 2010, 4:50am UTC](https://www.ruby-forum.com/t/how-to-update-ruby-to-version-1-9-2-on-linux-platform/195499 "2010-09-29T04:50:40Z")

</div>

I’m very sorry that ask several silly questions.But I’m actually very new for ruby and linux. So please answer my question I try to install ruby on Ubuntu with command apt-get install ruby1.9.1-full The process is co…

---

## [Levenshtein function issue](https://www.ruby-forum.com/t/levenshtein-function-issue/195510)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 7\
**Last updated:** [September 29, 2010, 4:19am UTC](https://www.ruby-forum.com/t/levenshtein-function-issue/195510 "2010-09-29T04:19:03Z")

</div>

well, I’m trying to get the levenshtein function to work, and it’s close, but it’s not quite giving me the right answer and i have no idea why. here’s the code: class Array2D def initialize(width, height) @data = A…

---

## [Puts and return](https://www.ruby-forum.com/t/puts-and-return/195712)

<div class="topic-metadata">

**Author:** [@jim-harris](https://www.ruby-forum.com/u/jim-harris)\
**Replies:** 13\
**Last updated:** [September 29, 2010, 3:14am UTC](https://www.ruby-forum.com/t/puts-and-return/195712 "2010-09-29T03:14:39Z")

</div>

10.times do |i| puts ‘too big’ and break if i \> 5 puts “#{i} ok” end I would expect this loop to quit after printing 0 to 5, but it executes all 10 times. I know “puts” return nil, but isn’t “and” (as opposed to &&)…

---

## [Can raspell create a dictionary?](https://www.ruby-forum.com/t/can-raspell-create-a-dictionary/195720)

<div class="topic-metadata">

**Author:** [@plambert](https://www.ruby-forum.com/u/plambert)\
**Replies:** 0\
**Last updated:** [September 29, 2010, 2:08am UTC](https://www.ruby-forum.com/t/can-raspell-create-a-dictionary/195720 "2010-09-29T02:08:34Z")

</div>

I’m just starting to use raspell, and it looks like it might be just for working with existing dictionaries. I know “aspell” can create dictionaries, but is there an API in raspell for doing that? Thanks, –Paul

---

## [Passing single backslash character as commang line argument](https://www.ruby-forum.com/t/passing-single-backslash-character-as-commang-line-argument/195657)

<div class="topic-metadata">

**Author:** [@kashyapivaturi](https://www.ruby-forum.com/u/kashyapivaturi)\
**Replies:** 6\
**Last updated:** [September 29, 2010, 12:46am UTC](https://www.ruby-forum.com/t/passing-single-backslash-character-as-commang-line-argument/195657 "2010-09-29T00:46:35Z")

</div>

Hi, I am trying to pass a string as a command line argument to another ruby program and I am not able to send a single backslash character as part of that string. Example: test1.rb: test2AbsolutePath = “C:\\test2.rb…

---

## [Wanted: AI tutorial](https://www.ruby-forum.com/t/wanted-ai-tutorial/195716)

<div class="topic-metadata">

**Author:** [@andr92](https://www.ruby-forum.com/u/andr92)\
**Replies:** 0\
**Last updated:** [September 29, 2010, 12:35am UTC](https://www.ruby-forum.com/t/wanted-ai-tutorial/195716 "2010-09-29T00:35:37Z")

</div>

Hello, i’ve searched the internet for an tutorial on programming Artificial Intelligence to a game. im pretty new to programming, so would be good with a nice guide how to create an AI. Thanks AndrÃ©

---

## [TCP Socket: Connection reset, but Select says it's valid](https://www.ruby-forum.com/t/tcp-socket-connection-reset-but-select-says-its-valid/195681)

<div class="topic-metadata">

**Author:** [@sclaerhout](https://www.ruby-forum.com/u/sclaerhout)\
**Replies:** 3\
**Last updated:** [September 28, 2010, 10:28pm UTC](https://www.ruby-forum.com/t/tcp-socket-connection-reset-but-select-says-its-valid/195681 "2010-09-28T22:28:10Z")

</div>

I’m running a server that sometimes encounters a connection-reset-by-peer error when reading data from a client. I’m calling IO.Select to verify that there are characters to be read, but occasionally the “rescue” belo…

---

## [\[ANN\] JRuby 1.5.3 Released](https://www.ruby-forum.com/t/ann-jruby-1-5-3-released/195709)

<div class="topic-metadata">

**Author:** [@Thomas\_E\_Enebo](https://www.ruby-forum.com/u/Thomas_E_Enebo)\
**Replies:** 0\
**Last updated:** [September 28, 2010, 9:18pm UTC](https://www.ruby-forum.com/t/ann-jruby-1-5-3-released/195709 "2010-09-28T21:18:46Z")

</div>

The JRuby community is pleased to announce the release of JRuby 1.5.3. Homepage: http://www.jruby.org/ Download: Downloads — JRuby.org JRuby 1.5.3 is a minor follow-up release to address a thread deadlock, a spurio…

---

## [Equivalent of the package xxx](https://www.ruby-forum.com/t/equivalent-of-the-package-xxx/194740)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [September 28, 2010, 8:30pm UTC](https://www.ruby-forum.com/t/equivalent-of-the-package-xxx/194740 "2010-09-28T20:30:09Z")

</div>

Is there any way to “be equivalent to” the package declaration in a .java file? Something like this in java: package org.familysearch.digitalarchive.tapeingestreader; in ruby becomes something like java\_import “org.…

---

## [C extension support in master](https://www.ruby-forum.com/t/c-extension-support-in-master/195548)

<div class="topic-metadata">

**Author:** [@s0nspark](https://www.ruby-forum.com/u/s0nspark)\
**Replies:** 1\
**Last updated:** [September 28, 2010, 8:28pm UTC](https://www.ruby-forum.com/t/c-extension-support-in-master/195548 "2010-09-28T20:28:20Z")

</div>

Hi Since JRuby support has been merged into master, I have had to fix a few issues that prevented people from updating to head. I will of course continue working on C extension support, but I’ll be away without inter…

---

## [Stack overflow in initializers](https://www.ruby-forum.com/t/stack-overflow-in-initializers/195501)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [September 28, 2010, 8:00pm UTC](https://www.ruby-forum.com/t/stack-overflow-in-initializers/195501 "2010-09-28T20:00:32Z")

</div>

Hi all. Wasn’t sure if this was a bug or not… The following code results in a stack overflow require’java’ module M include\_package “javax.swing” include\_package “javax.awt” include\_package “javax.net” class Show…

---

## [Ruby/DL loaded shared libraries are blocking?](https://www.ruby-forum.com/t/ruby-dl-loaded-shared-libraries-are-blocking/195503)

<div class="topic-metadata">

**Author:** [@PierreW](https://www.ruby-forum.com/u/PierreW)\
**Replies:** 2\
**Last updated:** [September 28, 2010, 7:50pm UTC](https://www.ruby-forum.com/t/ruby-dl-loaded-shared-libraries-are-blocking/195503 "2010-09-28T19:50:08Z")

</div>

Hi guys, I am using Ruby/DL (dl/import) to load a dynamic library. It seems that when I call a function of this library from Ruby, it is blocking. Is it “normal”, or am I doing something wrong? Is it possible to make …

---

## [ActiveRecord \> MySQL \> undefined method \`more\_results'](https://www.ruby-forum.com/t/activerecord-mysql-undefined-method-more-results/195675)

<div class="topic-metadata">

**Author:** [@andrewkendall](https://www.ruby-forum.com/u/andrewkendall)\
**Replies:** 1\
**Last updated:** [September 28, 2010, 7:45pm UTC](https://www.ruby-forum.com/t/activerecord-mysql-undefined-method-more-results/195675 "2010-09-28T19:45:39Z")

</div>

I am attempting to use ActiveRecord within a script I am writing to process some data within a MySQL database. In my development environment everything works perfectly, however, when I deploy the script in the product…

---

## [RCR: String#contain? and Array#contain?](https://www.ruby-forum.com/t/rcr-string-contain-and-array-contain/195498)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 3\
**Last updated:** [September 28, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/rcr-string-contain-and-array-contain/195498 "2010-09-28T18:13:34Z")

</div>

Every time I have to guess from memory whether to use “contain?” or “include?” within arrays and strings, I always guess wrong (the right answer is only “include?” BTW). Since ruby typically allows multiple ways of do…

---

## [Copying a matrix](https://www.ruby-forum.com/t/copying-a-matrix/195664)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 5\
**Last updated:** [September 28, 2010, 5:16pm UTC](https://www.ruby-forum.com/t/copying-a-matrix/195664 "2010-09-28T17:16:20Z")

</div>

How can I create an array copy that does not reference the same object… I have tried this without luck. m2 = m.map { |e| e } m2\[2\]\[2\]=2 p m p m2

---

## [Re: Ruby Work](https://www.ruby-forum.com/t/re-ruby-work/195706)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [September 28, 2010, 3:36pm UTC](https://www.ruby-forum.com/t/re-ruby-work/195706 "2010-09-28T15:36:12Z")

</div>

Let me take a little stab at the first one (Ruby’s main uses as a code language.) Well I would have to say that there are some limitations, as with most languages, to Ruby. That being said, you can do most anything y…

---

## [Location of browser cache in mac for safari, chrome,firefox](https://www.ruby-forum.com/t/location-of-browser-cache-in-mac-for-safari-chrome-firefox/195696)

<div class="topic-metadata">

**Author:** [@arihan](https://www.ruby-forum.com/u/arihan)\
**Replies:** 4\
**Last updated:** [September 28, 2010, 1:37pm UTC](https://www.ruby-forum.com/t/location-of-browser-cache-in-mac-for-safari-chrome-firefox/195696 "2010-09-28T13:37:55Z")

</div>

Dear All, Can anyone please let me know the location of browser cache in mac system for safari, google chrome and firefox. I know the location in windows platform :slight\_smile: Cheers A

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

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