# Ruby

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

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

---

## [Passing parameter](https://www.ruby-forum.com/t/passing-parameter/163944)

<div class="topic-metadata">

**Author:** [@arunvoip](https://www.ruby-forum.com/u/arunvoip)\
**Replies:** 5\
**Last updated:** [March 26, 2009, 4:14pm UTC](https://www.ruby-forum.com/t/passing-parameter/163944 "2009-03-26T16:14:37Z")

</div>

Hi, This is my code strip contents.each do |content| #scanning the content using regexp to fetch the url url = content.scan(/(http://.|https://.)/i) data = Net::HTTP.get(URI.parse("#{url}")) #extracting the feeds u…

---

## [Ruport in ruby1.9](https://www.ruby-forum.com/t/ruport-in-ruby1-9/163921)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 1\
**Last updated:** [March 26, 2009, 3:37pm UTC](https://www.ruby-forum.com/t/ruport-in-ruby1-9/163921 "2009-03-26T15:37:42Z")

</div>

running ruport-based program in ruby1.9, i always get the ff errors, C:\\family\\ruby\>ruby test2.rb c:/ruby/lib/ruby/gems/1.9.1/gems/ruport-util-0.14.0/lib/ruport/util/graph/amline.rb:105: warning: undefining object\_id'…

---

## [Should I use Daemonize or something else?](https://www.ruby-forum.com/t/should-i-use-daemonize-or-something-else/163964)

<div class="topic-metadata">

**Author:** [@mifi](https://www.ruby-forum.com/u/mifi)\
**Replies:** 0\
**Last updated:** [March 26, 2009, 2:47pm UTC](https://www.ruby-forum.com/t/should-i-use-daemonize-or-something-else/163964 "2009-03-26T14:47:54Z")

</div>

I’m trying to make a small Client that will run on a machine and send data up to a Controller, written with GServer, so that I can run a script on a machine and have its results sent off to the Controller on another m…

---

## [How do you install a local gem?](https://www.ruby-forum.com/t/how-do-you-install-a-local-gem/127750)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 19\
**Last updated:** [March 26, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/how-do-you-install-a-local-gem/127750 "2009-03-26T14:46:15Z")

</div>

Hi, I downloaded the file: wxruby-1.9.4-universal-darwin.gem.tar How do I install that? When I try to untar it with this command: tar -xvf /Users/me/Desktop/wxruby-1.9.4-universal-darwin.gem.tar I get the error: d…

---

## [Assert2-0.4.6 provides assert\_xhtml, an alternative to assert\_select](https://www.ruby-forum.com/t/assert2-0-4-6-provides-assert-xhtml-an-alternative-to-assert-select/163954)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [March 26, 2009, 1:55pm UTC](https://www.ruby-forum.com/t/assert2-0-4-6-provides-assert-xhtml-an-alternative-to-assert-select/163954 "2009-03-26T13:55:47Z")

</div>

Rubyists: Consider the following monstrosity, coded using assert\_select: assert\_select “div#logo\_box img\[src=/0000/0001/logo.gif\]\[alt=My Company\]” Now, behold it rewritten to use assert\_xhtml: assert\_xhtml do div.l…

---

## [Test::Unit - same test, different "args"](https://www.ruby-forum.com/t/test-unit-same-test-different-args/163681)

<div class="topic-metadata">

**Author:** [@Luke\_St.Clair](https://www.ruby-forum.com/u/Luke_St.Clair)\
**Replies:** 14\
**Last updated:** [March 26, 2009, 1:41pm UTC](https://www.ruby-forum.com/t/test-unit-same-test-different-args/163681 "2009-03-26T13:41:07Z")

</div>

I need to run the same unit test case more than 10 times (around 150 tests in the test case), with 2-3 parameters changed each time. For instance, if I had unit tests to examine a “Person”, with a required parameter “…

---

## [: HOWTO start irb on a different object](https://www.ruby-forum.com/t/howto-start-irb-on-a-different-object/163730)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 9\
**Last updated:** [March 26, 2009, 8:55am UTC](https://www.ruby-forum.com/t/howto-start-irb-on-a-different-object/163730 "2009-03-26T08:55:25Z")

</div>

I wanted to have irb start its session on an object other than the toplevel. I found a solution that I think is nicer than any I could find elsewhere. The idea is to hook into IRB::Irb#initialize and insert the Work…

---

## [Help on down\_load\_time function](https://www.ruby-forum.com/t/help-on-down-load-time-function/163924)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 0\
**Last updated:** [March 26, 2009, 6:43am UTC](https://www.ruby-forum.com/t/help-on-down-load-time-function/163924 "2009-03-26T06:43:44Z")

</div>

Hi, I needed help on down\_load\_time function as i was trying to automate my performance test cases. This function gives the time taken to download after a click to a button/link etc. to me everything was going fine …

---

## [\[ANN\] JRuby 1.2.0 Released](https://www.ruby-forum.com/t/ann-jruby-1-2-0-released/163040)

<div class="topic-metadata">

**Author:** [@Thomas\_E\_Enebo](https://www.ruby-forum.com/u/Thomas_E_Enebo)\
**Replies:** 11\
**Last updated:** [March 26, 2009, 6:18am UTC](https://www.ruby-forum.com/t/ann-jruby-1-2-0-released/163040 "2009-03-26T06:18:39Z")

</div>

The JRuby community is pleased to announce the release of JRuby 1.2.0! Homepage: http://www.jruby.org/ Download: http://dist.codehaus.org/jruby/ JRuby 1.2.0 has fixed many many compatibility issues and continued to i…

---

## [Ruby and 2D graphics](https://www.ruby-forum.com/t/ruby-and-2d-graphics/163783)

<div class="topic-metadata">

**Author:** [@pmak](https://www.ruby-forum.com/u/pmak)\
**Replies:** 21\
**Last updated:** [March 26, 2009, 3:00am UTC](https://www.ruby-forum.com/t/ruby-and-2d-graphics/163783 "2009-03-26T03:00:58Z")

</div>

Hi everybody, I’m searching for a way to get simple graphical output in ruby for a simple physics simulation. All I need are circles and lines and a decent framerate in fullscreen-like resolutions. I tried ruby-proces…

---

## [Posting to PayPal with Net::HTTPS](https://www.ruby-forum.com/t/posting-to-paypal-with-net-https/163910)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 0\
**Last updated:** [March 26, 2009, 2:45am UTC](https://www.ruby-forum.com/t/posting-to-paypal-with-net-https/163910 "2009-03-26T02:45:00Z")

</div>

Hi, I’m trying to post to PayPal using Net::HTTPS. I found the following script on Google which I modified slightly: require ‘net/https’ require ‘uri’ params={‘cmd’=\>‘\_xclick’,‘notify\_url’=\>'http://www.4test.net/cg…

---

## [Perl6 logo](https://www.ruby-forum.com/t/perl6-logo/163772)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 6\
**Last updated:** [March 25, 2009, 10:53pm UTC](https://www.ruby-forum.com/t/perl6-logo/163772 "2009-03-25T22:53:53Z")

</div>

I thought some of you might find this humorous. This is my entry into the Perl6 logo contest: http://static.destiney.com/perl6\_logo.png

---

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

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [March 25, 2009, 10:29pm UTC](https://www.ruby-forum.com/t/code-review-gitpull1/163893 "2009-03-25T22:29:14Z")

</div>

FYI CR: tfpt review “/shelveset:gitpull1;REDMOND\\jdeville” Comment : Pull of Shri’s last 3 commits. Fixes ir.cmd problem in default.mspec (better fix to come from Shri later) Applies JB Evains suggestion for fixin…

---

## [Vm summit meetup?](https://www.ruby-forum.com/t/vm-summit-meetup/163870)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 3\
**Last updated:** [March 25, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/vm-summit-meetup/163870 "2009-03-25T21:44:05Z")

</div>

I hear the lot of you are in Chicago for a VM summit. I’m local (north side). Anyone interested in meeting up for a beer? I can recommend two excellent places. Local Option (my personal fave) \[1\]. 24 excellent beers …

---

## [A bit late but](https://www.ruby-forum.com/t/a-bit-late-but/163874)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 1\
**Last updated:** [March 25, 2009, 8:34pm UTC](https://www.ruby-forum.com/t/a-bit-late-but/163874 "2009-03-25T20:34:47Z")

</div>

I’ve uploaded 2 archives that contain the same version as the MS .NET IronRuby 0.3 release as a download on the mono-binaries page. Can I upload those somewhere else too so that they are closer to the official website…

---

## [Looking for a method to kill all children for my Timeout::Error contingency](https://www.ruby-forum.com/t/looking-for-a-method-to-kill-all-children-for-my-timeout-error-contingency/163784)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 5\
**Last updated:** [March 25, 2009, 6:50pm UTC](https://www.ruby-forum.com/t/looking-for-a-method-to-kill-all-children-for-my-timeout-error-contingency/163784 "2009-03-25T18:50:40Z")

</div>

Do I really need to collect all the pids from fork to kill them in that case, or is there a method I’m not finding in pickaxe that just does it??? xc

---

## [Cannot load any gems](https://www.ruby-forum.com/t/cannot-load-any-gems/163791)

<div class="topic-metadata">

**Author:** [@paligan](https://www.ruby-forum.com/u/paligan)\
**Replies:** 1\
**Last updated:** [March 25, 2009, 6:48pm UTC](https://www.ruby-forum.com/t/cannot-load-any-gems/163791 "2009-03-25T18:48:18Z")

</div>

Hello, I installed IronRuby 0.3.0 from github and ruby 1.8.6 on my windows xp machine. Further I installed the gem sinatra using ruby and edited the ir.exe.config so that the ruby libraries get loaded. When I start …

---

## [Delete from array while iterating](https://www.ruby-forum.com/t/delete-from-array-while-iterating/163866)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 4\
**Last updated:** [March 25, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/delete-from-array-while-iterating/163866 "2009-03-25T18:27:11Z")

</div>

Hi all, I want to delete an element from an array when it matches a condition. But I first want to print something to the screen when a amùcth is found. I know a.delete\_if but can I somehow add that print to the scre…

---

## [Appending an array to a frozen array](https://www.ruby-forum.com/t/appending-an-array-to-a-frozen-array/163838)

<div class="topic-metadata">

**Author:** [@kofboss](https://www.ruby-forum.com/u/kofboss)\
**Replies:** 4\
**Last updated:** [March 25, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/appending-an-array-to-a-frozen-array/163838 "2009-03-25T17:56:33Z")

</div>

Morning all, @dependencies.freeze @dependencies += \[“blah”, “blah”\] does not error out due to modifying a frozen array (1.8.7 p72). Is this expected behaviour? Up until now I’ve considered freezing an array as makin…

---

## [Creating an array by reusing code](https://www.ruby-forum.com/t/creating-an-array-by-reusing-code/163840)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [March 25, 2009, 5:50pm UTC](https://www.ruby-forum.com/t/creating-an-array-by-reusing-code/163840 "2009-03-25T17:50:39Z")

</div>

Hi I have all\_req = OnRequest.find(:all, :conditions =\> \[status\_id = ?’,6\]) Now i need to create an array of size 12 containing record counts for month January to December like \[recordcountjanuary,recordcountfeb,…\] …

---

## [For the vim folks](https://www.ruby-forum.com/t/for-the-vim-folks/163802)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 2\
**Last updated:** [March 25, 2009, 4:57pm UTC](https://www.ruby-forum.com/t/for-the-vim-folks/163802 "2009-03-25T16:57:50Z")

</div>

I’ve been using vi/vim since '97 for various quick edits and administration tasks, but have only recently considered using it to replace Netbeans as my ruby editor of choice. One thing I find extremely useful in both …

---

## [Tournament 2.5.0](https://www.ruby-forum.com/t/tournament-2-5-0/163852)

<div class="topic-metadata">

**Author:** [@dougal](https://www.ruby-forum.com/u/dougal)\
**Replies:** 0\
**Last updated:** [March 25, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/tournament-2-5-0/163852 "2009-03-25T15:07:30Z")

</div>

tournament version 2.5.0 by Douglas A. Seifert Tournament: A Ruby Program For Managing NCAA Tournament Pools == DESCRIPTION Small library, command line program and Rails web GUI for managing a NCAA basketball tourn…

---

## [Activerecord-jdbc-adapter 0.9.1 (rails 2.2.2 + gf 0.9.3)](https://www.ruby-forum.com/t/activerecord-jdbc-adapter-0-9-1-rails-2-2-2-gf-0-9-3/163850)

<div class="topic-metadata">

**Author:** [@trib4lmaniac](https://www.ruby-forum.com/u/trib4lmaniac)\
**Replies:** 0\
**Last updated:** [March 25, 2009, 3:05pm UTC](https://www.ruby-forum.com/t/activerecord-jdbc-adapter-0-9-1-rails-2-2-2-gf-0-9-3/163850 "2009-03-25T15:05:08Z")

</div>

Hi, I just upgraded to the new jdbc adapter, but I stumbled upon two errors, both seemingly related to the 0.9.1 version, as the 0.9 version doesn’t exhibit them. The first one is that I keep getting the error ‘unini…

---

## [Get process id by using it's name](https://www.ruby-forum.com/t/get-process-id-by-using-its-name/163715)

<div class="topic-metadata">

**Author:** [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Replies:** 5\
**Last updated:** [March 25, 2009, 1:16pm UTC](https://www.ruby-forum.com/t/get-process-id-by-using-its-name/163715 "2009-03-25T13:16:36Z")

</div>

Hi, folks. first ) I have a question to get a process id by using it’s name for all platforms. second) If I want to kill some processes by it’s name, are there efficient way to do it for all platform? For a soluti…

---

## [How to call instance method from within Treetop gem](https://www.ruby-forum.com/t/how-to-call-instance-method-from-within-treetop-gem/163825)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 2\
**Last updated:** [March 25, 2009, 11:56am UTC](https://www.ruby-forum.com/t/how-to-call-instance-method-from-within-treetop-gem/163825 "2009-03-25T11:56:18Z")

</div>

I’m trying to call an instance method from within a gem (Treetop), and nothing I’ve tried is working (3 hours into it - no results). I’ll do my best to simplify the problem. I have a class instance which sets things u…

---

## [Confused - trying to run the specs](https://www.ruby-forum.com/t/confused-trying-to-run-the-specs/163792)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 3\
**Last updated:** [March 25, 2009, 11:50am UTC](https://www.ruby-forum.com/t/confused-trying-to-run-the-specs/163792 "2009-03-25T11:50:27Z")

</div>

Hi, I’m having a closer look at the source in order to attempt some work around system and IO popen. I pulled the code, ran dev.bat etc. The build runs fine. Now I’m trying to run the specs and something must be not…

---

## [Write a method to every possible class](https://www.ruby-forum.com/t/write-a-method-to-every-possible-class/163831)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [March 25, 2009, 11:00am UTC](https://www.ruby-forum.com/t/write-a-method-to-every-possible-class/163831 "2009-03-25T11:00:34Z")

</div>

I have a function like this: def fun(ob) return a\_modified\_version\_of\_ob end Of course, if I have an object instance ‘obis’, I need to call it like fun(obis) I want to be able to call like obis.fun And I want to …

---

## [Problem with gsub! in file](https://www.ruby-forum.com/t/problem-with-gsub-in-file/163735)

<div class="topic-metadata">

**Author:** [@JenC](https://www.ruby-forum.com/u/JenC)\
**Replies:** 7\
**Last updated:** [March 25, 2009, 9:56am UTC](https://www.ruby-forum.com/t/problem-with-gsub-in-file/163735 "2009-03-25T09:56:03Z")

</div>

I am new to Ruby and trying to do a find and replace on a text file based on a regular expression. When I step through the code line by line, it appears that the appropriate line in the file is changed, but when I ex…

---

## [JRuby Hosting!](https://www.ruby-forum.com/t/jruby-hosting/163695)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 7\
**Last updated:** [March 25, 2009, 9:16am UTC](https://www.ruby-forum.com/t/jruby-hosting/163695 "2009-03-25T09:16:52Z")

</div>

There’s been a bit of talk recently about options for hosting JRuby (on Rails) applications. Lots of places provide Ruby (on Rails) support, and some provide general Java support, but it seems like there’s a demand fo…

---

## [Send email in ruby](https://www.ruby-forum.com/t/send-email-in-ruby/163609)

<div class="topic-metadata">

**Author:** [@vetrivel](https://www.ruby-forum.com/u/vetrivel)\
**Replies:** 12\
**Last updated:** [March 25, 2009, 9:09am UTC](https://www.ruby-forum.com/t/send-email-in-ruby/163609 "2009-03-25T09:09:50Z")

</div>

How to attach the filename in ruby. I have attach 1.txt as a file name . The 1.txt file has the following contents. This is a test message. But it doesn’t work for me. require ‘net/smtp’ msgstr = \<\<END\_OF\_MESSAGE …

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

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