# Ruby

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

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

---

## [Adding a =~ method to the Method class](https://www.ruby-forum.com/t/adding-a-method-to-the-method-class/167380)

<div class="topic-metadata">

**Author:** [@solidgumby](https://www.ruby-forum.com/u/solidgumby)\
**Replies:** 5\
**Last updated:** [May 7, 2009, 11:22am UTC](https://www.ruby-forum.com/t/adding-a-method-to-the-method-class/167380 "2009-05-07T11:22:08Z")

</div>

The Ruby API specifies that objects of the Method class have an instance method “==”: “Two method objects are equal if that are bound to the same object and contain the same body.” At this moment, I would very much l…

---

## [Calling winapi for EnumDisplayMonitors](https://www.ruby-forum.com/t/calling-winapi-for-enumdisplaymonitors/167294)

<div class="topic-metadata">

**Author:** [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Replies:** 3\
**Last updated:** [May 7, 2009, 10:57am UTC](https://www.ruby-forum.com/t/calling-winapi-for-enumdisplaymonitors/167294 "2009-05-07T10:57:18Z")

</div>

I am trying to write a desktop application in Ruby. We need to find out what monitors are attached to the XP machine this will run on. I looked at how SWT does this and it is accomplished via calling EnumDisplayMonito…

---

## [1.8.7 doesn't work on Ubuntu](https://www.ruby-forum.com/t/1-8-7-doesnt-work-on-ubuntu/167371)

<div class="topic-metadata">

**Author:** [@superwick](https://www.ruby-forum.com/u/superwick)\
**Replies:** 5\
**Last updated:** [May 7, 2009, 10:27am UTC](https://www.ruby-forum.com/t/1-8-7-doesnt-work-on-ubuntu/167371 "2009-05-07T10:27:06Z")

</div>

Does anyone know how to get around this: http://redmine.ruby-lang.org/issues/show/863 Thanks, – Chad

---

## [How to profile Ruby 1.9 and/or JRuby code? (ruby-prof works only on MRI Ruby 1.8)](https://www.ruby-forum.com/t/how-to-profile-ruby-1-9-and-or-jruby-code-ruby-prof-works-only-on-mri-ruby-1-8/167293)

<div class="topic-metadata">

**Author:** [@Shot\_SPiotr\_S.S](https://www.ruby-forum.com/u/Shot_SPiotr_S.S)\
**Replies:** 2\
**Last updated:** [May 7, 2009, 9:19am UTC](https://www.ruby-forum.com/t/how-to-profile-ruby-1-9-and-or-jruby-code-ruby-prof-works-only-on-mri-ruby-1-8/167293 "2009-05-07T09:19:12Z")

</div>

I love ruby-prof, but it unfortunately does not work neither under MRI Ruby 1.9 nor under JRuby. How can one profile MRI Ruby 1.9 and/or JRuby code? (I can try backporting my code to Ruby 1.8.7, but itâ€™s additional …

---

## [General Nokogiri problem](https://www.ruby-forum.com/t/general-nokogiri-problem/167378)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 3\
**Last updated:** [May 7, 2009, 9:09am UTC](https://www.ruby-forum.com/t/general-nokogiri-problem/167378 "2009-05-07T09:09:44Z")

</div>

Hello, On several sites(probably malformed HTML/JavaScript/XML/general parsing hell) I have the following problem. For ex: moonwolf@trantor:~/ruby$ irb irb(main):001:0\> \[‘rubygems’,‘nokogiri’,‘hpricot’,‘open-uri’\].e…

---

## [Sort and localization](https://www.ruby-forum.com/t/sort-and-localization/167347)

<div class="topic-metadata">

**Author:** [@giampiz](https://www.ruby-forum.com/u/giampiz)\
**Replies:** 2\
**Last updated:** [May 7, 2009, 9:09am UTC](https://www.ruby-forum.com/t/sort-and-localization/167347 "2009-05-07T09:09:23Z")

</div>

Hi to all I’m trying to solve projecteuler problem 022 (#22 Names Scores - Project Euler) but with no success. I suspect it may depend on localization of ruby sort (???). So my question is: may ruby sort change due t…

---

## [Tcp multiple client / server... for each connection write](https://www.ruby-forum.com/t/tcp-multiple-client-server-for-each-connection-write/167370)

<div class="topic-metadata">

**Author:** [@i8igmac](https://www.ruby-forum.com/u/i8igmac)\
**Replies:** 1\
**Last updated:** [May 7, 2009, 8:36am UTC](https://www.ruby-forum.com/t/tcp-multiple-client-server-for-each-connection-write/167370 "2009-05-07T08:36:18Z")

</div>

im putting together a server with multiple clients establishing a connection… I need each client connected to retreave a string from the server then the client’s will process this string… string = gets, this is how th…

---

## [Base62 encoding/decoding](https://www.ruby-forum.com/t/base62-encoding-decoding/167235)

<div class="topic-metadata">

**Author:** [@srikanth\_j](https://www.ruby-forum.com/u/srikanth_j)\
**Replies:** 4\
**Last updated:** [May 7, 2009, 7:45am UTC](https://www.ruby-forum.com/t/base62-encoding-decoding/167235 "2009-05-07T07:45:50Z")

</div>

Hi, can anyone help me in base62 encoding?? if i Encode “ilovemyworld” i should get a code with format\[A-Za-z0-9\]. If i decode the format, i should get back “ilovemyworld” For Example, encode “ilovemyworld” # eDr4e3…

---

## [Seven Tips for Successful Interview](https://www.ruby-forum.com/t/seven-tips-for-successful-interview/167373)

<div class="topic-metadata">

**Author:** [@Jaggu\_BN](https://www.ruby-forum.com/u/Jaggu_BN)\
**Replies:** 0\
**Last updated:** [May 7, 2009, 7:25am UTC](https://www.ruby-forum.com/t/seven-tips-for-successful-interview/167373 "2009-05-07T07:25:49Z")

</div>

This Very usefull eBook to get Success in Interview. This is will teach you, what about Interview, how to face an Interview, Tips about Interview etc… you must read this… http://www.netinfocentre.com/IntSevenTips.htm…

---

## [\[Bug #1433\] test\_sprintf\_p fails](https://www.ruby-forum.com/t/bug-1433-test-sprintf-p-fails/167173)

<div class="topic-metadata">

**Author:** [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Replies:** 2\
**Last updated:** [May 7, 2009, 7:24am UTC](https://www.ruby-forum.com/t/bug-1433-test-sprintf-p-fails/167173 "2009-05-07T07:24:03Z")

</div>

Bug #1433: test\_sprintf\_p fails http://redmine.ruby-lang.org/issues/show/1433 e$B5/I\<\<Te(B: Yui NARUSE e$B%9%F!\<%?%9e(B: Assigned, e$BM%@hEYe(B: High e$BC4Ev\<Te(B: Usaku NAKAMURA, e$B%+%F%4%je(B: M17N, Target version…

---

## [Maxsize error in exporting excel file](https://www.ruby-forum.com/t/maxsize-error-in-exporting-excel-file/166279)

<div class="topic-metadata">

**Author:** [@ganeshk](https://www.ruby-forum.com/u/ganeshk)\
**Replies:** 2\
**Last updated:** [May 7, 2009, 6:48am UTC](https://www.ruby-forum.com/t/maxsize-error-in-exporting-excel-file/166279 "2009-05-07T06:48:08Z")

</div>

Hi, I am having exporting data to excel file from one report in our project.But the report contains more than 5 lack records so the parse excel gem it is giving “max size error” Plz reply me if anybody knows solution …

---

## [Reading a zip file from a GET request without saving?](https://www.ruby-forum.com/t/reading-a-zip-file-from-a-get-request-without-saving/167358)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 1\
**Last updated:** [May 7, 2009, 6:30am UTC](https://www.ruby-forum.com/t/reading-a-zip-file-from-a-get-request-without-saving/167358 "2009-05-07T06:30:57Z")

</div>

All: I am trying read zip file from HTTP GET request. One way to do it is by saving the response body to a physical file first and then reading the zip file to read the files inside the zip. Is there a way to read th…

---

## [Rack Thread Issue](https://www.ruby-forum.com/t/rack-thread-issue/167368)

<div class="topic-metadata">

**Author:** [@ADADAD](https://www.ruby-forum.com/u/ADADAD)\
**Replies:** 0\
**Last updated:** [May 7, 2009, 6:26am UTC](https://www.ruby-forum.com/t/rack-thread-issue/167368 "2009-05-07T06:26:41Z")

</div>

Hey all, Just came across this bug on kenai about a rack threading issue. Does anyone know how severe this is and if its easily reproducible? https://kenai.com/jira/browse/JRUBY\_RACK-4 Thanks Adam To unsubscribe f…

---

## [Code Review: Files3](https://www.ruby-forum.com/t/code-review-files3/167366)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 1\
**Last updated:** [May 7, 2009, 3:46am UTC](https://www.ruby-forum.com/t/code-review-files3/167366 "2009-05-07T03:46:58Z")

</div>

tfpt review “/shelveset:Files3;REDMOND\\tomat” Improves performance for file IO#read method. Previously we were 10x slower than MRI, now we are approx. 1.5-times faster. Tomas MRI: D:\\temp\>ruby file.rb user sys…

---

## [How to get class' filepath from methods in included mixin?](https://www.ruby-forum.com/t/how-to-get-class-filepath-from-methods-in-included-mixin/167364)

<div class="topic-metadata">

**Author:** [@nigelh](https://www.ruby-forum.com/u/nigelh)\
**Replies:** 2\
**Last updated:** [May 7, 2009, 3:08am UTC](https://www.ruby-forum.com/t/how-to-get-class-filepath-from-methods-in-included-mixin/167364 "2009-05-07T03:08:22Z")

</div>

Hi, File.dirname(FILE) returns the current folder where the script in, How to get it from methods in included modules? My sample code as below: helper.rb module Helper def your\_path puts instance\_eval { File.expand…

---

## [System call not working under cron](https://www.ruby-forum.com/t/system-call-not-working-under-cron/167351)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 9\
**Last updated:** [May 7, 2009, 1:53am UTC](https://www.ruby-forum.com/t/system-call-not-working-under-cron/167351 "2009-05-07T01:53:18Z")

</div>

I have a short ruby script to periodically change the screen background under gnome (Ubuntu Linux). Trace statements in the script show that the script itself is running. The problem is that the system() call is not w…

---

## [Autotest](https://www.ruby-forum.com/t/autotest/167354)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 11:46pm UTC](https://www.ruby-forum.com/t/autotest/167354 "2009-05-06T23:46:15Z")

</div>

Has anyone successfully used autotest with JRuby under cygwin? When I run it it just hangs and I get no output. Mark V.

---

## [Ruby/Tk running very slowly](https://www.ruby-forum.com/t/ruby-tk-running-very-slowly/167045)

<div class="topic-metadata">

**Author:** [@javamllama](https://www.ruby-forum.com/u/javamllama)\
**Replies:** 2\
**Last updated:** [May 6, 2009, 11:26pm UTC](https://www.ruby-forum.com/t/ruby-tk-running-very-slowly/167045 "2009-05-06T23:26:53Z")

</div>

Ruby/Tk runs very slowly and I can’t figure out why. It’s so slow that I can every little widget being drawn. It didn’t used to be like this, but I messed around with my computer and broke something, I guess. My OS…

---

## [Delegate and unless for \_\_](https://www.ruby-forum.com/t/delegate-and-unless-for/167249)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 4\
**Last updated:** [May 6, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/delegate-and-unless-for/167249 "2009-05-06T23:16:56Z")

</div>

Anytime I see the delegate code usually there is an unless along with it. The code might look like this. Object.instance\_methods.each do |m| delegate m, :to =\> :@model unless m =~ /^\_\_/ end I am thinking that \_\_ is …

---

## [ISMM 2009 Call for Participation](https://www.ruby-forum.com/t/ismm-2009-call-for-participation/167350)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 11:01pm UTC](https://www.ruby-forum.com/t/ismm-2009-call-for-participation/167350 "2009-05-06T23:01:41Z")

</div>

CALL FOR PARTICIPATION ACM SIGPLAN 2009 International Symposium on Memory Management June 19-20, 2009, Dublin, Ireland Co-located events …

---

## [Ruby 1.9.1 on windows](https://www.ruby-forum.com/t/ruby-1-9-1-on-windows/167298)

<div class="topic-metadata">

**Author:** [@dcian](https://www.ruby-forum.com/u/dcian)\
**Replies:** 8\
**Last updated:** [May 6, 2009, 9:32pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-on-windows/167298 "2009-05-06T21:32:26Z")

</div>

Hi all, How can I install Ruby 1.9.1 on Windows? The one click installer is still at version 1.8.6. Thanks Ian

---

## [Redirecting TestRunner output from console to file](https://www.ruby-forum.com/t/redirecting-testrunner-output-from-console-to-file/167292)

<div class="topic-metadata">

**Author:** [@the\_zonker](https://www.ruby-forum.com/u/the_zonker)\
**Replies:** 1\
**Last updated:** [May 6, 2009, 8:03pm UTC](https://www.ruby-forum.com/t/redirecting-testrunner-output-from-console-to-file/167292 "2009-05-06T20:03:48Z")

</div>

Hi guys I’m novice both in Ruby and test/unit, so keep it in mind. I have the following question: How can I redirect the Test Runner output from console to some file or string variable? E.g. I run tests with the f…

---

## [Help with connecting to SQL Server 2005 Database with Ruby](https://www.ruby-forum.com/t/help-with-connecting-to-sql-server-2005-database-with-ruby/167311)

<div class="topic-metadata">

**Author:** [@arti\_singh](https://www.ruby-forum.com/u/arti_singh)\
**Replies:** 2\
**Last updated:** [May 6, 2009, 6:11pm UTC](https://www.ruby-forum.com/t/help-with-connecting-to-sql-server-2005-database-with-ruby/167311 "2009-05-06T18:11:36Z")

</div>

I am quite new to ruby and trying to connect to a SQL Server 2005 Database with ruby to run a few queries but I am not getting anywhere. Am I missing something? I am getting a connection refused on all counts. I have…

---

## [\[ANN\] gettext-2.0.2, gettext\_activerecord-2.0.2, gettext\_rails-2.0.2](https://www.ruby-forum.com/t/ann-gettext-2-0-2-gettext-activerecord-2-0-2-gettext-rails-2-0-2/167321)

<div class="topic-metadata">

**Author:** [@Masao\_M](https://www.ruby-forum.com/u/Masao_M)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 6:04pm UTC](https://www.ruby-forum.com/t/ann-gettext-2-0-2-gettext-activerecord-2-0-2-gettext-rails-2-0-2/167321 "2009-05-06T18:04:06Z")

</div>

Hi, Ruby-GetText-Package-2.0.2 and the families (gettext-2.0.2, gettext\_activerecord-2.0.2 and gettext\_rails-2.0.2) are now available. Ruby-GetText-Package is the library/tools for message localization. gettext - M…

---

## [User Entered Data(Read Only Data) to Excel](https://www.ruby-forum.com/t/user-entered-data-read-only-data-to-excel/167320)

<div class="topic-metadata">

**Author:** [@rasein](https://www.ruby-forum.com/u/rasein)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 6:01pm UTC](https://www.ruby-forum.com/t/user-entered-data-read-only-data-to-excel/167320 "2009-05-06T18:01:55Z")

</div>

Hi All, I am new to Ruby, new task has been given to me by the company and they asked me to use ruby for it Capture the User Entered data’s in a webpage which is Readonly ( Data’s can be in Text, List, Radio button,…

---

## [Locale-2.0.2, locale\_rails-2.0.2](https://www.ruby-forum.com/t/locale-2-0-2-locale-rails-2-0-2/167319)

<div class="topic-metadata">

**Author:** [@Masao\_M](https://www.ruby-forum.com/u/Masao_M)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/locale-2-0-2-locale-rails-2-0-2/167319 "2009-05-06T17:54:44Z")

</div>

Hi, Ruby-Locale(locale-2.0.2) and Ruby-Locale for Ruby on Rails(locale\_rails-2.0.2) are now available. Ruby-Locale is the library to manage/detect various format of locale IDs(language tags), and provide ISO 639-3, …

---

## [JRuby/Rails native extensions](https://www.ruby-forum.com/t/jruby-rails-native-extensions/167306)

<div class="topic-metadata">

**Author:** [@akochnev](https://www.ruby-forum.com/u/akochnev)\
**Replies:** 2\
**Last updated:** [May 6, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/jruby-rails-native-extensions/167306 "2009-05-06T17:33:01Z")

</div>

From attending Charles’ presentation at Community One East this year (http://www28.cplan.com/cc231/session\_details.jsp?isid=304267&ilocation\_id=231-1&ilanguage=english) I somehow got the distinct impression that JRuby …

---

## [Design question](https://www.ruby-forum.com/t/design-question/167295)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 1\
**Last updated:** [May 6, 2009, 4:32pm UTC](https://www.ruby-forum.com/t/design-question/167295 "2009-05-06T16:32:02Z")

</div>

Hello, I am building a simple tool to help with some statistical analysis of a sports site. I have the following: class Player # just a wrapper around ostruct for read\_only access class Team # a collection of players …

---

## [JRuby and JDBC ResultSet in Sqlite3](https://www.ruby-forum.com/t/jruby-and-jdbc-resultset-in-sqlite3/161715)

<div class="topic-metadata">

**Author:** [@wladjmir](https://www.ruby-forum.com/u/wladjmir)\
**Replies:** 3\
**Last updated:** [May 6, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/jruby-and-jdbc-resultset-in-sqlite3/161715 "2009-05-06T16:15:30Z")

</div>

Someone know why resultset.next() is so slow in jruby? i mean i tried to make a simple query (4 rows) directly by a jdbc sql query, because ActiveRecord took 3,5secs to do, well the executequery is pretty fast (less t…

---

## [If string = "mike" then print "Hi mike"](https://www.ruby-forum.com/t/if-string-mike-then-print-hi-mike/167260)

<div class="topic-metadata">

**Author:** [@i8igmac](https://www.ruby-forum.com/u/i8igmac)\
**Replies:** 4\
**Last updated:** [May 6, 2009, 3:29pm UTC](https://www.ruby-forum.com/t/if-string-mike-then-print-hi-mike/167260 "2009-05-06T15:29:39Z")

</div>

server/client connection so, im only a few days into ruby, im working on some tcp and there is a problem with my client.rb… if str == ??? this if statement is always skipped and im not sure why? also, from the server…

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

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