# Ruby

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

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

---

## [How many ways can I execute ruby program?](https://www.ruby-forum.com/t/how-many-ways-can-i-execute-ruby-program/101992)

<div class="topic-metadata">

**Author:** [@vijaypatel](https://www.ruby-forum.com/u/vijaypatel)\
**Replies:** 4\
**Last updated:** [August 9, 2006, 5:25pm UTC](https://www.ruby-forum.com/t/how-many-ways-can-i-execute-ruby-program/101992 "2006-08-09T17:25:55Z")

</div>

Hi all, I have to admit this is great language and good people to support it. I am newbie, and learning. I have this question for now. How many ways can I execute ruby program? 1) I know one is IRB (Interactive Ruby).…

---

## [Why doesn't Array include Comparable](https://www.ruby-forum.com/t/why-doesnt-array-include-comparable/102000)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 7\
**Last updated:** [August 9, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/why-doesnt-array-include-comparable/102000 "2006-08-09T16:58:52Z")

</div>

why wouldn’t one want this? harp:~ \> cat a.rb a = 0,1,2 b = 2,3,4 p a \< b rescue puts “can’t do that!” class Array; include Comparable; end p a \< b harp:~ \> ruby a.rb can’t do that! true ?? -a

---

## [Automatically setting irb context](https://www.ruby-forum.com/t/automatically-setting-irb-context/64502)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 9, 2006, 4:55pm UTC](https://www.ruby-forum.com/t/automatically-setting-irb-context/64502 "2006-08-09T16:55:51Z")

</div>

I currently have code like this in my .irbrc: $session = AIMS::Session.new puts “do ‘irb $session’ to start” I wanted to put “irb $session” directly in the script, so that irb would start with $session as the current…

---

## [Question on how to source a file with variables in it](https://www.ruby-forum.com/t/question-on-how-to-source-a-file-with-variables-in-it/101984)

<div class="topic-metadata">

**Author:** [@muychingon](https://www.ruby-forum.com/u/muychingon)\
**Replies:** 5\
**Last updated:** [August 9, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/question-on-how-to-source-a-file-with-variables-in-it/101984 "2006-08-09T16:52:31Z")

</div>

I’m just trying to learn some scripting in Ruby and I am trying to convert a shell script to ruby. part of the shell script does this: source ./filename.txt “filename.txt” contains variables, so then once its done so…

---

## [Error though exception handling](https://www.ruby-forum.com/t/error-though-exception-handling/102014)

<div class="topic-metadata">

**Author:** [@rickthemick](https://www.ruby-forum.com/u/rickthemick)\
**Replies:** 1\
**Last updated:** [August 9, 2006, 4:19pm UTC](https://www.ruby-forum.com/t/error-though-exception-handling/102014 "2006-08-09T16:19:48Z")

</div>

Hi! I get this error: /app/ruby/1.8.4/lib/ruby/1.8/net/telnet.rb:551:in waitfor': timed out while waiting for more data (Timeout::Error) from ./proc\_ctrl/telnetcom.rb:44:inalive?’ from ./proc\_ctrl/proc\_manager.rb:91:…

---

## [Bug in ruby or bug in my brain?](https://www.ruby-forum.com/t/bug-in-ruby-or-bug-in-my-brain/102018)

<div class="topic-metadata">

**Author:** [@ngoc](https://www.ruby-forum.com/u/ngoc)\
**Replies:** 3\
**Last updated:** [August 9, 2006, 4:19pm UTC](https://www.ruby-forum.com/t/bug-in-ruby-or-bug-in-my-brain/102018 "2006-08-09T16:19:48Z")

</div>

\#!/usr/bin/ruby diff\_file = File.open(‘diff.txt’) diff\_file.each { |line| next if line =~ /^Only/ system “dos2unix #{line.split(’ and ‘).at(1).sub(’ differ’, ‘’)}” } -\>work well #!/usr/bin/ruby diff\_file = File.…

---

## [Uploading local file into text\_field using watir](https://www.ruby-forum.com/t/uploading-local-file-into-text-field-using-watir/101538)

<div class="topic-metadata">

**Author:** [@michael](https://www.ruby-forum.com/u/michael)\
**Replies:** 7\
**Last updated:** [August 9, 2006, 4:10pm UTC](https://www.ruby-forum.com/t/uploading-local-file-into-text-field-using-watir/101538 "2006-08-09T16:10:46Z")

</div>

Could anybody help with the code below in Ruby / watir?? require ‘watir’ ie = Watir::IE.start(“http://manymoandzo/cgi-bin/arp3/arp3.pl”) ie.text\_field(:name, “name”).set(“user id”) ie.text\_field(:name, “password”).s…

---

## [Ruby Weekly News 31st July - 6th August 2006](https://www.ruby-forum.com/t/ruby-weekly-news-31st-july-6th-august-2006/102024)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 1\
**Last updated:** [August 9, 2006, 2:25pm UTC](https://www.ruby-forum.com/t/ruby-weekly-news-31st-july-6th-august-2006/102024 "2006-08-09T14:25:35Z")

</div>

http://www.rubyweeklynews.org/20060806.html Use the link above for a nicer version of this newsletter that’s formatted for the web, including links to threads and other sites. You can also subscribe to a newsletter-o…

---

## [1.9: no warning: regexp has invalid interval](https://www.ruby-forum.com/t/1-9-no-warning-regexp-has-invalid-interval/101919)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [August 9, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/1-9-no-warning-regexp-has-invalid-interval/101919 "2006-08-09T14:16:34Z")

</div>

e$B@\>;3OB9-$G$9!#e(B e$B$r8+$F5$$E$$$?$N$G$9$,!"e(B1.9e$B$@$H@55,I=8=$Ne(B e$BNL;XDj;Re(B {n,m} e$B4X78$N7Y9p$,=P$^$;$s!#e(B % ruby18 -ve ‘/.{1, 2}/ =~ “”’ ruby 1.8.5 (2006-08-09) \[i686-linux\] -e:1: warning: regex…

---

## [For Float#class why is '===' different from '=='](https://www.ruby-forum.com/t/for-float-class-why-is-different-from/101983)

<div class="topic-metadata">

**Author:** [@richB](https://www.ruby-forum.com/u/richB)\
**Replies:** 9\
**Last updated:** [August 9, 2006, 2:07pm UTC](https://www.ruby-forum.com/t/for-float-class-why-is-different-from/101983 "2006-08-09T14:07:34Z")

</div>

Sorry, very newbie question … C:/\> ruby -v ruby 1.8.2 (2004-12-25) \[i386-mswin32\] C:/\> irb irb(main):001:0\> a = 3.2 =\> 3.2 irb(main):002:0\> puts “match” if a.class==Float match =\> nil irb(main):003:0\> puts “match…

---

## [How to react on nil or wrong object-type as parameter](https://www.ruby-forum.com/t/how-to-react-on-nil-or-wrong-object-type-as-parameter/101597)

<div class="topic-metadata">

**Author:** [@yoche2001](https://www.ruby-forum.com/u/yoche2001)\
**Replies:** 29\
**Last updated:** [August 9, 2006, 10:28am UTC](https://www.ruby-forum.com/t/how-to-react-on-nil-or-wrong-object-type-as-parameter/101597 "2006-08-09T10:28:25Z")

</div>

Hi, I was just wondering: how do I react on a method-invocation with a nil-object instead of eg. String? How do I test it? And how can I assure that it is the right kind of object? class AClass def a\_method aString …

---

## [Blade will be stopped](https://www.ruby-forum.com/t/blade-will-be-stopped/102013)

<div class="topic-metadata">

**Author:** [@Shin-ichiro\_HARA](https://www.ruby-forum.com/u/Shin-ichiro_HARA)\
**Replies:** 0\
**Last updated:** [August 9, 2006, 8:22am UTC](https://www.ruby-forum.com/t/blade-will-be-stopped/102013 "2006-08-09T08:22:18Z")

</div>

The mailing list archive server blade.nagaokaut.ac.jp will be stopped: 9 August 15:00 - 13 August 1:00 (UTC) We’ll not be able to read contents of http://www.ruby-talk.com/, too. Thank you. Shin-ichiro HARA

---

## [OS X Leopard shipping with Rails!](https://www.ruby-forum.com/t/os-x-leopard-shipping-with-rails/101944)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 10\
**Last updated:** [August 9, 2006, 5:10am UTC](https://www.ruby-forum.com/t/os-x-leopard-shipping-with-rails/101944 "2006-08-09T05:10:00Z")

</div>

Look under “Internet and Web” http://www.apple.com/server/macosx/leopard/more.html This is good news for Ruby and Rails alike! Cheers, Daniel

---

## [Downloading web pages in watir](https://www.ruby-forum.com/t/downloading-web-pages-in-watir/101955)

<div class="topic-metadata">

**Author:** [@michael](https://www.ruby-forum.com/u/michael)\
**Replies:** 3\
**Last updated:** [August 9, 2006, 1:42am UTC](https://www.ruby-forum.com/t/downloading-web-pages-in-watir/101955 "2006-08-09T01:42:47Z")

</div>

could anybody tell me how to download web pages accessed through watir?? thanks michael

---

## [Some questions about Ruby and it's environment](https://www.ruby-forum.com/t/some-questions-about-ruby-and-its-environment/98504)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 14\
**Last updated:** [August 9, 2006, 1:15am UTC](https://www.ruby-forum.com/t/some-questions-about-ruby-and-its-environment/98504 "2006-08-09T01:15:46Z")

</div>

I have two issues in Ruby which are bugging me. On my (MS Windows) system, I have a couple of programs to help me live my electronic life and some of them are written in Ruby (are they still called “programs” or are…

---

## [Learning with exercises](https://www.ruby-forum.com/t/learning-with-exercises/101442)

<div class="topic-metadata">

**Author:** [@RJ\_Melton](https://www.ruby-forum.com/u/RJ_Melton)\
**Replies:** 6\
**Last updated:** [August 9, 2006, 1:12am UTC](https://www.ruby-forum.com/t/learning-with-exercises/101442 "2006-08-09T01:12:25Z")

</div>

I’ve been struggling through the pickaxe book for the last week or so, but I’m pretty new to programming and a lot of the ideas are new to me, so I’ve been having trouble making them stick. As I finish sections or ch…

---

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

<div class="topic-metadata">

**Author:** [@manowarrior](https://www.ruby-forum.com/u/manowarrior)\
**Replies:** 14\
**Last updated:** [August 9, 2006, 12:57am UTC](https://www.ruby-forum.com/t/newbie-questions/101874 "2006-08-09T00:57:45Z")

</div>

Hello, I’m new to programming at all… and I suck at maths. Plus, I’m 16 years old. My questions are: Is Ruby a good language to start with? Do I need lots of math to become a good programmer? What tutorial or a book…

---

## [Solar local time](https://www.ruby-forum.com/t/solar-local-time/101941)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [August 9, 2006, 12:27am UTC](https://www.ruby-forum.com/t/solar-local-time/101941 "2006-08-09T00:27:45Z")

</div>

i’m working on a sticky issue: i’m converting some times based on a utc time and longitude - the goal is the express the time as solar local time. the code i have is close. it does something like: DEG\_PER\_HR = 15.…

---

## [Re: mechanize timeout errors](https://www.ruby-forum.com/t/re-mechanize-timeout-errors/101950)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 6\
**Last updated:** [August 9, 2006, 12:24am UTC](https://www.ruby-forum.com/t/re-mechanize-timeout-errors/101950 "2006-08-09T00:24:45Z")

</div>

rescue execution expired (Timeout::Error) from /usr/local/lib/ruby/1.8/timeout.rb:56:in timeout' from /usr/local/lib/ruby/1.8/timeout.rb:76:intimeout’ begin page = agent.get(url) rescue Timeout::Error puts “Time…

---

## [Init\_xxx(with arg ?) in C for ruby ext?](https://www.ruby-forum.com/t/init-xxx-with-arg-in-c-for-ruby-ext/101932)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [August 9, 2006, 12:24am UTC](https://www.ruby-forum.com/t/init-xxx-with-arg-in-c-for-ruby-ext/101932 "2006-08-09T00:24:45Z")

</div>

hey all, new to C, i’m writing a ruby ext, i wonder if we could pass an arg to Init\_xxx(type \* arg) ??? this is to have a constructor in ruby like that : trick=MyClass.new(“my arg”) and if not does exists a workarou…

---

## [Application structure](https://www.ruby-forum.com/t/application-structure/101794)

<div class="topic-metadata">

**Author:** [@cjnkns](https://www.ruby-forum.com/u/cjnkns)\
**Replies:** 11\
**Last updated:** [August 9, 2006, 12:15am UTC](https://www.ruby-forum.com/t/application-structure/101794 "2006-08-09T00:15:44Z")

</div>

I am attempting to learn ruby and I can not seem to find how I would structure a ruby application. Not a rails app just a simple ruby app. I mostly have played around by putting several classes in one file and runnin…

---

## [Installing rb-gsl-1.7.0 on Windows](https://www.ruby-forum.com/t/installing-rb-gsl-1-7-0-on-windows/101968)

<div class="topic-metadata">

**Author:** [@dukael](https://www.ruby-forum.com/u/dukael)\
**Replies:** 3\
**Last updated:** [August 9, 2006, 12:00am UTC](https://www.ruby-forum.com/t/installing-rb-gsl-1-7-0-on-windows/101968 "2006-08-09T00:00:44Z")

</div>

Maybe I’m being dense but I’m trying to install GSL on Windows. I’m trying to take the precompiled route with the rb-gsl-1.7.0 tarball (http://codeforpeople.com/lib/ruby/rb-gsl-win/) and I unzip it into c:/rb-gsl-1.7.…

---

## [Using C++ Member Function with rb\_protect](https://www.ruby-forum.com/t/using-c-member-function-with-rb-protect/101964)

<div class="topic-metadata">

**Author:** [@agnathan](https://www.ruby-forum.com/u/agnathan)\
**Replies:** 8\
**Last updated:** [August 9, 2006, 12:00am UTC](https://www.ruby-forum.com/t/using-c-member-function-with-rb-protect/101964 "2006-08-09T00:00:43Z")

</div>

I’m having problems using a C++ member function with rb\_protect. Here is the code: class Sandbox { public: Sandbox() { sandbox\_ = rb\_funcall(rb\_const\_get(rb\_cObject, rb\_intern (“Sandbox”)), rb\_intern(“safe”), 0); …

---

## [Global variables considered harmful?](https://www.ruby-forum.com/t/global-variables-considered-harmful/101953)

<div class="topic-metadata">

**Author:** [@darren\_kirby](https://www.ruby-forum.com/u/darren_kirby)\
**Replies:** 7\
**Last updated:** [August 8, 2006, 11:12pm UTC](https://www.ruby-forum.com/t/global-variables-considered-harmful/101953 "2006-08-08T23:12:41Z")

</div>

Hello all, I have a Ruby script here that acts like a regular Unix program, including accepting a large number of command-line options/arguments. After processing some are simple flags (ie: nil or 1) and some are t…

---

## [Nonblocking Windows Ruby popen? (was: Re: C Threads and Rub](https://www.ruby-forum.com/t/nonblocking-windows-ruby-popen-was-re-c-threads-and-rub/101966)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 0\
**Last updated:** [August 8, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/nonblocking-windows-ruby-popen-was-re-c-threads-and-rub/101966 "2006-08-08T23:03:40Z")

</div>

From: “Francis C.” removed\_email\_address@domain.invalid The impression I got from the windows select() documentation was that it only works with winsock sockets. Ruby’s Kernel#select is quite different from the nat…

---

## [Learn to program (Chris Pine) array.sort](https://www.ruby-forum.com/t/learn-to-program-chris-pine-array-sort/99923)

<div class="topic-metadata">

**Author:** [@geoff](https://www.ruby-forum.com/u/geoff)\
**Replies:** 9\
**Last updated:** [August 8, 2006, 10:45pm UTC](https://www.ruby-forum.com/t/learn-to-program-chris-pine-array-sort/99923 "2006-08-08T22:45:40Z")

</div>

Hey, I’ve searched the archives and don’t see anything on this problem for Chris’ book. From Chapter 7 on Arrays and Iterators: “Write the program we talked about at the very beginning of this chapter. Hint: There’s…

---

## [Re: mechanize timeout errors](https://www.ruby-forum.com/t/re-mechanize-timeout-errors/101958)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [August 8, 2006, 10:42pm UTC](https://www.ruby-forum.com/t/re-mechanize-timeout-errors/101958 "2006-08-08T22:42:39Z")

</div>

\-----Original Message----- From: Alex Y. \[mailto:removed\_email\_address@domain.invalid\] Sent: Tuesday, August 08, 2006 1:27 PM To: ruby-talk ML Subject: Re: mechanize timeout errors If you want control over the …

---

## [Rake aborted! -- Help](https://www.ruby-forum.com/t/rake-aborted-help/101827)

<div class="topic-metadata">

**Author:** [@kublai](https://www.ruby-forum.com/u/kublai)\
**Replies:** 3\
**Last updated:** [August 8, 2006, 10:21pm UTC](https://www.ruby-forum.com/t/rake-aborted-help/101827 "2006-08-08T22:21:36Z")

</div>

Hi, I posted this problem on the rails forum, but got no reply. Hoping someone here may be able to lead me to a resolution. When I run rake db:migrate Rake aborts with the following message: rake aborted! No Rak…

---

## [Stopping WEBrick from logging](https://www.ruby-forum.com/t/stopping-webrick-from-logging/101945)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 4\
**Last updated:** [August 8, 2006, 9:12pm UTC](https://www.ruby-forum.com/t/stopping-webrick-from-logging/101945 "2006-08-08T21:12:29Z")

</div>

Hi all, I’m doing some local timing of some network code, and I’m using WEBrick::HTTPProxyServer to mock out the actual network access to reduce some of the variability. What I’d like to do is stop the access logging…

---

## [Re: OS X Leopard shipping with Rails!](https://www.ruby-forum.com/t/re-os-x-leopard-shipping-with-rails/101952)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [August 8, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/re-os-x-leopard-shipping-with-rails/101952 "2006-08-08T21:09:29Z")

</div>

\-----Original Message----- From: Matt T. \[mailto:removed\_email\_address@domain.invalid\] Sent: Tuesday, August 08, 2006 12:51 PM To: ruby-talk ML Subject: Re: \[OT\] OS X Leopard shipping with Rails! Well, the core guy…

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

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