# Ruby

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

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

---

## [Problem with jTable](https://www.ruby-forum.com/t/problem-with-jtable/171942)

<div class="topic-metadata">

**Author:** [@Thiago\_Freitas](https://www.ruby-forum.com/u/Thiago_Freitas)\
**Replies:** 1\
**Last updated:** [July 14, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/problem-with-jtable/171942 "2009-07-14T18:28:32Z")

</div>

Good Night friends, My names is Thiago and i am Brazilian, and my english is not a very good, rsrsrs, sorry. I’m having a problem for a popular jTable with jruby. What is a example of how to this?

---

## [Array.include? I do not seem to GET it](https://www.ruby-forum.com/t/array-include-i-do-not-seem-to-get-it/172094)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 5\
**Last updated:** [July 14, 2009, 6:26pm UTC](https://www.ruby-forum.com/t/array-include-i-do-not-seem-to-get-it/172094 "2009-07-14T18:26:43Z")

</div>

I have this set of constructs: def initialize(argv) @argv = argv end def start puts @argv.class puts @argv.size puts @argv @argv.include?(’–update’) ? puts(“Includes update”) : puts(“No –update”) … which produ…

---

## [Elegant solution for inverting zip?](https://www.ruby-forum.com/t/elegant-solution-for-inverting-zip/172089)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 3\
**Last updated:** [July 14, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/elegant-solution-for-inverting-zip/172089 "2009-07-14T16:48:54Z")

</div>

Hi folks, I came across something I thought should have an obvious answer and came up blank. I’m hoping folks could give me a nice solution to this problem. Given the output below: a = \[1,2,3,4\].zip(\[5,6,7,8\]) =\>…

---

## [SystemTimer in windows](https://www.ruby-forum.com/t/systemtimer-in-windows/171867)

<div class="topic-metadata">

**Author:** [@shakor](https://www.ruby-forum.com/u/shakor)\
**Replies:** 9\
**Last updated:** [July 14, 2009, 3:30pm UTC](https://www.ruby-forum.com/t/systemtimer-in-windows/171867 "2009-07-14T15:30:53Z")

</div>

Has anyone been able to install SystemTimer in ruby windows environment? It seems to need a C compiler and I have tried all kind of compilers and none of them work :confused:

---

## [Find(:conditions=\>cond\_selection](https://www.ruby-forum.com/t/find-conditions-cond-selection/171875)

<div class="topic-metadata">

**Author:** [@softwarewin](https://www.ruby-forum.com/u/softwarewin)\
**Replies:** 1\
**Last updated:** [July 14, 2009, 3:05pm UTC](https://www.ruby-forum.com/t/find-conditions-cond-selection/171875 "2009-07-14T15:05:36Z")

</div>

Hi, I need to build these conditions to find items in the DB: cond\_selection = { } cond\_selection\[:public\]=true (cond\_selection\[:license\_id\]=1 OR cond\_selection\[:license\_id\]=3) @guides=Guide.find(:all,:order=\>‘title…

---

## [Array function?](https://www.ruby-forum.com/t/array-function/172085)

<div class="topic-metadata">

**Author:** [@justme1](https://www.ruby-forum.com/u/justme1)\
**Replies:** 1\
**Last updated:** [July 14, 2009, 2:28pm UTC](https://www.ruby-forum.com/t/array-function/172085 "2009-07-14T14:28:19Z")

</div>

PLOT: I want to build a simple card counter function. When i make a object which is the player shall the player got one card (number between 1-13 in type of hearts for example). When more players connect the function …

---

## [OT: "show run" parser](https://www.ruby-forum.com/t/ot-show-run-parser/172043)

<div class="topic-metadata">

**Author:** [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Replies:** 2\
**Last updated:** [July 14, 2009, 12:35pm UTC](https://www.ruby-forum.com/t/ot-show-run-parser/172043 "2009-07-14T12:35:33Z")

</div>

Dear Rubyists, I realize this is a fairly off-topic question, but I’m wondering if any of you know of a tool that can read the output of “show run” (like in a Cisco switch), parse the output, and produce a nice-lookin…

---

## [Gem1.9 install mysql on ruby 1.9.1p129 failed](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067)

<div class="topic-metadata">

**Author:** [@geistteufel](https://www.ruby-forum.com/u/geistteufel)\
**Replies:** 5\
**Last updated:** [July 14, 2009, 12:05pm UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067 "2009-07-14T12:05:45Z")

</div>

Hi, I’m trying to install mysql gem on ruby 1.9.1p129. Here the result : (do in root) gem1.9 install mysql – --with-mysql-config=/usr/bin/mysql\_config GET 304 Not Modified: RubyGems.org | your community gem host Ins…

---

## [DBI and SQLite3](https://www.ruby-forum.com/t/dbi-and-sqlite3/172071)

<div class="topic-metadata">

**Author:** [@dafydd](https://www.ruby-forum.com/u/dafydd)\
**Replies:** 1\
**Last updated:** [July 14, 2009, 8:48am UTC](https://www.ruby-forum.com/t/dbi-and-sqlite3/172071 "2009-07-14T08:48:13Z")

</div>

I’m trying to load an SQLite3 database with the DBI and I need some help. Here’s the setup I have and the error I’m getting: the sqlite stuff: sqlite test SQLite version 2.8.17 Enter “.help” for instructions sqlite\>…

---

## [Getting time to display with ruby Logger](https://www.ruby-forum.com/t/getting-time-to-display-with-ruby-logger/172069)

<div class="topic-metadata">

**Author:** [@hbotadra](https://www.ruby-forum.com/u/hbotadra)\
**Replies:** 3\
**Last updated:** [July 14, 2009, 6:56am UTC](https://www.ruby-forum.com/t/getting-time-to-display-with-ruby-logger/172069 "2009-07-14T06:56:05Z")

</div>

Hey guys, I am having trouble displaying log messages with timestamps. My simple code looks like: require ‘logger’ logger = Logger.new("/tmp/tmp.log") logger.level = Logger::DEBUG logger.datetime\_format = “%Y-%m-…

---

## [How to check position of cursor blinking on text box](https://www.ruby-forum.com/t/how-to-check-position-of-cursor-blinking-on-text-box/172003)

<div class="topic-metadata">

**Author:** [@thriving](https://www.ruby-forum.com/u/thriving)\
**Replies:** 1\
**Last updated:** [July 14, 2009, 6:22am UTC](https://www.ruby-forum.com/t/how-to-check-position-of-cursor-blinking-on-text-box/172003 "2009-07-14T06:22:43Z")

</div>

I am working on Tag System and i’m copying Declicious Tag Autocomplete style. I thought that i have to check where is the position that cursor blink but i don’t know how to do that.

---

## [Ruby 1.8.6 One-click installer rbconfig.rb file](https://www.ruby-forum.com/t/ruby-1-8-6-one-click-installer-rbconfig-rb-file/172032)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 2\
**Last updated:** [July 14, 2009, 5:34am UTC](https://www.ruby-forum.com/t/ruby-1-8-6-one-click-installer-rbconfig-rb-file/172032 "2009-07-14T05:34:35Z")

</div>

I can’t seem to locate the rbconfig.rb file when I installed the 1.8.6 one-click installer for windows. My newer platform version for 1.9.1 has one. The only reason I’m asking and curious is because some IDEs like N…

---

## [Rubyforge login broken?](https://www.ruby-forum.com/t/rubyforge-login-broken/171951)

<div class="topic-metadata">

**Author:** [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Replies:** 2\
**Last updated:** [July 14, 2009, 4:45am UTC](https://www.ruby-forum.com/t/rubyforge-login-broken/171951 "2009-07-14T04:45:48Z")

</div>

Hi all, Is it just me or are other people getting "Cookies must be enabled past this point." when trying to log in to Rubyforge?

---

## [Gem1.9 install mysql on ruby 1.9.1p129 failed](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/196983)

<div class="topic-metadata">

**Author:** [@geistteufel](https://www.ruby-forum.com/u/geistteufel)\
**Replies:** 0\
**Last updated:** [July 14, 2009, 4:25am UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/196983 "2009-07-14T04:25:22Z")

</div>

Hi, I’m trying to install mysql gem on ruby 1.9.1p129. Here the result : (do in root) gem1.9 install mysql – --with-mysql-config=/usr/bin/mysql\_config GET 304 Not Modified: RubyGems.org | your community gem host Ins…

---

## [(just) retrieve and unpack a gem](https://www.ruby-forum.com/t/just-retrieve-and-unpack-a-gem/172065)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 7\
**Last updated:** [July 14, 2009, 4:11am UTC](https://www.ruby-forum.com/t/just-retrieve-and-unpack-a-gem/172065 "2009-07-14T04:11:20Z")

</div>

I need to retrieve and unpack a large number of gems, without either (a) affecting my local gem installation or (b) getting involved with dependencies. “gem fetch” will retrieve random gems, but “gem unpack” is a bit…

---

## [New to Ruby; need some help](https://www.ruby-forum.com/t/new-to-ruby-need-some-help/172060)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 1\
**Last updated:** [July 14, 2009, 4:09am UTC](https://www.ruby-forum.com/t/new-to-ruby-need-some-help/172060 "2009-07-14T04:09:43Z")

</div>

I am still working with console apps and do not see myself moving away from command line any time in the near future. However with one of the apps I am working on, I need something that writes the time in the bottom …

---

## [New to Ruby; need some help](https://www.ruby-forum.com/t/new-to-ruby-need-some-help/172062)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 1\
**Last updated:** [July 14, 2009, 4:07am UTC](https://www.ruby-forum.com/t/new-to-ruby-need-some-help/172062 "2009-07-14T04:07:44Z")

</div>

I am still working with console apps and do not see myself moving away from command line any time in the near future. However with one of the apps I am working on, I need something that writes the time in the bottom …

---

## [Gem cleanup and "dependencies will not be met"](https://www.ruby-forum.com/t/gem-cleanup-and-dependencies-will-not-be-met/172038)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 2\
**Last updated:** [July 14, 2009, 3:59am UTC](https://www.ruby-forum.com/t/gem-cleanup-and-dependencies-will-not-be-met/172038 "2009-07-14T03:59:11Z")

</div>

Is there a way to run ‘gem cleanup’ so that this question: If you remove this gems, one or more dependencies will not be met. Continue with Uninstall? \[Yn\] is automatically answered in the negative? Why is Y the defau…

---

## [Performance question](https://www.ruby-forum.com/t/performance-question/172045)

<div class="topic-metadata">

**Author:** [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Replies:** 6\
**Last updated:** [July 14, 2009, 3:55am UTC](https://www.ruby-forum.com/t/performance-question/172045 "2009-07-14T03:55:15Z")

</div>

I have a scenario where I will be storing thousands of objects in an array. Each one will have, say, two attributes, name and age. Some of them may have other attributes in addition. Note: I don’t need to have any met…

---

## [Using ImageJ from Ruby](https://www.ruby-forum.com/t/using-imagej-from-ruby/172059)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 0\
**Last updated:** [July 14, 2009, 2:30am UTC](https://www.ruby-forum.com/t/using-imagej-from-ruby/172059 "2009-07-14T02:30:50Z")

</div>

Hi all, I am just curious if I can ask ImageJ(ImageJ) to perform some image conversion such as tiff to jpeg after I open it from Ruby using system(“path/to/ImageJ.exe”). Thank you very much, Li

---

## [Rb\_eval\_string blocks on loops even if run inside a thread](https://www.ruby-forum.com/t/rb-eval-string-blocks-on-loops-even-if-run-inside-a-thread/172040)

<div class="topic-metadata">

**Author:** [@elliterate](https://www.ruby-forum.com/u/elliterate)\
**Replies:** 2\
**Last updated:** [July 14, 2009, 12:45am UTC](https://www.ruby-forum.com/t/rb-eval-string-blocks-on-loops-even-if-run-inside-a-thread/172040 "2009-07-14T00:45:40Z")

</div>

Hey, I’m trying to use rb\_eval\_string to execute a bunch of code and return from it straight away. My problem is that the code I want to eval contains a continuous loop. Even if I wrap the code in a thread the call s…

---

## [Error accessing X.Org commands with ruby shell command scripts](https://www.ruby-forum.com/t/error-accessing-x-org-commands-with-ruby-shell-command-scripts/172056)

<div class="topic-metadata">

**Author:** [@gremio](https://www.ruby-forum.com/u/gremio)\
**Replies:** 2\
**Last updated:** [July 14, 2009, 12:26am UTC](https://www.ruby-forum.com/t/error-accessing-x-org-commands-with-ruby-shell-command-scripts/172056 "2009-07-14T00:26:58Z")

</div>

I am trying to run an X.Org command from within ruby’s shell commands and am receiving “Command Not Found” errors. As a walk through, I first start my X server (xvfb) and then start irb. In irb, if I type: ls -al I…

---

## [Looking for a rack middleware to dump http request response traces](https://www.ruby-forum.com/t/looking-for-a-rack-middleware-to-dump-http-request-response-traces/172057)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 0\
**Last updated:** [July 14, 2009, 12:17am UTC](https://www.ruby-forum.com/t/looking-for-a-rack-middleware-to-dump-http-request-response-traces/172057 "2009-07-14T00:17:37Z")

</div>

I was thinking about writing a rack middleware which would dump each request and response coming into a server, but I thought that surely something like that must surely already exist. I’d like to write somthing like …

---

## [Calculating an array of dates](https://www.ruby-forum.com/t/calculating-an-array-of-dates/171890)

<div class="topic-metadata">

**Author:** [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Replies:** 4\
**Last updated:** [July 13, 2009, 7:28pm UTC](https://www.ruby-forum.com/t/calculating-an-array-of-dates/171890 "2009-07-13T19:28:20Z")

</div>

I have the following test script. My objective is to have an array of dates between this week’s Thursday and some date in the past that I get out of a call to a database. You can see the output below which is not wh…

---

## [TCPServer â€” send and recieve simultaneous](https://www.ruby-forum.com/t/tcpserver-a-send-and-recieve-simultaneous/171938)

<div class="topic-metadata">

**Author:** [@linopolus](https://www.ruby-forum.com/u/linopolus)\
**Replies:** 9\
**Last updated:** [July 13, 2009, 7:01pm UTC](https://www.ruby-forum.com/t/tcpserver-a-send-and-recieve-simultaneous/171938 "2009-07-13T19:01:05Z")

</div>

Hi I’m trying to make a sublet(http://unexist.scrapping.cc/projects/subtle/wiki/Sublets) the title, artist and time from shell-fm. My code:http://sprunge.us/QheF?rb But I didn’t recieve anything. With puts(“skip”) t…

---

## [Fibonacci numbers - newbie question](https://www.ruby-forum.com/t/fibonacci-numbers-newbie-question/171959)

<div class="topic-metadata">

**Author:** [@koko](https://www.ruby-forum.com/u/koko)\
**Replies:** 8\
**Last updated:** [July 13, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/fibonacci-numbers-newbie-question/171959 "2009-07-13T18:25:47Z")

</div>

Dear All, I have two Fibonacci method, and I got different result. What wrong in my code.? def fib(n) if n \< 2 1 else fib(n-2) + fib(n-1) end end puts fib(10) # —\> 89 def fib1(x) return x if x \< 2 return fib…

---

## [\[Bug:1.9\] Enumerator.new { }.take(1).inject(&:+) causes stack overflow](https://www.ruby-forum.com/t/bug-1-9-enumerator-new-take-1-inject-causes-stack-overflow/168502)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 5\
**Last updated:** [July 13, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/bug-1-9-enumerator-new-take-1-inject-causes-stack-overflow/168502 "2009-07-13T18:17:35Z")

</div>

e$B1sF#$G$9!#e(B e$B0J2\<$N$h$&$K$9$k$H!"Ff$Ne(B SystemStackError e$B$,=P$F$-$^$9!#e(B $ ./ruby -ve ‘Enumerator.new { }.take(1).inject(&:+)’ ruby 1.9.2dev (2009-05-19 trunk 23489) \[i686-linux\] -e:1:in proc': stack lev…

---

## [\[Feature:1.9\] transcode for UTF8-MAC](https://www.ruby-forum.com/t/feature-1-9-transcode-for-utf8-mac/165695)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 7\
**Last updated:** [July 13, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/feature-1-9-transcode-for-utf8-mac/165695 "2009-07-13T18:12:19Z")

</div>

e$B$3$s$P$s$Oe(B sheepman e$B$G$9!#e(B 1.9 e$B$Ne(B TODO e$B%j%9%H$,$I$N$h$&$K4IM}$5$l$F$$$k$N$+J,$+$i$J$$$N$Ge(B e$B3NG’$G$9!#e(B UTF8-MACe$B$Ne(Btranscodee$B$,\<BAu$5$l$kM=Dj$H$$$&$N$O$"$k$N$G$7$g$&$+!#e(B e$B$D$^$…

---

## [MYSQL insert](https://www.ruby-forum.com/t/mysql-insert/172033)

<div class="topic-metadata">

**Author:** [@jbell38](https://www.ruby-forum.com/u/jbell38)\
**Replies:** 2\
**Last updated:** [July 13, 2009, 5:50pm UTC](https://www.ruby-forum.com/t/mysql-insert/172033 "2009-07-13T17:50:41Z")

</div>

I’m trying to insert values from a variable into a test MYSQL. It works from a fixed value but not if the value is in a variable. require ‘mysql’ $test = “ABC” #db.query(‘insert into etf\_list values ($test)’) \>\> in…

---

## [One line sorting](https://www.ruby-forum.com/t/one-line-sorting/171917)

<div class="topic-metadata">

**Author:** [@Haris\_BogdanoviS\_S](https://www.ruby-forum.com/u/Haris_BogdanoviS_S)\
**Replies:** 21\
**Last updated:** [July 13, 2009, 5:02pm UTC](https://www.ruby-forum.com/t/one-line-sorting/171917 "2009-07-13T17:02:11Z")

</div>

Hi. I would like to implement a sorting algorithm in one line of code if possible. n=\[7,4,9,55,98,11,42\] n.inject(n\[0\]) {|min, i| min=i if i\<min; min} I first find lowest number in list and then would like to replac…

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

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