# Ruby

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

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

---

## [Spam on Codehaus JIRA](https://www.ruby-forum.com/t/spam-on-codehaus-jira/149075)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 0\
**Last updated:** [September 20, 2008, 1:18am UTC](https://www.ruby-forum.com/t/spam-on-codehaus-jira/149075 "2008-09-20T01:18:09Z")

</div>

FYI, if you see spammers adding comments to JIRA issues, just report the bug numbers in a “Haus Chores” bug. They’ll get the bugs cleaned up and the user banned. Charlie To unsubscribe from this list, please visit: …

---

## [Confused regarding text example](https://www.ruby-forum.com/t/confused-regarding-text-example/149061)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 3\
**Last updated:** [September 20, 2008, 12:22am UTC](https://www.ruby-forum.com/t/confused-regarding-text-example/149061 "2008-09-20T00:22:32Z")

</div>

Hey, So as I am reviewing Ruby I came across the old find strings with xyz pattern. The code is as follows: class WordIndex def initialize @index = {} end def add\_to\_index(obj, \*phrases) phrases.each do |phrase| …

---

## [How to read drive label](https://www.ruby-forum.com/t/how-to-read-drive-label/149066)

<div class="topic-metadata">

**Author:** [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Replies:** 1\
**Last updated:** [September 20, 2008, 12:19am UTC](https://www.ruby-forum.com/t/how-to-read-drive-label/149066 "2008-09-20T00:19:02Z")

</div>

Hello. I’d like to get the labels of the hard drives (partitions) on my machine from within a program. Is there any universal Ruby command to do it? I’m on Windows, so I guess I could use some WinAPI to do that but I’…

---

## [Using Rails App (Models) in my Ruby script](https://www.ruby-forum.com/t/using-rails-app-models-in-my-ruby-script/149047)

<div class="topic-metadata">

**Author:** [@paerez](https://www.ruby-forum.com/u/paerez)\
**Replies:** 8\
**Last updated:** [September 20, 2008, 12:06am UTC](https://www.ruby-forum.com/t/using-rails-app-models-in-my-ruby-script/149047 "2008-09-20T00:06:54Z")

</div>

Hi, All. I’m writing a script that’s going to run on schedule to pull some info from a db and dump it into a csv to be ftped And a similar script to process a csv/excel file we get from a vendor to put in our db. I …

---

## [How to provide variable to irb session](https://www.ruby-forum.com/t/how-to-provide-variable-to-irb-session/149044)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 4\
**Last updated:** [September 19, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/how-to-provide-variable-to-irb-session/149044 "2008-09-19T21:56:06Z")

</div>

Hello all, Can anyone tell me how I would go about providing a variable to an irb session? For example, see the following screenshot from the Metasploit Meterpreter in irb mode. http://www.metasploit.com/images/gall…

---

## [Hash default value question](https://www.ruby-forum.com/t/hash-default-value-question/149049)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 2\
**Last updated:** [September 19, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/hash-default-value-question/149049 "2008-09-19T21:19:03Z")

</div>

Hi, Can anyone explain why hash\_of\_indexes1 in the code below works, but hash\_of\_index2 doesn’t?Â (I got the first method as a response to a previous post.) What I’d like to get is a hash with a key value for each u…

---

## [Issues with RCov](https://www.ruby-forum.com/t/issues-with-rcov/149052)

<div class="topic-metadata">

**Author:** [@abc](https://www.ruby-forum.com/u/abc)\
**Replies:** 0\
**Last updated:** [September 19, 2008, 8:56pm UTC](https://www.ruby-forum.com/t/issues-with-rcov/149052 "2008-09-19T20:56:25Z")

</div>

Hi everyone, I’m in the process of migrating a project from MRI Ruby to JRuby, and I’m having lots of trouble to get RCov working. I’d be very grateful if someone could shed a light on what I’m doing wrong. I’ve read…

---

## [That was unexpected -- strange scoping behavior](https://www.ruby-forum.com/t/that-was-unexpected-strange-scoping-behavior/149045)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/that-was-unexpected-strange-scoping-behavior/149045 "2008-09-19T20:01:17Z")

</div>

Consider the following piece of code: #!/usr/bin/env ruby def wow(idx, donetest) until donetest.call(idx) puts idx idx = idx + 1 end #until end #def wow idx = 2 puts “before wow, idx = #{idx}\\n” wow(3, lambda {…

---

## [IRB + C Extension = Memory Loss](https://www.ruby-forum.com/t/irb-c-extension-memory-loss/149043)

<div class="topic-metadata">

**Author:** [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/irb-c-extension-memory-loss/149043 "2008-09-19T19:57:45Z")

</div>

I’m having difficult making a simple C extension. The struct’s memory seems to go missing after a while when using IRB. I’m no C expert, so I’m probably doing something wrong as far as memory allocation is concerned. …

---

## [Reseach paper on Ruby. Need references](https://www.ruby-forum.com/t/reseach-paper-on-ruby-need-references/148895)

<div class="topic-metadata">

**Author:** [@suneel](https://www.ruby-forum.com/u/suneel)\
**Replies:** 11\
**Last updated:** [September 19, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/reseach-paper-on-ruby-need-references/148895 "2008-09-19T19:51:32Z")

</div>

Hi, I’m doing masters in computer science. I’m required to submit a research paper on a topic of my interest. I’m interested in learning ruby and wanted to do research on Ruby covering topics like “features of Ruby, …

---

## [Preserve insert order in a Hash](https://www.ruby-forum.com/t/preserve-insert-order-in-a-hash/148922)

<div class="topic-metadata">

**Author:** [@melmoth](https://www.ruby-forum.com/u/melmoth)\
**Replies:** 19\
**Last updated:** [September 19, 2008, 5:55pm UTC](https://www.ruby-forum.com/t/preserve-insert-order-in-a-hash/148922 "2008-09-19T17:55:59Z")

</div>

Hi, I would like to know if it’s possible to insert values in a Hash and then extract all of them in the same insertion order. I noticed that if I then try to print the content of an Hash using “each” the order is no…

---

## [Array Count Issu](https://www.ruby-forum.com/t/array-count-issu/148989)

<div class="topic-metadata">

**Author:** [@silentd3at4](https://www.ruby-forum.com/u/silentd3at4)\
**Replies:** 11\
**Last updated:** [September 19, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/array-count-issu/148989 "2008-09-19T16:25:03Z")

</div>

irb irb(main):001:0\> string =“cat cat fox” =\> “cat cat fox” irb(main):002:0\> stringArray = string.split(" ") =\> \[“cat”, “cat”, “fox”\] irb(main):003:0\> string.count(stringArray\[0\]) =\> 6 obviously what i want it to …

---

## [How to clean an xml files from non-utf-8 chars?](https://www.ruby-forum.com/t/how-to-clean-an-xml-files-from-non-utf-8-chars/148817)

<div class="topic-metadata">

**Author:** [@Krzysieq](https://www.ruby-forum.com/u/Krzysieq)\
**Replies:** 18\
**Last updated:** [September 19, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/how-to-clean-an-xml-files-from-non-utf-8-chars/148817 "2008-09-19T15:45:03Z")

</div>

Hi, I have a problem. I’m trying to parse with ruby some test results from jmeter, that are stored in xml files. Unfortunately, while they should be utf-8, some of them aren’t. Probably because some db data isn’t. In…

---

## [Suggestion for string parsing](https://www.ruby-forum.com/t/suggestion-for-string-parsing/148918)

<div class="topic-metadata">

**Author:** [@melmoth](https://www.ruby-forum.com/u/melmoth)\
**Replies:** 17\
**Last updated:** [September 19, 2008, 2:57pm UTC](https://www.ruby-forum.com/t/suggestion-for-string-parsing/148918 "2008-09-19T14:57:58Z")

</div>

Hi all, I would like to know if there’s a better way to parse a string and assing values to variables; Ex: Client=MPEG-4,390000,700000,24000 I can do line =~ /(\\w\*)=(\[0-9A-Za-z -.:\]),(\[0-9\]),(\[0-9\]),(\[0-9\])/ and v…

---

## [Absolute Beginner help](https://www.ruby-forum.com/t/absolute-beginner-help/149007)

<div class="topic-metadata">

**Author:** [@gigg](https://www.ruby-forum.com/u/gigg)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/absolute-beginner-help/149007 "2008-09-19T14:25:36Z")

</div>

Hi there I have ruby on my linux server but keep getting this error when trying to run apps: - Not Found The requested URL /rails/store/public/rails/info/properties was not found on this server. Can anyone help m…

---

## [Rb\_include\_module() doesn't call Module#included](https://www.ruby-forum.com/t/rb-include-module-doesnt-call-module-included/149025)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [September 19, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/rb-include-module-doesnt-call-module-included/149025 "2008-09-19T14:10:55Z")

</div>

I’m writing a c extension and I want to create a class called “World” in C which includes a ruby module “Serializable”. autoexec.rb module Serializable def self.included( otherMod ) puts “Serializable is included by …

---

## [Working on Seo's r144 patch](https://www.ruby-forum.com/t/working-on-seos-r144-patch/197182)

<div class="topic-metadata">

**Author:** [@C.JSAdams-Collier](https://www.ruby-forum.com/u/C.JSAdams-Collier)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 1:48pm UTC](https://www.ruby-forum.com/t/working-on-seos-r144-patch/197182 "2008-09-19T13:48:02Z")

</div>

Ironruby-core mailing list removed\_email\_address@domain.invalid http://rubyforge.org/mailman/listinfo/ironruby-core

---

## [Pagination](https://www.ruby-forum.com/t/pagination/149024)

<div class="topic-metadata">

**Author:** [@ganeshk](https://www.ruby-forum.com/u/ganeshk)\
**Replies:** 0\
**Last updated:** [September 19, 2008, 1:43pm UTC](https://www.ruby-forum.com/t/pagination/149024 "2008-09-19T13:43:11Z")

</div>

Hi, Is there any plugin for pagination which will display the page numbers in drop down like 1 of 25 2 of 25 3 of 25 if anybody know solution plz reply

---

## ["warning: peer certificate won't be verified in this SSL session"](https://www.ruby-forum.com/t/warning-peer-certificate-wont-be-verified-in-this-ssl-session/149023)

<div class="topic-metadata">

**Author:** [@adev](https://www.ruby-forum.com/u/adev)\
**Replies:** 0\
**Last updated:** [September 19, 2008, 1:16pm UTC](https://www.ruby-forum.com/t/warning-peer-certificate-wont-be-verified-in-this-ssl-session/149023 "2008-09-19T13:16:13Z")

</div>

Hi Some time ago I started playing around with Soap4R on a vista (groans) laptop, when I first started I was getting a “warning: peer certificate won’t be verified in this SSL session” message when I connected to the…

---

## [Getting a constant inside a class](https://www.ruby-forum.com/t/getting-a-constant-inside-a-class/149001)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 12:23pm UTC](https://www.ruby-forum.com/t/getting-a-constant-inside-a-class/149001 "2008-09-19T12:23:08Z")

</div>

How do you grab the value of a constant if it is inside a class \<\< self? example class A class \<\< self B = “HI” end end A::B does not work. How would you go about grabbing the value for B? Sorry for such a noob q…

---

## [Rubygems won't install - don't understand why](https://www.ruby-forum.com/t/rubygems-wont-install-dont-understand-why/149012)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 11:16am UTC](https://www.ruby-forum.com/t/rubygems-wont-install-dont-understand-why/149012 "2008-09-19T11:16:37Z")

</div>

I can’t get rubygems to install, and I don’t understand what the problem is or what to do about it. I’m running on Kubuntu Linux 8.04.1 I compiled ruby-1.8.6-p114 a couple of days ago. Note: tomc@tom-desktop:/$ which…

---

## [Variable name](https://www.ruby-forum.com/t/variable-name/148985)

<div class="topic-metadata">

**Author:** [@bellcolt](https://www.ruby-forum.com/u/bellcolt)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 10:11am UTC](https://www.ruby-forum.com/t/variable-name/148985 "2008-09-19T10:11:12Z")

</div>

Is there a way in Ruby to use the content of a variable as the name of a variable. For example var1 = ‘myVar’ i want to assign a value to ‘myVar’ by referencing var1. The name of the variable can vary depending on …

---

## [Problem installing Qt4 gem on Windows](https://www.ruby-forum.com/t/problem-installing-qt4-gem-on-windows/148920)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 4\
**Last updated:** [September 19, 2008, 9:00am UTC](https://www.ruby-forum.com/t/problem-installing-qt4-gem-on-windows/148920 "2008-09-19T09:00:12Z")

</div>

Shouldn’t windows gems be precompiled? D:\>gem install qtruby4-1.4.10-x86-mswin32.gem Building native extensions. This could take a while… ERROR: Error installing qtruby4-1.4.10-x86-mswin32.gem: ERROR: Failed to bui…

---

## [Eventmachine client server problem](https://www.ruby-forum.com/t/eventmachine-client-server-problem/148945)

<div class="topic-metadata">

**Author:** [@baluvee](https://www.ruby-forum.com/u/baluvee)\
**Replies:** 2\
**Last updated:** [September 19, 2008, 8:16am UTC](https://www.ruby-forum.com/t/eventmachine-client-server-problem/148945 "2008-09-19T08:16:00Z")

</div>

Hi All My Server code is $stderr.sync = $stdout.sync = true require ‘rubygems’ require ‘eventmachine’ module EchoServer def receive\_data data puts “Server received: #{data}” send\_data “\>\>\>you sent: #{data}” put…

---

## [Reliable ping method from Windows?](https://www.ruby-forum.com/t/reliable-ping-method-from-windows/148984)

<div class="topic-metadata">

**Author:** [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 5:16am UTC](https://www.ruby-forum.com/t/reliable-ping-method-from-windows/148984 "2008-09-19T05:16:37Z")

</div>

Is there a reliable “Ruby” method for pinging/checking whether hosts are up? I have been using Net::PingExternal as I’m pinging Windows machines and not all of them have port 7 open. However when I try to check 900 …

---

## [Good deadline to register to rubyconf08](https://www.ruby-forum.com/t/good-deadline-to-register-to-rubyconf08/148983)

<div class="topic-metadata">

**Author:** [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 4:22am UTC](https://www.ruby-forum.com/t/good-deadline-to-register-to-rubyconf08/148983 "2008-09-19T04:22:05Z")

</div>

Hi, Does anyone know when it’s a good deadline to register to rubyconf08? I’m from Latino-America but I don’t know if my employer is going to pay something. I’m waiting for the response from they. I’m working for a U…

---

## [How can I setup a Rails-like task directory](https://www.ruby-forum.com/t/how-can-i-setup-a-rails-like-task-directory/148991)

<div class="topic-metadata">

**Author:** [@andreux](https://www.ruby-forum.com/u/andreux)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 3:39am UTC](https://www.ruby-forum.com/t/how-can-i-setup-a-rails-like-task-directory/148991 "2008-09-19T03:39:22Z")

</div>

I looking for a way to create a centralized library of rake files and have all tasks be available when running rake, similar to how lib/ tasks works in rails. Everything I’ve tried so far has been unsucessful, and I g…

---

## [Vendoring gems](https://www.ruby-forum.com/t/vendoring-gems/148990)

<div class="topic-metadata">

**Author:** [@supasta](https://www.ruby-forum.com/u/supasta)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 3:13am UTC](https://www.ruby-forum.com/t/vendoring-gems/148990 "2008-09-19T03:13:00Z")

</div>

If a gem is already in vendor/, does it need to be in config.gems in warble.rb? Thanks, Chris

---

## [Optimization help - reading out of /proc on Solaris](https://www.ruby-forum.com/t/optimization-help-reading-out-of-proc-on-solaris/148717)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 4\
**Last updated:** [September 19, 2008, 12:56am UTC](https://www.ruby-forum.com/t/optimization-help-reading-out-of-proc-on-solaris/148717 "2008-09-19T00:56:07Z")

</div>

Hi all, Ruby 1.8.6 Solaris 10 I recently converted a C extension to get process table information on Solaris into a pure Ruby. I knew it would be slower, I just didn’t realize how much slower it would be. I was expe…

---

## [Rexml error](https://www.ruby-forum.com/t/rexml-error/148933)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 2\
**Last updated:** [September 18, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/rexml-error/148933 "2008-09-18T22:27:58Z")

</div>

Any time it parses anything that has “xmlns:xml” defined, it spits out an error saying you MUST NOT redefine this attribute. However, according to the XML spec: The prefix xml is by definition bound to the namespace n…

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

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