# Ruby

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

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

---

## [Do\_sqlite 10 windows 1.9 gem](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171)

<div class="topic-metadata">

**Author:** [@jonty](https://www.ruby-forum.com/u/jonty)\
**Replies:** 7\
**Last updated:** [November 23, 2009, 11:54pm UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171 "2009-11-23T23:54:12Z")

</div>

I understand that this is not yet compiled for ruby 1.9 on windows I would love to have a go at compiling it as I need it to access my sqlite db from ruby 1.9 - it appears to be the last obstacle I have googled far an…

---

## [Button with images (newb)](https://www.ruby-forum.com/t/button-with-images-newb/179385)

<div class="topic-metadata">

**Author:** [@belitos](https://www.ruby-forum.com/u/belitos)\
**Replies:** 0\
**Last updated:** [November 23, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/button-with-images-newb/179385 "2009-11-23T23:16:40Z")

</div>

Hey guys, i just want to add a png file to a button, but the image is not visibile… im doing this imgOk = Gtk::Image.new(“run.png”) ok = Gtk::Button.new “Calcular” ok.set\_size\_request 70, 30 ok.image = imgOk what…

---

## [Put your RubyConf2009 blogs/summaries here!](https://www.ruby-forum.com/t/put-your-rubyconf2009-blogs-summaries-here/179378)

<div class="topic-metadata">

**Author:** [@diego\_v](https://www.ruby-forum.com/u/diego_v)\
**Replies:** 0\
**Last updated:** [November 23, 2009, 9:46pm UTC](https://www.ruby-forum.com/t/put-your-rubyconf2009-blogs-summaries-here/179378 "2009-11-23T21:46:02Z")

</div>

Hi, I’d like to read a bit about what went on at RubyConf, the talks, people’s comments etc… waiting for ConfFreak (or whoever it is this time) to put the videos online. So if anyone has written an account on RC’09, …

---

## [I can't seem to find an easy way to set Net::HTTP GET params](https://www.ruby-forum.com/t/i-cant-seem-to-find-an-easy-way-to-set-net-http-get-params/179345)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 1\
**Last updated:** [November 23, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/i-cant-seem-to-find-an-easy-way-to-set-net-http-get-params/179345 "2009-11-23T18:31:07Z")

</div>

Hello, I’m sure this is a newb question, but I’ve spent the last two hours trying to figure out how to set the query paramters on an HTTP GET request. Right now I am doing something like this: def call() Net::HTTP.…

---

## [Finding the closest value from a matrix](https://www.ruby-forum.com/t/finding-the-closest-value-from-a-matrix/179308)

<div class="topic-metadata">

**Author:** [@mittina](https://www.ruby-forum.com/u/mittina)\
**Replies:** 9\
**Last updated:** [November 23, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/finding-the-closest-value-from-a-matrix/179308 "2009-11-23T18:18:14Z")

</div>

I have a matrix that looks something like this 85 90 100 125 150 175 8 1.183 1.118 1.006 0.805 0.671 0.575 10 1.847 1.744 1.57 1.256 1.…

---

## [How i can open one port from computer](https://www.ruby-forum.com/t/how-i-can-open-one-port-from-computer/179365)

<div class="topic-metadata">

**Author:** [@sql\_injection](https://www.ruby-forum.com/u/sql_injection)\
**Replies:** 2\
**Last updated:** [November 23, 2009, 5:50pm UTC](https://www.ruby-forum.com/t/how-i-can-open-one-port-from-computer/179365 "2009-11-23T17:50:44Z")

</div>

hi im writing one program with Ruby and now i need to open one port example port 1133 from TCP now i wanna Ruby doese it to me means ruby come and opening port 1133 TCP now what should i do ? if you have source cod…

---

## [Signal example](https://www.ruby-forum.com/t/signal-example/179355)

<div class="topic-metadata">

**Author:** [@gganesh](https://www.ruby-forum.com/u/gganesh)\
**Replies:** 3\
**Last updated:** [November 23, 2009, 4:37pm UTC](https://www.ruby-forum.com/t/signal-example/179355 "2009-11-23T16:37:34Z")

</div>

Hi, Can anybody provide a ruby signal example ? I am running a simple program contains, ####################### sleep (10) trap.Signal(‘SIGNIT’) { proc to handle signal } ##################### If i will do (Ctrl +…

---

## [\[Bug #2393\] NoMethodError's message change in second time](https://www.ruby-forum.com/t/bug-2393-nomethoderrors-message-change-in-second-time/179362)

<div class="topic-metadata">

**Author:** [@SSwanabe](https://www.ruby-forum.com/u/SSwanabe)\
**Replies:** 1\
**Last updated:** [November 23, 2009, 4:07pm UTC](https://www.ruby-forum.com/t/bug-2393-nomethoderrors-message-change-in-second-time/179362 "2009-11-23T16:07:43Z")

</div>

Bug #2393: NoMethodError’s message change in second time http://redmine.ruby-lang.org/issues/show/2393 e$B5/I\<\<Te(B: \_ wanabe e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low e$B%+%F%4%je(B: core, Target version: Ruby 1.8.8 …

---

## [How i can mage EXE file after write program](https://www.ruby-forum.com/t/how-i-can-mage-exe-file-after-write-program/179366)

<div class="topic-metadata">

**Author:** [@sql\_injection](https://www.ruby-forum.com/u/sql_injection)\
**Replies:** 8\
**Last updated:** [November 23, 2009, 4:03pm UTC](https://www.ruby-forum.com/t/how-i-can-mage-exe-file-after-write-program/179366 "2009-11-23T16:03:27Z")

</div>

hi every body im sajjad from iran but studetn in india i have 2 problems frist problem has my english languige it has not good sometimes 2th problem is i have one program means i wrot one program like : puts “Hi Rub…

---

## [JRuby on windows thru proxy gem install fails](https://www.ruby-forum.com/t/jruby-on-windows-thru-proxy-gem-install-fails/172907)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 2\
**Last updated:** [November 23, 2009, 2:57pm UTC](https://www.ruby-forum.com/t/jruby-on-windows-thru-proxy-gem-install-fails/172907 "2009-11-23T14:57:47Z")

</div>

Has anyone run into this problem? Installed Jruby 1.3.1 from the windows installation exe. Installed cntlm service to authenticate the proxy server here at my work. When I do a gem list -r, I’ll get a list of all the…

---

## [Killing a thread](https://www.ruby-forum.com/t/killing-a-thread/179328)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 3\
**Last updated:** [November 23, 2009, 2:41pm UTC](https://www.ruby-forum.com/t/killing-a-thread/179328 "2009-11-23T14:41:31Z")

</div>

This code starts my application in a windows thread fine but the last line does not kill the application that got fired up initially. How come? x = Thread.new do system(‘app.exe’) end sleep 10 Thread.kill(x) Davi…

---

## [How to unfreeze a string?](https://www.ruby-forum.com/t/how-to-unfreeze-a-string/179364)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 1\
**Last updated:** [November 23, 2009, 2:16pm UTC](https://www.ruby-forum.com/t/how-to-unfreeze-a-string/179364 "2009-11-23T14:16:31Z")

</div>

x="hello " x.freeze x.concat “boy” RuntimeError: can’t modify frozen string Then how to unfreeze a string? Thanks.

---

## [Rspec windows gem not running on 1.9?](https://www.ruby-forum.com/t/rspec-windows-gem-not-running-on-1-9/179357)

<div class="topic-metadata">

**Author:** [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Replies:** 2\
**Last updated:** [November 23, 2009, 12:17pm UTC](https://www.ruby-forum.com/t/rspec-windows-gem-not-running-on-1-9/179357 "2009-11-23T12:17:33Z")

</div>

Hi All, My spec files work on 1.8. Running on 1.9.1-p243 (mingw) with rspec-1.2.9, I get a GC error : F:\\dev\\ruby\\DMX\>rake ruby19:spec (in F:/dev/ruby/DMX) 1.9.1 \[BUG\] cross-thread violation on rb\_gc() ruby 1.8.6…

---

## [How to match and count](https://www.ruby-forum.com/t/how-to-match-and-count/179320)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 7\
**Last updated:** [November 23, 2009, 9:33am UTC](https://www.ruby-forum.com/t/how-to-match-and-count/179320 "2009-11-23T09:33:49Z")

</div>

Hello, I have been using awk for some text handling. Now I’m beginning Ruby (really newbie) and want to find a way in ruby to do this with awk: awk ‘{if ($4~/something/) {i+=1}} END {print i}’ file.txt That means i…

---

## [\[ANN\] Detective - a new ruby gem](https://www.ruby-forum.com/t/ann-detective-a-new-ruby-gem/179299)

<div class="topic-metadata">

**Author:** [@aelshafee](https://www.ruby-forum.com/u/aelshafee)\
**Replies:** 8\
**Last updated:** [November 23, 2009, 8:26am UTC](https://www.ruby-forum.com/t/ann-detective-a-new-ruby-gem/179299 "2009-11-23T08:26:32Z")

</div>

Detective is a new gem build by BadrIT (www.badrit.com) to investigate the ruby source code. Example View the source of a class method … require ‘detective’ Detective.view\_source(‘ActiveRecord::Base.find\_by\_sql’) R…

---

## [Stupid question (hopefully) on become\_java!](https://www.ruby-forum.com/t/stupid-question-hopefully-on-become-java/179352)

<div class="topic-metadata">

**Author:** [@cnick](https://www.ruby-forum.com/u/cnick)\
**Replies:** 1\
**Last updated:** [November 23, 2009, 8:13am UTC](https://www.ruby-forum.com/t/stupid-question-hopefully-on-become-java/179352 "2009-11-23T08:13:04Z")

</div>

All, I’ve been furiously coding on the hibernate stuff I demoed at JRubyconf today as I wait for my airplane and am trying to get annotations working. The API for the annotation configuration wants me to call an add…

---

## [Problem with calling an exe in the script](https://www.ruby-forum.com/t/problem-with-calling-an-exe-in-the-script/179351)

<div class="topic-metadata">

**Author:** [@deepti](https://www.ruby-forum.com/u/deepti)\
**Replies:** 2\
**Last updated:** [November 23, 2009, 7:42am UTC](https://www.ruby-forum.com/t/problem-with-calling-an-exe-in-the-script/179351 "2009-11-23T07:42:04Z")

</div>

I am not able able to start a thread which checks the pop-ups in the background. I used this code but doesn’t seem to work… x=Thread.new do system(“c:\\CVPN\_Automation\\popupHandler\\popupHandler.exe”) end Any suggesti…

---

## [Blank lines in terminal](https://www.ruby-forum.com/t/blank-lines-in-terminal/179338)

<div class="topic-metadata">

**Author:** [@revenantphoenix](https://www.ruby-forum.com/u/revenantphoenix)\
**Replies:** 2\
**Last updated:** [November 23, 2009, 7:31am UTC](https://www.ruby-forum.com/t/blank-lines-in-terminal/179338 "2009-11-23T07:31:43Z")

</div>

I have an IRC bot I wrote, and I would like to have it so that in the console window, the bottom one or two lines are always blank. In other words, I want puts/print to output to the second line from the bottom instea…

---

## [Build error if PTHREAD\_STACK\_MIN is a function call](https://www.ruby-forum.com/t/build-error-if-pthread-stack-min-is-a-function-call/179342)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [November 23, 2009, 3:18am UTC](https://www.ruby-forum.com/t/build-error-if-pthread-stack-min-is-a-function-call/179342 "2009-11-23T03:18:41Z")

</div>

e$B1sF#$G$9!#e(B OpenSolaris e$B$Ge(B ruby e$B$r%S%k%I$7$F$\_$?$i%(%i!\<$,=P$^$7$?!#e(B In file included from thread.c:213: thread\_pthread.c:470: error: enumerator value for RUBY\_STACK\_MIN' not integer constant thread.c…

---

## [Ruby 1.9.1p339$B$,(Btest-all$B$G(Bsegv](https://www.ruby-forum.com/t/ruby-1-9-1p339-b-btest-all-b-g-bsegv/179126)

<div class="topic-metadata">

**Author:** [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Replies:** 2\
**Last updated:** [November 23, 2009, 2:26am UTC](https://www.ruby-forum.com/t/ruby-1-9-1p339-b-btest-all-b-g-bsegv/179126 "2009-11-23T02:26:35Z")

</div>

Ruby 1.9.1p339(r25816)e$B$Ge(Bmake test-alle$B$r\<B9T$7$?$H$3$me(B e$B\<j85$N4D6-$G$Oe(Bsegve$B$7$F$7$^$$$^$7$?!#e(B e$B\<j85$N4D6-$KLdBj$,$"$k$+$b$7$l$^$;$s$,!“e(B e$B\>$7$/3NG’$9$k;~4V$r:#$9$0$K$O$H$l$J$$$N$Ge(B e$B$H$…

---

## [All in one Ruby - HELP!](https://www.ruby-forum.com/t/all-in-one-ruby-help/179319)

<div class="topic-metadata">

**Author:** [@belitos](https://www.ruby-forum.com/u/belitos)\
**Replies:** 7\
**Last updated:** [November 23, 2009, 1:40am UTC](https://www.ruby-forum.com/t/all-in-one-ruby-help/179319 "2009-11-23T01:40:54Z")

</div>

Hey guys! im trying to run my Ruby scripts in a computer that havent got the Ruby interpreter, and my script use a GUI based on GTK. to make this standalone ruby im using All in One Ruby. but the GTK libs and stuff ar…

---

## [Newbie question: Enumerators](https://www.ruby-forum.com/t/newbie-question-enumerators/179312)

<div class="topic-metadata">

**Author:** [@omran\_n](https://www.ruby-forum.com/u/omran_n)\
**Replies:** 4\
**Last updated:** [November 23, 2009, 12:31am UTC](https://www.ruby-forum.com/t/newbie-question-enumerators/179312 "2009-11-23T00:31:19Z")

</div>

Hi, I know this is a very newbie question but its one concept that despite google and the O’Riley book I cant get my head around. Can someone please give a simple explantion of what exactly an Enumerator is, what it c…

---

## [Using activerecord with mysql](https://www.ruby-forum.com/t/using-activerecord-with-mysql/179006)

<div class="topic-metadata">

**Author:** [@coldtone](https://www.ruby-forum.com/u/coldtone)\
**Replies:** 12\
**Last updated:** [November 23, 2009, 12:14am UTC](https://www.ruby-forum.com/t/using-activerecord-with-mysql/179006 "2009-11-23T00:14:55Z")

</div>

Hi All, I’ve successfully been using Ruby on one machine for quite some time and now, on another machine, after: installing Ruby 1.86-27 rc2 (using the one click installer for Windows obtained from www.ruby-lang.org,…

---

## [Re: Using IronPython code from IronRuby](https://www.ruby-forum.com/t/re-using-ironpython-code-from-ironruby/179343)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [November 22, 2009, 9:59pm UTC](https://www.ruby-forum.com/t/re-using-ironpython-code-from-ironruby/179343 "2009-11-22T21:59:08Z")

</div>

IronPython binaries haven’t been uploaded yet. I’ll upload them as soon as I have internet Sent from my HTC From: Shay F. removed\_email\_address@domain.invalid Sent: Sunday, November 22, 2009 11:44 AM To: removed\_em…

---

## [Using IronPython code from IronRuby](https://www.ruby-forum.com/t/using-ironpython-code-from-ironruby/179332)

<div class="topic-metadata">

**Author:** [@shayfriedman](https://www.ruby-forum.com/u/shayfriedman)\
**Replies:** 2\
**Last updated:** [November 22, 2009, 8:44pm UTC](https://www.ruby-forum.com/t/using-ironpython-code-from-ironruby/179332 "2009-11-22T20:44:49Z")

</div>

Hi, I’m trying to load an IronPython file in IronRuby (via IronRuby.require) and I get an exception: “Failed to load language ‘IronPython 2.6’: type ‘IronPython.Runtime.PythonContext’ is not a valid language provider …

---

## [Really crazy about this (do/while)](https://www.ruby-forum.com/t/really-crazy-about-this-do-while/179322)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 7\
**Last updated:** [November 22, 2009, 5:09pm UTC](https://www.ruby-forum.com/t/really-crazy-about-this-do-while/179322 "2009-11-22T17:09:54Z")

</div>

Hello, Please see the code and running result below: case one \[root@localhost tmp\]# cat t5.rb temp = 98.4 i = 0 begin i += 1 puts “step” + i.to\_s + " befre adding is " + temp.to\_s temp += 0.1 puts “step” + i.t…

---

## [Newbie question](https://www.ruby-forum.com/t/newbie-question/179337)

<div class="topic-metadata">

**Author:** [@cmic](https://www.ruby-forum.com/u/cmic)\
**Replies:** 1\
**Last updated:** [November 22, 2009, 4:21pm UTC](https://www.ruby-forum.com/t/newbie-question/179337 "2009-11-22T16:21:29Z")

</div>

Hello I noticed the following example somewhere def mymethod(opts) p opts end mymethod(:aaa =\> “something”) I’m wondering what this :aaa stands for. If I omit the colon before the dummy aaa, it doesn’t works. Tha…

---

## [COW-friendly Ruby 1.9?](https://www.ruby-forum.com/t/cow-friendly-ruby-1-9/179311)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 4\
**Last updated:** [November 22, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/cow-friendly-ruby-1-9/179311 "2009-11-22T14:44:55Z")

</div>

Here’s my test script: a = \[\] (1024\*\*2\*10).times do a \<\< Object.new end puts ‘allocated’ gets GC.start puts “GC’d” gets GC.start unless fork puts “GC’d and sleeping” sleep 10 I’m using Ruby 1.9.1 from the Ub…

---

## [OCR of PDF-documents using GData](https://www.ruby-forum.com/t/ocr-of-pdf-documents-using-gdata/179336)

<div class="topic-metadata">

**Author:** [@ahead](https://www.ruby-forum.com/u/ahead)\
**Replies:** 0\
**Last updated:** [November 22, 2009, 2:40pm UTC](https://www.ruby-forum.com/t/ocr-of-pdf-documents-using-gdata/179336 "2009-11-22T14:40:09Z")

</div>

Hi, Has anybody been able to perform OCR on a pdf document using GData? http://googledataapis.blogspot.com/2009/09/import-scans-or-go-multilingual.html Png and jpgs work fine after setting @client.version = ‘3’ in GD…

---

## [Confuse about initialize hash](https://www.ruby-forum.com/t/confuse-about-initialize-hash/179289)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 8\
**Last updated:** [November 22, 2009, 2:20pm UTC](https://www.ruby-forum.com/t/confuse-about-initialize-hash/179289 "2009-11-22T14:20:00Z")

</div>

def in(options ={} ) p options end in(:say =\> “somehting”) # {:say =\> “something”} but under the hood of it, doesn’t that process equivalent to options = {} options = :say =\> “something” or options = :say =\> “someth…

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

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