# Ruby

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

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

---

## [Hash#each with nested array as value](https://www.ruby-forum.com/t/hash-each-with-nested-array-as-value/117520)

<div class="topic-metadata">

**Author:** [@eclubb](https://www.ruby-forum.com/u/eclubb)\
**Replies:** 3\
**Last updated:** [October 17, 2007, 8:09pm UTC](https://www.ruby-forum.com/t/hash-each-with-nested-array-as-value/117520 "2007-10-17T20:09:58Z")

</div>

I have a hash where the values are nested arrays. I’d like to be able to iterate over the hash and have 3 vars available in the block: key, value\[0\], and value\[1\]. As you can see, h.each {|a,b,c|…} doesn’t work. Is …

---

## [Compound conditionals in case when statements? Syntax?](https://www.ruby-forum.com/t/compound-conditionals-in-case-when-statements-syntax/117453)

<div class="topic-metadata">

**Author:** [@randy\_k](https://www.ruby-forum.com/u/randy_k)\
**Replies:** 11\
**Last updated:** [October 17, 2007, 7:50pm UTC](https://www.ruby-forum.com/t/compound-conditionals-in-case-when-statements-syntax/117453 "2007-10-17T19:50:55Z")

</div>

I need (or want :wink: to do something like the following: when ((/^—++ (.\*)/) and (new\_record == true)) I’ve tried a lot of variations, but either this just won’t work, or I haven’t managed to guess the proper synta…

---

## [MIT vs. Ruby/GPL License](https://www.ruby-forum.com/t/mit-vs-ruby-gpl-license/117188)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 46\
**Last updated:** [October 17, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/mit-vs-ruby-gpl-license/117188 "2007-10-17T19:40:04Z")

</div>

Rails uses the MIT license. The Ruby license is essentially the GPL (it’s a dual license). So what are the basic differences between the two and why would you pick one over the other? Thanks, T.

---

## [Building Ruby on HPUX + readline support](https://www.ruby-forum.com/t/building-ruby-on-hpux-readline-support/117502)

<div class="topic-metadata">

**Author:** [@stuart\_holden](https://www.ruby-forum.com/u/stuart_holden)\
**Replies:** 1\
**Last updated:** [October 17, 2007, 6:35pm UTC](https://www.ruby-forum.com/t/building-ruby-on-hpux-readline-support/117502 "2007-10-17T18:35:25Z")

</div>

Hi, I have successfully managed to build Ruby 1.8.6 on HP-UX, but when using irb it crashes when the cursor keys or escape keys are used. I believe that I need to rebuild Ruby with readline support enabled. In order t…

---

## [Sort\_by](https://www.ruby-forum.com/t/sort-by/117508)

<div class="topic-metadata">

**Author:** [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Replies:** 8\
**Last updated:** [October 17, 2007, 6:21pm UTC](https://www.ruby-forum.com/t/sort-by/117508 "2007-10-17T18:21:56Z")

</div>

Hello I have a list of rows which I want to order by a column. I make it with @values\_ordered = @values.sort\_by(&:id\_column) What if I want to inverse the order (like order by x desc in SQL) How could I do that usin…

---

## [Small Quicktime \*mov movies, snapshots, and pixels](https://www.ruby-forum.com/t/small-quicktime-mov-movies-snapshots-and-pixels/117503)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 4\
**Last updated:** [October 17, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/small-quicktime-mov-movies-snapshots-and-pixels/117503 "2007-10-17T18:06:43Z")

</div>

Dear all, I have many small Quicktime \*.mov movies ( 1 min maximum playing time), showing drops of some liquid falling into a glass filled with that liquid and the like. Now, I’d like to extract a sequence of snapsho…

---

## [RubyTraits 0.1](https://www.ruby-forum.com/t/rubytraits-0-1/117250)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 31\
**Last updated:** [October 17, 2007, 2:48pm UTC](https://www.ruby-forum.com/t/rubytraits-0-1/117250 "2007-10-17T14:48:43Z")

</div>

Hi list I have just released ruby-traits v0.1. This are Traits in pure Ruby 1.8. Have fun. Traits for Ruby Traits are Composable Units of Behavior, well that is the academic title, For Rubiests the following would…

---

## [RubyGems Beta 0.9.4.5](https://www.ruby-forum.com/t/rubygems-beta-0-9-4-5/117121)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 15\
**Last updated:** [October 17, 2007, 2:23pm UTC](https://www.ruby-forum.com/t/rubygems-beta-0-9-4-5/117121 "2007-10-17T14:23:30Z")

</div>

RubyGems 0.9.4.5 is a beta release for the upcoming 0.9.5 which adds several new features and fixes several bugs. To upgrade to the beta: gem update --system --source http://segment7.net/ To file bugs: http://rubyfo…

---

## [How can i connet the postgersql with ruby](https://www.ruby-forum.com/t/how-can-i-connet-the-postgersql-with-ruby/117467)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 2\
**Last updated:** [October 17, 2007, 2:08pm UTC](https://www.ruby-forum.com/t/how-can-i-connet-the-postgersql-with-ruby/117467 "2007-10-17T14:08:16Z")

</div>

Dear friends, Actually,I am having the lot of table in postgres. But i need to access the table using the ruby.How could i access that file. how can i connet the postgersql with ruby.Plese any one tell to me. by ve…

---

## [Big array, problems with deleting all empty items](https://www.ruby-forum.com/t/big-array-problems-with-deleting-all-empty-items/117296)

<div class="topic-metadata">

**Author:** [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Replies:** 9\
**Last updated:** [October 17, 2007, 2:00pm UTC](https://www.ruby-forum.com/t/big-array-problems-with-deleting-all-empty-items/117296 "2007-10-17T14:00:02Z")

</div>

it seems that I have to run it a couple different times for it to work… array.length = 16576, if that could be a potential problem. if it is, how do I work around it? 077:0\> array = File.read("/text.txt").to\_a.each { …

---

## [Who's going to RubyConf 2007](https://www.ruby-forum.com/t/whos-going-to-rubyconf-2007/117334)

<div class="topic-metadata">

**Author:** [@Werner\_Schuster\_Smu](https://www.ruby-forum.com/u/Werner_Schuster_Smu)\
**Replies:** 3\
**Last updated:** [October 17, 2007, 1:45pm UTC](https://www.ruby-forum.com/t/whos-going-to-rubyconf-2007/117334 "2007-10-17T13:45:58Z")

</div>

RubyConf 2007 in Charlotte is upon us. Who’s going? (I’m in). murphee To unsubscribe from this list please visit: http://xircles.codehaus.org/manage\_email

---

## [How to connect to Intranet Server through Ruby](https://www.ruby-forum.com/t/how-to-connect-to-intranet-server-through-ruby/117462)

<div class="topic-metadata">

**Author:** [@jhonny](https://www.ruby-forum.com/u/jhonny)\
**Replies:** 1\
**Last updated:** [October 17, 2007, 12:26pm UTC](https://www.ruby-forum.com/t/how-to-connect-to-intranet-server-through-ruby/117462 "2007-10-17T12:26:50Z")

</div>

Hi , I have my application on two different servers text drive server 2 intranet server located at some place. Right now i am using VPN to access my application that is on intranet server. Now using ruby code i n…

---

## [This is for test](https://www.ruby-forum.com/t/this-is-for-test/117483)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 2\
**Last updated:** [October 17, 2007, 11:38am UTC](https://www.ruby-forum.com/t/this-is-for-test/117483 "2007-10-17T11:38:41Z")

</div>

hai friends, This is for testing. vy vellingiri.

---

## [Drb communication problem and crash](https://www.ruby-forum.com/t/drb-communication-problem-and-crash/117084)

<div class="topic-metadata">

**Author:** [@renuplex](https://www.ruby-forum.com/u/renuplex)\
**Replies:** 8\
**Last updated:** [October 17, 2007, 10:03am UTC](https://www.ruby-forum.com/t/drb-communication-problem-and-crash/117084 "2007-10-17T10:03:32Z")

</div>

Hi, So first of all a little context of what I’m trying to do. I have Rails app that needs quite a bit of computation and I want to run the different queries in a number of different processes. To do so, I’m trying t…

---

## [How to remove "~" in those files](https://www.ruby-forum.com/t/how-to-remove-in-those-files/117384)

<div class="topic-metadata">

**Author:** [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Replies:** 13\
**Last updated:** [October 17, 2007, 9:43am UTC](https://www.ruby-forum.com/t/how-to-remove-in-those-files/117384 "2007-10-17T09:43:33Z")

</div>

Hi all, How to remove at end of the record “~”, i am trying this, but i couldn’t remove, please let me know if any body knows. for example , i have 2 files name sample1, sample2, for sample1 records:(this is one file…

---

## [Problem with assert difference](https://www.ruby-forum.com/t/problem-with-assert-difference/117472)

<div class="topic-metadata">

**Author:** [@kirankinuforu](https://www.ruby-forum.com/u/kirankinuforu)\
**Replies:** 0\
**Last updated:** [October 17, 2007, 9:39am UTC](https://www.ruby-forum.com/t/problem-with-assert-difference/117472 "2007-10-17T09:39:33Z")

</div>

HI friends, Help… I need some help on assert\_difference with example can anyone suggest me a proper link or website or can send me information about it plz… Regards, Kiran P. removed\_email\_address@domain.invalid

---

## [How can send email message using ruby?](https://www.ruby-forum.com/t/how-can-send-email-message-using-ruby/117367)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 6\
**Last updated:** [October 17, 2007, 9:38am UTC](https://www.ruby-forum.com/t/how-can-send-email-message-using-ruby/117367 "2007-10-17T09:38:45Z")

</div>

Dear friends, Can anybody try this question. Is there any way to send the message our own email,for example.yahoo-id,rediff-id. how can we send the message using ruby program.Is there any classes. If any one try mea…

---

## [Mathematics and physics](https://www.ruby-forum.com/t/mathematics-and-physics/117436)

<div class="topic-metadata">

**Author:** [@gibbs](https://www.ruby-forum.com/u/gibbs)\
**Replies:** 10\
**Last updated:** [October 17, 2007, 8:47am UTC](https://www.ruby-forum.com/t/mathematics-and-physics/117436 "2007-10-17T08:47:51Z")

</div>

I would like to know if there is some project (for ruby) for mathematics and physics like in python. For example http://www.scipy.org or http://www.vpython.org/ Thanks.

---

## [What is the use of pop3?](https://www.ruby-forum.com/t/what-is-the-use-of-pop3/117466)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 1\
**Last updated:** [October 17, 2007, 7:58am UTC](https://www.ruby-forum.com/t/what-is-the-use-of-pop3/117466 "2007-10-17T07:58:08Z")

</div>

Dear Friends, What is the use of the pop3 classes. If anybody could give some example for pop3 classes. And also I need to know how can i send the email using the smtp. For me it is working,while send and receive the…

---

## ["reversing" a Time](https://www.ruby-forum.com/t/reversing-a-time/117184)

<div class="topic-metadata">

**Author:** [@mortee](https://www.ruby-forum.com/u/mortee)\
**Replies:** 6\
**Last updated:** [October 17, 2007, 6:10am UTC](https://www.ruby-forum.com/t/reversing-a-time/117184 "2007-10-17T06:10:38Z")

</div>

Hello, is it possible to reverse order when using a Time as sort key for sort\_by? I know I could use sort, and time2 \<=\> time1, but it’s getting complicated when the sort key is compound, like sort\_by{|e| \[e.name, e…

---

## [SQLite3::SQLException: SQL logic error or missing database](https://www.ruby-forum.com/t/sqlite3-sql-logic-error-or-missing-database/117191)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 6\
**Last updated:** [October 17, 2007, 2:00am UTC](https://www.ruby-forum.com/t/sqlite3-sql-logic-error-or-missing-database/117191 "2007-10-17T02:00:35Z")

</div>

I’ve read a lot of people reporting probs with SQLite3 and this error message : SQLite3::SQLException: SQL logic error or missing database my setup : sqlite3-ruby latest ruby 1.8.6 (2007-03-13 patchlevel 0) \[powerpc…

---

## [How to set focus on a popup window?](https://www.ruby-forum.com/t/how-to-set-focus-on-a-popup-window/117456)

<div class="topic-metadata">

**Author:** [@maung](https://www.ruby-forum.com/u/maung)\
**Replies:** 0\
**Last updated:** [October 17, 2007, 1:48am UTC](https://www.ruby-forum.com/t/how-to-set-focus-on-a-popup-window/117456 "2007-10-17T01:48:40Z")

</div>

Hi, This question is more to do with Watir. How do I switch focus on a popup window and continue working in it? I’ve tried this: hwnd = @ie.enabled\_popup(4) if(hwnd) w=WinClicker.new w.makeWindowActive(hwnd) hwnd.…

---

## [How get filename from FTP::list](https://www.ruby-forum.com/t/how-get-filename-from-ftp-list/117441)

<div class="topic-metadata">

**Author:** [@Bazsl](https://www.ruby-forum.com/u/Bazsl)\
**Replies:** 1\
**Last updated:** [October 17, 2007, 1:38am UTC](https://www.ruby-forum.com/t/how-get-filename-from-ftp-list/117441 "2007-10-17T01:38:59Z")

</div>

The following code displays the file’s date, time size and name. How can I access just the file’s name from within the block? @@ftp.list(file\_template) do |f| puts f.name end Thanks.

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/117455)

<div class="topic-metadata">

**Author:** [@shawn](https://www.ruby-forum.com/u/shawn)\
**Replies:** 0\
**Last updated:** [October 17, 2007, 1:16am UTC](https://www.ruby-forum.com/t/no-subject/117455 "2007-10-17T01:16:12Z")

</div>

unsubscribe

---

## [Inheriting from javax.swing.JComponent](https://www.ruby-forum.com/t/inheriting-from-javax-swing-jcomponent/117424)

<div class="topic-metadata">

**Author:** [@johnu](https://www.ruby-forum.com/u/johnu)\
**Replies:** 2\
**Last updated:** [October 16, 2007, 9:36pm UTC](https://www.ruby-forum.com/t/inheriting-from-javax-swing-jcomponent/117424 "2007-10-16T21:36:17Z")

</div>

Hi all, I have a little sample application I’m trying to convert from Jython. This is the original jython code: from javax.swing import \* from java.awt import \* from java.lang import \* class TestPanel(JComponent): …

---

## [Needs](https://www.ruby-forum.com/t/needs/117138)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 6\
**Last updated:** [October 16, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/needs/117138 "2007-10-16T21:15:50Z")

</div>

I’m going out of town for the weekend, probably will not be working on stuff. Here’s a quick list of things that I think we still need to do for 1.1, due for a beta/RC release in just about 3 weeks. Rails performance…

---

## [Ruby for arranging fencing competitions](https://www.ruby-forum.com/t/ruby-for-arranging-fencing-competitions/117394)

<div class="topic-metadata">

**Author:** [@milo](https://www.ruby-forum.com/u/milo)\
**Replies:** 5\
**Last updated:** [October 16, 2007, 8:51pm UTC](https://www.ruby-forum.com/t/ruby-for-arranging-fencing-competitions/117394 "2007-10-16T20:51:12Z")

</div>

Sport fencing competitions are organised in pools, where every fencer fences every other and the total score is totted up at the end. Sheets like this are used to keep track of which bouts have been played and what th…

---

## [Watir: How could i click this radio button?](https://www.ruby-forum.com/t/watir-how-could-i-click-this-radio-button/117427)

<div class="topic-metadata">

**Author:** [@maung](https://www.ruby-forum.com/u/maung)\
**Replies:** 1\
**Last updated:** [October 16, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/watir-how-could-i-click-this-radio-button/117427 "2007-10-16T20:25:36Z")

</div>

I have tried several different ways, but didn’t succeed. I have a radio button which is written in onfocus javascript. If click on it, there should another radio button should show up. This is what html source code lo…

---

## [Prevent attributes vs local variable conflict in activerecord models](https://www.ruby-forum.com/t/prevent-attributes-vs-local-variable-conflict-in-activerecord-models/117417)

<div class="topic-metadata">

**Author:** [@overclokkato](https://www.ruby-forum.com/u/overclokkato)\
**Replies:** 1\
**Last updated:** [October 16, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/prevent-attributes-vs-local-variable-conflict-in-activerecord-models/117417 "2007-10-16T20:17:54Z")

</div>

Hello, I need a suggestion about a possible best practice. Consider the following piece of code class ThumbnailImage \< ActiveRecord::Base more code public # # # def request\_thumbnail(args = {}) width = args\[:width…

---

## [Puts vs. write for writing to a file](https://www.ruby-forum.com/t/puts-vs-write-for-writing-to-a-file/117381)

<div class="topic-metadata">

**Author:** [@randy\_k](https://www.ruby-forum.com/u/randy_k)\
**Replies:** 4\
**Last updated:** [October 16, 2007, 7:51pm UTC](https://www.ruby-forum.com/t/puts-vs-write-for-writing-to-a-file/117381 "2007-10-16T19:51:32Z")

</div>

I’ve done some googling, some looking in the pickaxe(2) book (using the index), and some experimenting in irb, but I can’t readily see the difference between puts and write (except that write doesn’t work in all cases…

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

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