# Ruby

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

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

---

## [Stripping certain characters using Hpricot](https://www.ruby-forum.com/t/stripping-certain-characters-using-hpricot/168802)

<div class="topic-metadata">

**Author:** [@virendra](https://www.ruby-forum.com/u/virendra)\
**Replies:** 0\
**Last updated:** [May 26, 2009, 9:01am UTC](https://www.ruby-forum.com/t/stripping-certain-characters-using-hpricot/168802 "2009-05-26T09:01:55Z")

</div>

Hi, I have been using Hpricot for a while now and its great. I wanted to know can Hpricot help me in stripping certain characters like ‘//’ because I need to strip them in order to get the exact differences by html…

---

## [Mailfactory permissions problem](https://www.ruby-forum.com/t/mailfactory-permissions-problem/168478)

<div class="topic-metadata">

**Author:** [@mariachi77](https://www.ruby-forum.com/u/mariachi77)\
**Replies:** 1\
**Last updated:** [May 26, 2009, 3:41am UTC](https://www.ruby-forum.com/t/mailfactory-permissions-problem/168478 "2009-05-26T03:41:31Z")

</div>

I’m running ruby 1.8 under FreeBSD 7.0 and I’m trying to use mailfactory for normal users (ie: not admin users). If I start my script as a privileged user such as root or a person in the wheel group I don’t have a pro…

---

## [Which version is the most stable thing for AIX platform?](https://www.ruby-forum.com/t/which-version-is-the-most-stable-thing-for-aix-platform/166735)

<div class="topic-metadata">

**Author:** [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Replies:** 2\
**Last updated:** [May 26, 2009, 2:56am UTC](https://www.ruby-forum.com/t/which-version-is-the-most-stable-thing-for-aix-platform/166735 "2009-05-26T02:56:43Z")

</div>

Hi, all. I am sure that some of yours have had headaches to use ruby on aix platforms. we can find out lots of problems related aix installation steps by googing. some peoples discussed about zlib problems, core dum…

---

## [Missing dbm package on Redhat](https://www.ruby-forum.com/t/missing-dbm-package-on-redhat/168791)

<div class="topic-metadata">

**Author:** [@trucker](https://www.ruby-forum.com/u/trucker)\
**Replies:** 0\
**Last updated:** [May 26, 2009, 1:06am UTC](https://www.ruby-forum.com/t/missing-dbm-package-on-redhat/168791 "2009-05-26T01:06:05Z")

</div>

I am running ruby 1.8.5 (2006-08-25) on a Red Hat system. The dbm package is missing. $ irb reuiqrirb(main):001:0\> require “dbm” LoadError: no such file to load – dbm from /opt/ruby-gems/lib/site\_ruby/1.8/rubygems/…

---

## [Ruby Mulithreading](https://www.ruby-forum.com/t/ruby-mulithreading/168698)

<div class="topic-metadata">

**Author:** [@hellothere1](https://www.ruby-forum.com/u/hellothere1)\
**Replies:** 3\
**Last updated:** [May 26, 2009, 12:46am UTC](https://www.ruby-forum.com/t/ruby-mulithreading/168698 "2009-05-26T00:46:12Z")

</div>

Hi I’ve been recently encountered a major problem with a program i am coding. Main in my program outputs a menu with some cases you can choose, 1,2,3… so i have a gets at the end of the menu. However, my program als…

---

## [Hpricot wont parse \<a\> elements via XPath](https://www.ruby-forum.com/t/hpricot-wont-parse-a-elements-via-xpath/168789)

<div class="topic-metadata">

**Author:** [@archer007](https://www.ruby-forum.com/u/archer007)\
**Replies:** 1\
**Last updated:** [May 26, 2009, 12:23am UTC](https://www.ruby-forum.com/t/hpricot-wont-parse-a-elements-via-xpath/168789 "2009-05-26T00:23:59Z")

</div>

In this code (http://pastebin.com/m36de2949) unread\_links will not read the elements specified in line 12. I double-checked the XPath with the XPather Firefox extension, and it is correct. Is this some obscure diffic…

---

## [Read changed to blocking in 1.9 windows?](https://www.ruby-forum.com/t/read-changed-to-blocking-in-1-9-windows/168783)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 9:52pm UTC](https://www.ruby-forum.com/t/read-changed-to-blocking-in-1-9-windows/168783 "2009-05-25T21:52:04Z")

</div>

Currently with 1.9 if you do a #include\<ruby.h\> by default it overwrites any calls to ‘read’ and ‘accept’ (etc.) to be rb\_w32\_read, rb\_w32\_accept (etc). This worked all right in 1.8.6. However, with 1.9 it would app…

---

## [Class methods in a module?](https://www.ruby-forum.com/t/class-methods-in-a-module/168769)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 3\
**Last updated:** [May 25, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/class-methods-in-a-module/168769 "2009-05-25T21:08:33Z")

</div>

At Scotland On Rails a few months ago, I was shown a nice way to put class methods in a module, alongside instance methods, in such a way as they will get added as class methods automatically, without any work require…

---

## [Hash assignment \[:x\] vs \['x'\]](https://www.ruby-forum.com/t/hash-assignment-x-vs-x/168779)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 6\
**Last updated:** [May 25, 2009, 8:13pm UTC](https://www.ruby-forum.com/t/hash-assignment-x-vs-x/168779 "2009-05-25T20:13:55Z")

</div>

Being totally new to ruby, I just noticed that using bob\[‘phone’\] which coming from perl is a style I’m used to, results in a separate key than bob\[:phone\] That seems slightly weird, I had assumed the :form is just …

---

## [Dynamic object creation](https://www.ruby-forum.com/t/dynamic-object-creation/168777)

<div class="topic-metadata">

**Author:** [@Ken\_T](https://www.ruby-forum.com/u/Ken_T)\
**Replies:** 6\
**Last updated:** [May 25, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/dynamic-object-creation/168777 "2009-05-25T19:37:50Z")

</div>

sorry if i’ve missed something obvious is there a way in ruby to dynamically create an object from a variable that holds the object’s name? something that does object.create(“some\_object\_name”)

---

## [Getting the css href links](https://www.ruby-forum.com/t/getting-the-css-href-links/168778)

<div class="topic-metadata">

**Author:** [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 7:05pm UTC](https://www.ruby-forum.com/t/getting-the-css-href-links/168778 "2009-05-25T19:05:00Z")

</div>

Using watir, how can I get the href links of the CSS in my pages: These links are not among the results if I do something like: require ‘watir’ ie=Watir::IE.new() ie.goto(“http://www.elmundo.es”) ie.links.each {|l…

---

## [How to deal with scrollbar?](https://www.ruby-forum.com/t/how-to-deal-with-scrollbar/168744)

<div class="topic-metadata">

**Author:** [@artoxvw](https://www.ruby-forum.com/u/artoxvw)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 6:55pm UTC](https://www.ruby-forum.com/t/how-to-deal-with-scrollbar/168744 "2009-05-25T18:55:33Z")

</div>

Hi, guys I use watir , but when I want to focus the page to the bottom of the page, I don’t know how to deal with it I need your help thank you

---

## [Installation noob](https://www.ruby-forum.com/t/installation-noob/168738)

<div class="topic-metadata">

**Author:** [@soderic](https://www.ruby-forum.com/u/soderic)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/installation-noob/168738 "2009-05-25T16:31:08Z")

</div>

Hi all, I am attempting to get ruby and some gems up and working but am a total noob to ruby. First could someone clear up these basic questions: when using the “gem update --system” “gem install watir” the command …

---

## [Open-uri, rss parser and thread safe](https://www.ruby-forum.com/t/open-uri-rss-parser-and-thread-safe/168765)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 3:36pm UTC](https://www.ruby-forum.com/t/open-uri-rss-parser-and-thread-safe/168765 "2009-05-25T15:36:59Z")

</div>

Hi im using backgroundrb to schedule scraping of some sites and it uses threading but the docs warn that not all libs are thread safe. Some of my results are not expected when threading (but are when i dont use thread…

---

## [Html method on watir don't return the real html](https://www.ruby-forum.com/t/html-method-on-watir-dont-return-the-real-html/168250)

<div class="topic-metadata">

**Author:** [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Replies:** 3\
**Last updated:** [May 25, 2009, 1:05pm UTC](https://www.ruby-forum.com/t/html-method-on-watir-dont-return-the-real-html/168250 "2009-05-25T13:05:32Z")

</div>

Hi, I’m using watir to get the html of a page in order to verify every single page on w3c.org but what I get with watir is something like: Certus Games .... And the real content is: \<?xml version="1.0" encoding=…

---

## [Couldn't find CompetitionSignup with ID=changeCompetitionTyp](https://www.ruby-forum.com/t/couldnt-find-competitionsignup-with-id-changecompetitiontyp/168750)

<div class="topic-metadata">

**Author:** [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 12:50pm UTC](https://www.ruby-forum.com/t/couldnt-find-competitionsignup-with-id-changecompetitiontyp/168750 "2009-05-25T12:50:58Z")

</div>

In my application there are two table one is CompetitionSignup and other one is changeCompetitionType. It got both collumn but it can’t compair and gives error.

---

## [New: Meet new people](https://www.ruby-forum.com/t/new-meet-new-people/168746)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 12:11pm UTC](https://www.ruby-forum.com/t/new-meet-new-people/168746 "2009-05-25T12:11:04Z")

</div>

The Community More Dynamic Alternative Lifestyle http://alt.fast-url.info/ Get your free profile as well as contact with girls and boys http://love.follow-this.info/

---

## [Error while running migration](https://www.ruby-forum.com/t/error-while-running-migration/168730)

<div class="topic-metadata">

**Author:** [@virendra](https://www.ruby-forum.com/u/virendra)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 10:42am UTC](https://www.ruby-forum.com/t/error-while-running-migration/168730 "2009-05-25T10:42:45Z")

</div>

Hello I generate a scaffold for the User it created a migration for me for user table now when iam trying to run that migration its give me a error a ran the migration command with --trace to crack down the source of …

---

## [Deploy a Ruby program & GUI connection](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637)

<div class="topic-metadata">

**Author:** [@adrianunderwater](https://www.ruby-forum.com/u/adrianunderwater)\
**Replies:** 6\
**Last updated:** [May 25, 2009, 6:27am UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637 "2009-05-25T06:27:29Z")

</div>

I have some Java experience and jus try to understand Ruby I have two problems: First: how can I deploy a ruby app. Is there something like jar? or the application is started allwais going to the command line? The sou…

---

## [Sql](https://www.ruby-forum.com/t/sql/168631)

<div class="topic-metadata">

**Author:** [@rubyhunter](https://www.ruby-forum.com/u/rubyhunter)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 6:17am UTC](https://www.ruby-forum.com/t/sql/168631 "2009-05-25T06:17:38Z")

</div>

hi I have a text database which I looking for code. my code is (Database.rb): class Database def initialize(input\_file) file = File.new(input\_file, “r”) while (line = file.gets) puts “#{parse(line)}” end file.clo…

---

## [\[Bug #1508\] Recursive arrays with the same structure are not eql?](https://www.ruby-forum.com/t/bug-1508-recursive-arrays-with-the-same-structure-are-not-eql/168680)

<div class="topic-metadata">

**Author:** [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 2:52am UTC](https://www.ruby-forum.com/t/bug-1508-recursive-arrays-with-the-same-structure-are-not-eql/168680 "2009-05-25T02:52:50Z")

</div>

Bug #1508: Recursive arrays with the same structure are not eql?. http://redmine.ruby-lang.org/issues/show/1508 e$B5/I\<\<Te(B: Yuki S. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal Target version: 1.9.2 ruby -v: ruby …

---

## [Inserting a counter into a .each loop](https://www.ruby-forum.com/t/inserting-a-counter-into-a-each-loop/168709)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 4\
**Last updated:** [May 25, 2009, 12:34am UTC](https://www.ruby-forum.com/t/inserting-a-counter-into-a-each-loop/168709 "2009-05-25T00:34:55Z")

</div>

I’ve got a loop that iterates through a string like so: string.each\_byte do |f| …do something with f.chr end I would like to use a counter variable in this loop. I know I can add ‘.with\_index’ but I need more contro…

---

## [Rake 0.8.7 and IronRuby 0.5](https://www.ruby-forum.com/t/rake-0-8-7-and-ironruby-0-5/168688)

<div class="topic-metadata">

**Author:** [@Seo\_S](https://www.ruby-forum.com/u/Seo_S)\
**Replies:** 1\
**Last updated:** [May 24, 2009, 11:11pm UTC](https://www.ruby-forum.com/t/rake-0-8-7-and-ironruby-0-5/168688 "2009-05-24T23:11:51Z")

</div>

I installed IronRuby 0.5, and ran igem install rake, which installed Rake 0.8.7. Now rake/testtask launches new Ruby process using RakeFileUtils.ruby, which ultimately calls Kernel.system. When tests fail, $? is exami…

---

## [Using RCov with JRuby](https://www.ruby-forum.com/t/using-rcov-with-jruby/168654)

<div class="topic-metadata">

**Author:** [@Menno\_Jonkers](https://www.ruby-forum.com/u/Menno_Jonkers)\
**Replies:** 3\
**Last updated:** [May 24, 2009, 9:57pm UTC](https://www.ruby-forum.com/t/using-rcov-with-jruby/168654 "2009-05-24T21:57:26Z")

</div>

Hi, To begin with, congratulations and thanks to all those involved in getting JRuby in its current state. It’s amazing how much you have achieved in just a few years. Hats off. I’m trying to get Rcov running in conj…

---

## [Encyclopedia Construction (#205)](https://www.ruby-forum.com/t/encyclopedia-construction-205/168091)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 5\
**Last updated:** [May 24, 2009, 8:32pm UTC](https://www.ruby-forum.com/t/encyclopedia-construction-205/168091 "2009-05-24T20:32:25Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this m…

---

## [Controlling processes and what to "feed" other processes](https://www.ruby-forum.com/t/controlling-processes-and-what-to-feed-other-processes/168705)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 1\
**Last updated:** [May 24, 2009, 7:41pm UTC](https://www.ruby-forum.com/t/controlling-processes-and-what-to-feed-other-processes/168705 "2009-05-24T19:41:13Z")

</div>

Hi, alsa-driver has a slight error in its Makefile. The line in question is this here: install -m 644 -g root -o root $f /usr/include/sound Obviously it uses a specific name “root”, rather than the number 0. On sys…

---

## [Workarounds for replacing self](https://www.ruby-forum.com/t/workarounds-for-replacing-self/168600)

<div class="topic-metadata">

**Author:** [@jphastings](https://www.ruby-forum.com/u/jphastings)\
**Replies:** 7\
**Last updated:** [May 24, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/workarounds-for-replacing-self/168600 "2009-05-24T19:39:53Z")

</div>

I’m attempting to build an ETA class, essentially identical to Time, but where new accepts a number of seconds from now and generates the underlying Time object accordingly. Obviously I can’t re-assign self, so how sh…

---

## [Strange Datamapper behavior](https://www.ruby-forum.com/t/strange-datamapper-behavior/168706)

<div class="topic-metadata">

**Author:** [@rwz](https://www.ruby-forum.com/u/rwz)\
**Replies:** 0\
**Last updated:** [May 24, 2009, 7:11pm UTC](https://www.ruby-forum.com/t/strange-datamapper-behavior/168706 "2009-05-24T19:11:10Z")

</div>

I’ve been trying to make a simple many-to-many associations. To get along with datamapper i copied the example from dm’s homepage. Here we have few simple models for a blog. require ‘rubygems’ require ‘dm-core’ requ…

---

## [I want to redirect stderr to StringIO](https://www.ruby-forum.com/t/i-want-to-redirect-stderr-to-stringio/168374)

<div class="topic-metadata">

**Author:** [@ErMaker](https://www.ruby-forum.com/u/ErMaker)\
**Replies:** 9\
**Last updated:** [May 24, 2009, 5:30pm UTC](https://www.ruby-forum.com/t/i-want-to-redirect-stderr-to-stringio/168374 "2009-05-24T17:30:54Z")

</div>

IO.new(2).reopen(StringIO.new) TypeError: can’t convert StringIO into String from (irb):1:in \`reopen’ from (irb):1 IO.new(2).reopen(IO.new(1)) =\> #IO:0x2a81630 StringIO also do as IO, but IO#reopen fails. I …

---

## [Ruby/Odeum](https://www.ruby-forum.com/t/ruby-odeum/168595)

<div class="topic-metadata">

**Author:** [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Replies:** 8\
**Last updated:** [May 24, 2009, 11:54am UTC](https://www.ruby-forum.com/t/ruby-odeum/168595 "2009-05-24T11:54:09Z")

</div>

I’m looking to use an inverted index for Ruby. There used to be Zed Shaw’s Ruby/odeum that did this using QDBM’s inverted index API. I can find references to this all over the web, unfortuntely but the original site i…

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

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