# Ruby

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

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

---

## [Uninstalling/upgrading Ruby 1.8.7](https://www.ruby-forum.com/t/uninstalling-upgrading-ruby-1-8-7/180896)

<div class="topic-metadata">

**Author:** [@jhosteny](https://www.ruby-forum.com/u/jhosteny)\
**Replies:** 2\
**Last updated:** [December 31, 2009, 5:56am UTC](https://www.ruby-forum.com/t/uninstalling-upgrading-ruby-1-8-7/180896 "2009-12-31T05:56:40Z")

</div>

Hello, Some time ago I compiled and installed ruby 1.8.7 and left the default Snow Leopard install of ruby alone (never plan on touching it, actually). I now want to upgrade my custom install to 1.9.1, but do not kn…

---

## [\[Bug #2541\] fork $B$N$J$$4D6-$G$N(B spawn $B$K$h$kL$;HMQ(B fd $B$X$N%j%@%$%l%/%H(B](https://www.ruby-forum.com/t/bug-2541-fork-b-n-j-4d6-g-n-b-spawn-b-k-h-kl-hmq-b-fd-b-x-n-j-l-h-b/180898)

<div class="topic-metadata">

**Author:** [@SSwanabe](https://www.ruby-forum.com/u/SSwanabe)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 5:36am UTC](https://www.ruby-forum.com/t/bug-2541-fork-b-n-j-4d6-g-n-b-spawn-b-k-h-kl-hmq-b-fd-b-x-n-j-l-h-b/180898 "2009-12-31T05:36:28Z")

</div>

Bug #2541: fork e$B$N$J$$4D6-$G$Ne(B spawn e$B$K$h$kL$;HMQe(B fd e$B$X$N%j%@%$%l%/%He(B http://redmine.ruby-lang.org/issues/show/2541 e$B5/I\<\<Te(B: \_ wanabe e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low e$B%+%F%4%je(B: …

---

## [Object.send(:remove\_const, :Polygon)](https://www.ruby-forum.com/t/object-send-remove-const-polygon/180877)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 2\
**Last updated:** [December 31, 2009, 4:10am UTC](https://www.ruby-forum.com/t/object-send-remove-const-polygon/180877 "2009-12-31T04:10:27Z")

</div>

Object.send(:remove\_const, :Polygon) Newbie here. F:\\InstantRails-2.0-win\\rails\_apps\>irb -v irb 0.9.5(05/04/13) F:\\InstantRails-2.0-win\\rails\_apps\>ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) \[i386-…

---

## [Code Review: regressions](https://www.ruby-forum.com/t/code-review-regressions/180885)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [December 31, 2009, 12:43am UTC](https://www.ruby-forum.com/t/code-review-regressions/180885 "2009-12-31T00:43:15Z")

</div>

tfpt review “/shelveset:regressions;REDMOND\\jdeville” Comment : Closes the following bugs: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3196 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2…

---

## [Code Review: tzinfo2](https://www.ruby-forum.com/t/code-review-tzinfo2/180880)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [December 30, 2009, 11:56pm UTC](https://www.ruby-forum.com/t/code-review-tzinfo2/180880 "2009-12-30T23:56:58Z")

</div>

tfpt review “/shelveset:tzinfo2;REDMOND\\jdeville” Comment : Rechecks in tzinfo gem and a few related gems needed for Rails 3 and other recent checkins. Also re-enables the tzinfo tests in snap.

---

## [Index of an array containing an instance, from this instance](https://www.ruby-forum.com/t/index-of-an-array-containing-an-instance-from-this-instance/180870)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 2\
**Last updated:** [December 30, 2009, 11:56pm UTC](https://www.ruby-forum.com/t/index-of-an-array-containing-an-instance-from-this-instance/180870 "2009-12-30T23:56:30Z")

</div>

Hi, If I do this: class Foo end my\_array = \[\] my\_array\[8\] = Foo.new …From Foo instance, it is possible to get the array instance using self, such with: Class Foo def test puts “the array is: #{self}” end end …

---

## [How to avoid \\ escaping when using "= \<\<-EOF"?](https://www.ruby-forum.com/t/how-to-avoid-escaping-when-using-eof/180832)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 3\
**Last updated:** [December 30, 2009, 11:56pm UTC](https://www.ruby-forum.com/t/how-to-avoid-escaping-when-using-eof/180832 "2009-12-30T23:56:22Z")

</div>

Hi, the following code banner = \<\<-EOF // EOF puts banner produces: // How could I avoid the “” scaping so the text appears verbatim? Thanks a lot.

---

## [Awk print $4 in ruby](https://www.ruby-forum.com/t/awk-print-4-in-ruby/180614)

<div class="topic-metadata">

**Author:** [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Replies:** 16\
**Last updated:** [December 30, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/awk-print-4-in-ruby/180614 "2009-12-30T21:10:50Z")

</div>

Hi All, I had played in Ruby a while and could not get this to work. df -m Filesystem 1M-blocks Used Avail Capacity Mounted on /dev/concat/v109-v112a 7931 2619 4677 36% / \[root@vr /usr/local…

---

## [Puts return](https://www.ruby-forum.com/t/puts-return/180627)

<div class="topic-metadata">

**Author:** [@edresende](https://www.ruby-forum.com/u/edresende)\
**Replies:** 6\
**Last updated:** [December 30, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/puts-return/180627 "2009-12-30T19:45:28Z")

</div>

Hello guys, i’m new in ruby and i’m trying to create an Address Book. (I’m from Brasil) When i put the book to print “puts lista” #lista is the Address Book the method to\_s of the AddresBook class is like this: "def…

---

## [How to run one script from another, and capture the output](https://www.ruby-forum.com/t/how-to-run-one-script-from-another-and-capture-the-output/180836)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 7\
**Last updated:** [December 30, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/how-to-run-one-script-from-another-and-capture-the-output/180836 "2009-12-30T19:00:44Z")

</div>

I have the following hypothetical script that requires arguments to run. The command line execution looks like this: ‘ruby distance\_traveled.rb 60 2.5’ The output would be the following: ‘You have traveled a distance…

---

## [Promote Business by Quality Advertising!](https://www.ruby-forum.com/t/promote-business-by-quality-advertising/180863)

<div class="topic-metadata">

**Author:** [@rammani\_thapa](https://www.ruby-forum.com/u/rammani_thapa)\
**Replies:** 0\
**Last updated:** [December 30, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/promote-business-by-quality-advertising/180863 "2009-12-30T18:35:34Z")

</div>

Advertise with us that works to promote your business Cheapest rates,Targeted Visitors,Sales & Signups Ad Postings, Banner Advertise, Google Adwords More Visitors from US, Canada, UK, Europe Click US Visitors Banner …

---

## [Using #include at the instance level?](https://www.ruby-forum.com/t/using-include-at-the-instance-level/180789)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 21\
**Last updated:** [December 30, 2009, 5:27pm UTC](https://www.ruby-forum.com/t/using-include-at-the-instance-level/180789 "2009-12-30T17:27:41Z")

</div>

I would like to use #include at an instance level, such that it behaves just as it does at a class level. After a number of experiments I thought for sure it would work if I ran the include through the object’s single…

---

## [Question regarding end of line terminator](https://www.ruby-forum.com/t/question-regarding-end-of-line-terminator/180852)

<div class="topic-metadata">

**Author:** [@rogergue](https://www.ruby-forum.com/u/rogergue)\
**Replies:** 2\
**Last updated:** [December 30, 2009, 3:39pm UTC](https://www.ruby-forum.com/t/question-regarding-end-of-line-terminator/180852 "2009-12-30T15:39:59Z")

</div>

I just tried to port an old ruby programm to jruby and had to change if line =~ /{\*\\n/ to if line =~ /{\*\\r/ to make it work. Bug or Feature ? BTW: Im using JRuby 1.4 and Ruby 1.8.6, both on Windows Regards Roger …

---

## [\[ANN\] au3 0.1.1 released](https://www.ruby-forum.com/t/ann-au3-0-1-1-released/180750)

<div class="topic-metadata">

**Author:** [@quintus](https://www.ruby-forum.com/u/quintus)\
**Replies:** 22\
**Last updated:** [December 30, 2009, 2:03pm UTC](https://www.ruby-forum.com/t/ann-au3-0-1-1-released/180750 "2009-12-30T14:03:06Z")

</div>

au3 0.1.1 has been released. au3 is a library that allows you to automate and simulate (fake) user input to a Windows system by using the DLL interface of AutoIt behind the scenes. Abilities include: Cursor movement K…

---

## [How to pass a function as parameter?](https://www.ruby-forum.com/t/how-to-pass-a-function-as-parameter/180853)

<div class="topic-metadata">

**Author:** [@trapper](https://www.ruby-forum.com/u/trapper)\
**Replies:** 14\
**Last updated:** [December 30, 2009, 1:52pm UTC](https://www.ruby-forum.com/t/how-to-pass-a-function-as-parameter/180853 "2009-12-30T13:52:08Z")

</div>

I want to pass a reference to function as parameter to another function and execute the passed function. Somthing like this: def executer(func) func(1) end def test(x) p x end executer(test) How to write this co…

---

## [\[Bug #2439\] gem\_prelude.rb$B$H(Blib/rubygems.rb$B$G(BKernel#gem$B$N2D;k@-$,0\[$J$k(B](https://www.ruby-forum.com/t/bug-2439-gem-prelude-rb-b-h-blib-rubygems-rb-b-g-bkernel-gem-b-n2d-k-0-j-k-b/179818)

<div class="topic-metadata">

**Author:** [@Sho\_H](https://www.ruby-forum.com/u/Sho_H)\
**Replies:** 1\
**Last updated:** [December 30, 2009, 11:48am UTC](https://www.ruby-forum.com/t/bug-2439-gem-prelude-rb-b-h-blib-rubygems-rb-b-g-bkernel-gem-b-n2d-k-0-j-k-b/179818 "2009-12-30T11:48:47Z")

</div>

Bug #2439: gem\_prelude.rbe$B$He(Blib/rubygems.rbe$B$Ge(BKernel#geme$B$N2D;k@-$,0\[$J$ke(B http://redmine.ruby-lang.org/issues/show/2439 e$B5/I\<\<Te(B: Sho H. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal ruby -v: ruby …

---

## [Rainbows! 0.90.1 - EM::Deferrables and quieter Threads](https://www.ruby-forum.com/t/rainbows-0-90-1-em-deferrables-and-quieter-threads/180849)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 0\
**Last updated:** [December 30, 2009, 11:35am UTC](https://www.ruby-forum.com/t/rainbows-0-90-1-em-deferrables-and-quieter-threads/180849 "2009-12-30T11:35:18Z")

</div>

Rainbows! is an HTTP server for sleepy Rack applications. It is based on Unicorn, but designed to handle applications that expect long request/response times and/or slow clients. For Rack applications not heavily b…

---

## [Iterate excel columns/rows](https://www.ruby-forum.com/t/iterate-excel-columns-rows/180847)

<div class="topic-metadata">

**Author:** [@venkatraman\_r](https://www.ruby-forum.com/u/venkatraman_r)\
**Replies:** 0\
**Last updated:** [December 30, 2009, 10:32am UTC](https://www.ruby-forum.com/t/iterate-excel-columns-rows/180847 "2009-12-30T10:32:09Z")

</div>

Hi, If anybody helps me greatly appreciated… I need to run loops to the column data…below is my testdata which is in a single lengthy row… http://URL1.com http://URL2.com http://URL3.com pageTitle:Login user1 pwd1…

---

## [Ruby/ole excel delete row?](https://www.ruby-forum.com/t/ruby-ole-excel-delete-row/79409)

<div class="topic-metadata">

**Author:** [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Replies:** 10\
**Last updated:** [December 30, 2009, 10:24am UTC](https://www.ruby-forum.com/t/ruby-ole-excel-delete-row/79409 "2009-12-30T10:24:34Z")

</div>

How do I delete a row in an excel spreadsheet with win32ole? I want to loop through some rows and delete a row if a cell in the row contains a certain value. Here’s the loop I am using: excel.Range(“h2:h305”).each do…

---

## [Issue while Installing sproutcore - Connection refused](https://www.ruby-forum.com/t/issue-while-installing-sproutcore-connection-refused/180098)

<div class="topic-metadata">

**Author:** [@samu](https://www.ruby-forum.com/u/samu)\
**Replies:** 5\
**Last updated:** [December 30, 2009, 8:18am UTC](https://www.ruby-forum.com/t/issue-while-installing-sproutcore-connection-refused/180098 "2009-12-30T08:18:46Z")

</div>

Hi all, I m using MAC OS 10.5.6 version. I suppose to do a POC on sproutcore. Totally new to this stuffs . i do have Ruby(ruby 1.8.6 (2008-08-11 patchlevel 287) \[universal-darwin9.0\] ) , gems(1.0.1),rails(Rails 1.2.…

---

## [IO.popen('-') === fork?](https://www.ruby-forum.com/t/io-popen-fork/180810)

<div class="topic-metadata">

**Author:** [@nilezparker](https://www.ruby-forum.com/u/nilezparker)\
**Replies:** 5\
**Last updated:** [December 30, 2009, 12:16am UTC](https://www.ruby-forum.com/t/io-popen-fork/180810 "2009-12-30T00:16:18Z")

</div>

I just want to know if the following two are technically equivalent (calling fork(2) in UNIX environments): ########## IO.popen(’-’) {|io| … } #--------- fork do … end ########## As much explanation you want t…

---

## [Installing Gems on Windows](https://www.ruby-forum.com/t/installing-gems-on-windows/180728)

<div class="topic-metadata">

**Author:** [@rorsch](https://www.ruby-forum.com/u/rorsch)\
**Replies:** 9\
**Last updated:** [December 30, 2009, 12:08am UTC](https://www.ruby-forum.com/t/installing-gems-on-windows/180728 "2009-12-30T00:08:37Z")

</div>

I’m new to Ruby and I was wondering if every gem that works on Ruby for Linux works on Ruby for Windows. I’m trying to install both the rake (as a test) and the nfc gems on Windows, but with both I’m getting: c:\\ruby\>…

---

## [Ruby server](https://www.ruby-forum.com/t/ruby-server/180766)

<div class="topic-metadata">

**Author:** [@kalibr14](https://www.ruby-forum.com/u/kalibr14)\
**Replies:** 4\
**Last updated:** [December 29, 2009, 11:07pm UTC](https://www.ruby-forum.com/t/ruby-server/180766 "2009-12-29T23:07:45Z")

</div>

Hello Xcuz me my english is not very good!! i have just begun with ruby and i need to create a server with socket getting in input xml and return xml in output!! Could some one help me??

---

## [Question abour rand()](https://www.ruby-forum.com/t/question-abour-rand/180797)

<div class="topic-metadata">

**Author:** [@atma](https://www.ruby-forum.com/u/atma)\
**Replies:** 6\
**Last updated:** [December 29, 2009, 11:00pm UTC](https://www.ruby-forum.com/t/question-abour-rand/180797 "2009-12-29T23:00:58Z")

</div>

Dear Sirs, I’m looking for a way to create a random sequence of numbers using the ‘rand’ method. I can think of something like: while pipi == TRUE if x \> 1950 || x \< 2000 return x pipi = FALSE Since however the …

---

## [ERRORs trying to install ruby-ldap on CentOS](https://www.ruby-forum.com/t/errors-trying-to-install-ruby-ldap-on-centos/180779)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 7\
**Last updated:** [December 29, 2009, 10:26pm UTC](https://www.ruby-forum.com/t/errors-trying-to-install-ruby-ldap-on-centos/180779 "2009-12-29T22:26:16Z")

</div>

gem install ruby-ldap Building native extensions. This could take a while… ERROR: Error installing ruby-ldap: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb –with-ldap-dir=/usr –with-openlda…

---

## [Create links using erb and mysql](https://www.ruby-forum.com/t/create-links-using-erb-and-mysql/180820)

<div class="topic-metadata">

**Author:** [@adad](https://www.ruby-forum.com/u/adad)\
**Replies:** 1\
**Last updated:** [December 29, 2009, 10:17pm UTC](https://www.ruby-forum.com/t/create-links-using-erb-and-mysql/180820 "2009-12-29T22:17:53Z")

</div>

Hi, I have a database directory. On my home page, I have these links for (which I handle manually for now): A B C D E…(upto ) Z Each link is hyperlinked only if there is a name starting with that letter. If there i…

---

## [? about Search in google,com and Show Result](https://www.ruby-forum.com/t/about-search-in-google-com-and-show-result/180777)

<div class="topic-metadata">

**Author:** [@irbb](https://www.ruby-forum.com/u/irbb)\
**Replies:** 12\
**Last updated:** [December 29, 2009, 9:38pm UTC](https://www.ruby-forum.com/t/about-search-in-google-com-and-show-result/180777 "2009-12-29T21:38:44Z")

</div>

hi every body im sorry for my english bcoz my english has problem i wanna to write simple code and it to can get some text for example puts “Please Enter Your Text for search in google.com:” inp=gets { google code …

---

## [Gem Documentation Doesn't seem to help with use of modified local gem installations](https://www.ruby-forum.com/t/gem-documentation-doesnt-seem-to-help-with-use-of-modified-local-gem-installations/180819)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 1\
**Last updated:** [December 29, 2009, 9:01pm UTC](https://www.ruby-forum.com/t/gem-documentation-doesnt-seem-to-help-with-use-of-modified-local-gem-installations/180819 "2009-12-29T21:01:23Z")

</div>

Say, I am working to try modifying a gem I have partly installed, locally, but the gem documents don’t help me, so far, to learn how to look up and run things. I can see from the README how to reinstall from inside t…

---

## [Ruby Float out of range warning?](https://www.ruby-forum.com/t/ruby-float-out-of-range-warning/180791)

<div class="topic-metadata">

**Author:** [@kpathy](https://www.ruby-forum.com/u/kpathy)\
**Replies:** 6\
**Last updated:** [December 29, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/ruby-float-out-of-range-warning/180791 "2009-12-29T20:12:31Z")

</div>

I’m new to Ruby and I’ve been playing around with it abit. the following line of code produces a out of range warning. puts 3.14159 #outputting a simple float value It will output the value in console, however it will…

---

## [A Ruby appliance: What would you include?](https://www.ruby-forum.com/t/a-ruby-appliance-what-would-you-include/180783)

<div class="topic-metadata">

**Author:** [@Phillip\_G](https://www.ruby-forum.com/u/Phillip_G)\
**Replies:** 36\
**Last updated:** [December 29, 2009, 7:54pm UTC](https://www.ruby-forum.com/t/a-ruby-appliance-what-would-you-include/180783 "2009-12-29T19:54:05Z")

</div>

Hello, list! This is, of sorts, a cross post of an idea that lodged itself in my head pretty firmly. :wink: As part of scratching an itch (gain access to a \*NIX environment for my Ruby work), I’ve setup an Ubuntu VM. …

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

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