# Ruby

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

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

---

## [Help with ActiveRecord](https://www.ruby-forum.com/t/help-with-activerecord/59724)

<div class="topic-metadata">

**Author:** [@PJ\_Hyett](https://www.ruby-forum.com/u/PJ_Hyett)\
**Replies:** 3\
**Last updated:** [May 5, 2006, 9:21pm UTC](https://www.ruby-forum.com/t/help-with-activerecord/59724 "2006-05-05T21:21:45Z")

</div>

Model: class AdminQueue \< ActiveRecord::Base set\_table\_name ‘adminqueue’ end Interacting with it in script/console AdminQueue.new =\> #\<AdminQueue:0x240a910 @attributes={“topic\_id”=\>nil, “resolved”=\>nil, “updated…

---

## [Mysql probem on windows box](https://www.ruby-forum.com/t/mysql-probem-on-windows-box/59675)

<div class="topic-metadata">

**Author:** [@psyche](https://www.ruby-forum.com/u/psyche)\
**Replies:** 1\
**Last updated:** [May 5, 2006, 9:19pm UTC](https://www.ruby-forum.com/t/mysql-probem-on-windows-box/59675 "2006-05-05T21:19:10Z")

</div>

freshly installed windows xp en with sp2, updated. Ruby installed from one-click package (tried with ruby184-16p3.exe and ruby184-17\_rc2.exe as well). mysql installed: gem install mysql (mysql 2.7.2006.04.21 (mswin32)) …

---

## [Question on self (Newbie)](https://www.ruby-forum.com/t/question-on-self-newbie/59727)

<div class="topic-metadata">

**Author:** [@darushin](https://www.ruby-forum.com/u/darushin)\
**Replies:** 6\
**Last updated:** [May 5, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/question-on-self-newbie/59727 "2006-05-05T21:15:33Z")

</div>

I am working my way through some tutorials and books on Ruby and i am trying to understand the various uses of the self object. For example this code from Agile rails: def self.login(name,password) code here end def…

---

## [Re: Finding an interval in a sorted array?](https://www.ruby-forum.com/t/re-finding-an-interval-in-a-sorted-array/94527)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 8:56pm UTC](https://www.ruby-forum.com/t/re-finding-an-interval-in-a-sorted-array/94527 "2006-05-05T20:56:45Z")

</div>

without resorting to indices? (I’m drawing a blank.) Here’s my solution. It may be naive, but it passes your tests: class Array def interval\_containing(num) return \[max\] if num \>= self.max return \[min\] if num \<…

---

## [Noob Question - String Manipulation](https://www.ruby-forum.com/t/noob-question-string-manipulation/59718)

<div class="topic-metadata">

**Author:** [@jcernelli](https://www.ruby-forum.com/u/jcernelli)\
**Replies:** 4\
**Last updated:** [May 5, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/noob-question-string-manipulation/59718 "2006-05-05T20:50:25Z")

</div>

Hey, I’m pretty new to Ruby and am trying to absorb the “ruby way” of things as much as I can. What’s the best way to solve this problem: I have a string that contains html formating. All I want is the plain text.

---

## [Win32ole - wait for action to complete](https://www.ruby-forum.com/t/win32ole-wait-for-action-to-complete/59705)

<div class="topic-metadata">

**Author:** [@bungle77](https://www.ruby-forum.com/u/bungle77)\
**Replies:** 2\
**Last updated:** [May 5, 2006, 7:40pm UTC](https://www.ruby-forum.com/t/win32ole-wait-for-action-to-complete/59705 "2006-05-05T19:40:20Z")

</div>

I have a script driving a proprietary Powerbuilder application via sendkeys. I am trying to time application processing time. My approach was grab start time, sendkeys to application, grab finish time and calculate th…

---

## [Re: Ruby equivalent to simple awk program](https://www.ruby-forum.com/t/re-ruby-equivalent-to-simple-awk-program/59615)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 7\
**Last updated:** [May 5, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/re-ruby-equivalent-to-simple-awk-program/59615 "2006-05-05T19:35:26Z")

</div>

$ ruby -e ‘puts $ARGF.readlines.reverse’ Gennady.

---

## [Re: Constant in Ruby](https://www.ruby-forum.com/t/re-constant-in-ruby/94521)

<div class="topic-metadata">

**Author:** [@William\_SBillS\_Froe](https://www.ruby-forum.com/u/William_SBillS_Froe)\
**Replies:** 1\
**Last updated:** [May 5, 2006, 6:55pm UTC](https://www.ruby-forum.com/t/re-constant-in-ruby/94521 "2006-05-05T18:55:06Z")

</div>

a # -\> “foo” This is true whether you’re dealing with variables or constants. I think I’m might be missing something here. In the examples above by just reading the code I would have originally expected a to return…

---

## [Snmp gem](https://www.ruby-forum.com/t/snmp-gem/94518)

<div class="topic-metadata">

**Author:** [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Replies:** 5\
**Last updated:** [May 5, 2006, 6:45pm UTC](https://www.ruby-forum.com/t/snmp-gem/94518 "2006-05-05T18:45:50Z")

</div>

Hi I am trying to use the snmp gem, and it doesn’t seem to work. I am not sure what is wrong. “gem install snmp” seems to report success. “gem list” contains the following snmp (1.0.1) A Ruby implementation of SNMP…

---

## [Re: Displaying only certain lines in the buffer](https://www.ruby-forum.com/t/re-displaying-only-certain-lines-in-the-buffer/59708)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 5:37pm UTC](https://www.ruby-forum.com/t/re-displaying-only-certain-lines-in-the-buffer/59708 "2006-05-05T17:37:57Z")

</div>

Thanks, Jeff It is a very good pointer and I am currently exproling it. Gennady.

---

## [Re: Gem, Proxy and MS authentication](https://www.ruby-forum.com/t/re-gem-proxy-and-ms-authentication/94519)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 5:28pm UTC](https://www.ruby-forum.com/t/re-gem-proxy-and-ms-authentication/94519 "2006-05-05T17:28:29Z")

</div>

NTLM Authorization Proxy Server download | SourceForge.net works great for me. You also will need to set http\_proxy environment variable appropriatelly to direct gem to APS proxy. After you start APS proxy make sure …

---

## [Re: accessing mysql thorugh ruby](https://www.ruby-forum.com/t/re-accessing-mysql-thorugh-ruby/59703)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 5:24pm UTC](https://www.ruby-forum.com/t/re-accessing-mysql-thorugh-ruby/59703 "2006-05-05T17:24:54Z")

</div>

This might help: http://wiki.rubyonrails.org/rails/pages/MySQL+Database+access+problem cheers Simon

---

## [Accessing mysql thorugh ruby](https://www.ruby-forum.com/t/accessing-mysql-thorugh-ruby/59701)

<div class="topic-metadata">

**Author:** [@bfsog](https://www.ruby-forum.com/u/bfsog)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 5:03pm UTC](https://www.ruby-forum.com/t/accessing-mysql-thorugh-ruby/59701 "2006-05-05T17:03:23Z")

</div>

Heres the code: # example of connecting to mysql require "mysql" begin dbName = "database" m = Mysql.new("localhost", "root", "password") # this line fails m.select\_db(dbName) result = m.query("SELECT \* FROM tes…

---

## [Re: Gem, Proxy and MS authentication](https://www.ruby-forum.com/t/re-gem-proxy-and-ms-authentication/94513)

<div class="topic-metadata">

**Author:** [@McDevittS\_Chris](https://www.ruby-forum.com/u/McDevittS_Chris)\
**Replies:** 1\
**Last updated:** [May 5, 2006, 4:26pm UTC](https://www.ruby-forum.com/t/re-gem-proxy-and-ms-authentication/94513 "2006-05-05T16:26:50Z")

</div>

Pure Ruby? That would be great. Lets take it one step further lets make in modular enough to use with gems. -Chris

---

## [Win32ole and activex](https://www.ruby-forum.com/t/win32ole-and-activex/59674)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 5, 2006, 4:02pm UTC](https://www.ruby-forum.com/t/win32ole-and-activex/59674 "2006-05-05T16:02:15Z")

</div>

Hello all, I tried to use win32ole standardlib with an activex control but I got ‘Library not registered’ error message. Here is the code : require ‘win32ole’ sf = WIN32OLE.new(‘MapWinGIS.Shapefile’) sf.Open(‘C:/ci…

---

## [Re: Gem, Proxy and MS authentication](https://www.ruby-forum.com/t/re-gem-proxy-and-ms-authentication/94514)

<div class="topic-metadata">

**Author:** [@McDevittS\_Chris](https://www.ruby-forum.com/u/McDevittS_Chris)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 3:43pm UTC](https://www.ruby-forum.com/t/re-gem-proxy-and-ms-authentication/94514 "2006-05-05T15:43:36Z")

</div>

Yea, I tried that and I could never get it to work correctly. -Chris

---

## [Re: Displaying only certain lines in the buffer](https://www.ruby-forum.com/t/re-displaying-only-certain-lines-in-the-buffer/94462)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 1\
**Last updated:** [May 5, 2006, 3:19pm UTC](https://www.ruby-forum.com/t/re-displaying-only-certain-lines-in-the-buffer/94462 "2006-05-05T15:19:08Z")

</div>

Thanks, Philip. I may end up using folding after all. However, a much simpler facility seems to exist as well. I just cannot recall what :-(. Gennady.

---

## [Re: Fishing in Ruby](https://www.ruby-forum.com/t/re-fishing-in-ruby/59009)

<div class="topic-metadata">

**Author:** [@BrownS\_Warren](https://www.ruby-forum.com/u/BrownS_Warren)\
**Replies:** 42\
**Last updated:** [May 5, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/re-fishing-in-ruby/59009 "2006-05-05T14:11:30Z")

</div>

But does it scale? Are you doing this for the halibut? ha! Stop this before I write a poisson pen letter.

---

## [Increment day across months](https://www.ruby-forum.com/t/increment-day-across-months/59528)

<div class="topic-metadata">

**Author:** [@ashiro](https://www.ruby-forum.com/u/ashiro)\
**Replies:** 5\
**Last updated:** [May 5, 2006, 1:43pm UTC](https://www.ruby-forum.com/t/increment-day-across-months/59528 "2006-05-05T13:43:26Z")

</div>

Hi All I’ve spent some time trying to find what I thought would be a simple solution, but so far I’ve failed Simply put; I want to pick a start date and end date with a format of “01-jan-2006”. Then increment by one…

---

## [Test/unit : params order in assert\_equal](https://www.ruby-forum.com/t/test-unit-params-order-in-assert-equal/59664)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 3\
**Last updated:** [May 5, 2006, 12:36pm UTC](https://www.ruby-forum.com/t/test-unit-params-order-in-assert-equal/59664 "2006-05-05T12:36:43Z")

</div>

Hi all. I’ve found myself to always writing: assert\_equal variable\_to\_test, ‘value expected’ And Test::Unit says to me: ‘some wrong value’ expected but was ‘value expected’ when I’d want to see ‘value expected’ exp…

---

## [Re: Gem, Proxy and MS authentication](https://www.ruby-forum.com/t/re-gem-proxy-and-ms-authentication/59681)

<div class="topic-metadata">

**Author:** [@stuart\_holden](https://www.ruby-forum.com/u/stuart_holden)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 12:06pm UTC](https://www.ruby-forum.com/t/re-gem-proxy-and-ms-authentication/59681 "2006-05-05T12:06:33Z")

</div>

H, I’ve been trying to fight my way through our over zealous MS proxy server for years. Ruby, Java and, somewhat ironically, .NET apps had all been getting rejected. The only way through was via the IE COM interface.…

---

## [Why?](https://www.ruby-forum.com/t/why/94510)

<div class="topic-metadata">

**Author:** [@David\_ASBoyd](https://www.ruby-forum.com/u/David_ASBoyd)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 11:54am UTC](https://www.ruby-forum.com/t/why/94510 "2006-05-05T11:54:05Z")

</div>

In Praise of Why A few years ago I found an essay I loved ( http://www.soilandhealth.org/03sov/0303critic/030301studentasnigger.html) I guess mainly because it was so outrageous and I was a graduate student at the …

---

## [Rcov 0.3.0 (code coverage tool): happier Rails](https://www.ruby-forum.com/t/rcov-0-3-0-code-coverage-tool-happier-rails/59677)

<div class="topic-metadata">

**Author:** [@tulkas](https://www.ruby-forum.com/u/tulkas)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 11:44am UTC](https://www.ruby-forum.com/t/rcov-0-3-0-code-coverage-tool-happier-rails/59677 "2006-05-05T11:44:45Z")

</div>

Source code, additional information, screenshots… available at eigenclass.org Release information: eigenclass.org If you’re on win32, you can also find a pre-built rcovrt.so (which makes code coverage analysis \>100 …

---

## [IMAPCleanse-1.1.0](https://www.ruby-forum.com/t/imapcleanse-1-1-0/59676)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 10:56am UTC](https://www.ruby-forum.com/t/imapcleanse-1-1-0/59676 "2006-05-05T10:56:00Z")

</div>

Now with imap\_flag! sudo gem install IMAPCleanse I’ve even got fresh IMAPCleanse RDoc! http://seattlerb.rubyforge.org/IMAPCleanse In short: imap\_cleanse removes old, read, unflagged messages from my IMAP mailboxes…

---

## [Openssl aes-\*-cbc is broken](https://www.ruby-forum.com/t/openssl-aes-cbc-is-broken/59313)

<div class="topic-metadata">

**Author:** [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Replies:** 1\
**Last updated:** [May 5, 2006, 10:16am UTC](https://www.ruby-forum.com/t/openssl-aes-cbc-is-broken/59313 "2006-05-05T10:16:44Z")

</div>

e$B@.@%$G$9!#e(B openssl e$B%b%8%e!\<%k$Ne(B AES (CBC mode) e$B$,;H$($J$$$h$&$G$9!#e(B require’openssl’ c1 = OpenSSL::Cipher::Cipher.new(“AES-256-CBC”) c2 = OpenSSL::Cipher::Cipher.new(“AES-256-CBC”) pass = “open ses…

---

## [Big Work Loads & Concurrency](https://www.ruby-forum.com/t/big-work-loads-concurrency/59666)

<div class="topic-metadata">

**Author:** [@dstocks](https://www.ruby-forum.com/u/dstocks)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 7:36am UTC](https://www.ruby-forum.com/t/big-work-loads-concurrency/59666 "2006-05-05T07:36:14Z")

</div>

I am just learning Ruby and planning a to use it for a network monitoring system. I would like to design a system that will scale well and handle large work loads ( tens of thousands of monitors per server ). My ques…

---

## [Creating an object from a variable class name](https://www.ruby-forum.com/t/creating-an-object-from-a-variable-class-name/59631)

<div class="topic-metadata">

**Author:** [@rgr](https://www.ruby-forum.com/u/rgr)\
**Replies:** 13\
**Last updated:** [May 5, 2006, 7:13am UTC](https://www.ruby-forum.com/t/creating-an-object-from-a-variable-class-name/59631 "2006-05-05T07:13:45Z")

</div>

I want to create an object from a class, but the name of that class is in a variable, so the form obj=Class.new(args) can’t be used. How can it be done? Without using eval, because its a bit messy and unelegant. The e…

---

## [Phoenix Ruby Users Group, and Desert Code Camp](https://www.ruby-forum.com/t/phoenix-ruby-users-group-and-desert-code-camp/94501)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [May 5, 2006, 5:39am UTC](https://www.ruby-forum.com/t/phoenix-ruby-users-group-and-desert-code-camp/94501 "2006-05-05T05:39:44Z")

</div>

Big Fun in the Valley of the Sun Phoenix.rb The Phoenix Ruby U. Group will have their May meeting next week. When: Monday, May 8, 6:15 pm to ~8:30pm Where: Cyclone Commerce See the wiki for a map and directions and…

---

## [Mixin puzzle](https://www.ruby-forum.com/t/mixin-puzzle/94458)

<div class="topic-metadata">

**Author:** [@polypus](https://www.ruby-forum.com/u/polypus)\
**Replies:** 19\
**Last updated:** [May 5, 2006, 5:39am UTC](https://www.ruby-forum.com/t/mixin-puzzle/94458 "2006-05-05T05:39:11Z")

</div>

given the below, if you were not allowed to modify class X module N def foo end end module M … end class X extend M end would it possible for x = X.new to somehow call foo as an instance method of x?

---

## [RadRails and path issues](https://www.ruby-forum.com/t/radrails-and-path-issues/59626)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 5\
**Last updated:** [May 5, 2006, 4:46am UTC](https://www.ruby-forum.com/t/radrails-and-path-issues/59626 "2006-05-05T04:46:13Z")

</div>

I have been using RadRails as my editor for Ruby development. Overall I’m pretty happy with it. I’m experiencing a couple of path problems though when using it. Inside of my project within RadRails I will have a dir…

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

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