# Ruby

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

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

---

## [ODBC Error](https://www.ruby-forum.com/t/odbc-error/75030)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 11:10pm UTC](https://www.ruby-forum.com/t/odbc-error/75030 "2006-11-07T23:10:38Z")

</div>

I am running a ruby script to import some data into an MS SQL Server Express database. The script works but I am getting errors. The error message looks like this “WARNING: STMT 0xXXXXXX was not dropped before garbage…

---

## [The way to restrict a ruby program to just once occurrence o](https://www.ruby-forum.com/t/the-way-to-restrict-a-ruby-program-to-just-once-occurrence-o/75078)

<div class="topic-metadata">

**Author:** [@Glenn\_S](https://www.ruby-forum.com/u/Glenn_S)\
**Replies:** 5\
**Last updated:** [November 7, 2006, 10:50pm UTC](https://www.ruby-forum.com/t/the-way-to-restrict-a-ruby-program-to-just-once-occurrence-o/75078 "2006-11-07T22:50:30Z")

</div>

I’m rewriting a vb app to ruby (in about a quarter of the code!). If I ran the same ruby program twice in parallel, the second instance should exit. In VB6 I could do this: If App.PrevInstance Then Exit Su…

---

## [Problem with ActionMailer](https://www.ruby-forum.com/t/problem-with-actionmailer/75166)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:30pm UTC](https://www.ruby-forum.com/t/problem-with-actionmailer/75166 "2006-11-07T22:30:24Z")

</div>

Hi, I am new to ROR so I’m having a hard time figuring out how to fix this problem. I am using Ruby version 1.8.5 (i386-mswin32) RubyGems version 0.9.0 Rails version 1.1.6 Active Record version 1.14.4 Action Pack…

---

## [Ruby and IBM MQ Series](https://www.ruby-forum.com/t/ruby-and-ibm-mq-series/51770)

<div class="topic-metadata">

**Author:** [@Juan\_pablo\_N](https://www.ruby-forum.com/u/Juan_pablo_N)\
**Replies:** 3\
**Last updated:** [November 7, 2006, 9:08pm UTC](https://www.ruby-forum.com/t/ruby-and-ibm-mq-series/51770 "2006-11-07T21:08:04Z")

</div>

Hi folks! I’m thinking about doing web development on RoR for my shop, but most of our clients use the IBM middleware MQSeries. I can’t find a library to use MQSeries from Ruby. Does such a thing even exists? Or shou…

---

## [Struct.new and symbol with question mark](https://www.ruby-forum.com/t/struct-new-and-symbol-with-question-mark/74436)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 8:25pm UTC](https://www.ruby-forum.com/t/struct-new-and-symbol-with-question-mark/74436 "2006-11-07T20:25:48Z")

</div>

Why isn’t the Struct class smart enough to detect a question mark at the end of a member name and create the appropriate #member= and #member? methods? Klass = Struct.new :foo, :bar? =\> Klass x = Klass.new =\> …

---

## [Re: Book wanted: Metaprogramming in Ruby](https://www.ruby-forum.com/t/re-book-wanted-metaprogramming-in-ruby/75143)

<div class="topic-metadata">

**Author:** [@Frank\_Davis](https://www.ruby-forum.com/u/Frank_Davis)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 7:45pm UTC](https://www.ruby-forum.com/t/re-book-wanted-metaprogramming-in-ruby/75143 "2006-11-07T19:45:39Z")

</div>

I’d love to see an Advanced Ruby book targeted towards experienced programmers that are mostly familiar with the C family of compiled languages. As I’ve been teaching myself Ruby over the last several months, I’ve run…

---

## [Why am I getting this string error?](https://www.ruby-forum.com/t/why-am-i-getting-this-string-error/75119)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 7:41pm UTC](https://www.ruby-forum.com/t/why-am-i-getting-this-string-error/75119 "2006-11-07T19:41:53Z")

</div>

Can someone explain to me why I’m getting the error below for this part of a script? It doesn’t seem to like line 24, the scan line, but, I’ve got this same code being used for other needs and it doesn’t complain at a…

---

## [Re: 99 bottles of beer...pg57](https://www.ruby-forum.com/t/re-99-bottles-of-beer-pg57/75140)

<div class="topic-metadata">

**Author:** [@jamison\_edmonds](https://www.ruby-forum.com/u/jamison_edmonds)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 7:27pm UTC](https://www.ruby-forum.com/t/re-99-bottles-of-beer-pg57/75140 "2006-11-07T19:27:35Z")

</div>

ya the books and I arenâ€™t quite there yet, put it wont be long with this ml helping. Thanks ----- Original Message ---- From: Phrogz removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@doma…

---

## [99 bottles of beer...pg57](https://www.ruby-forum.com/t/99-bottles-of-beer-pg57/75133)

<div class="topic-metadata">

**Author:** [@jamison\_edmonds](https://www.ruby-forum.com/u/jamison_edmonds)\
**Replies:** 5\
**Last updated:** [November 7, 2006, 7:17pm UTC](https://www.ruby-forum.com/t/99-bottles-of-beer-pg57/75133 "2006-11-07T19:17:34Z")

</div>

Hi Iâ€™m reading the book Learn to Program, by Chris P… I wanted to see if my program 99 bottles of beer on the wall, from (pg.57 or http://pine.fm/LearnToProgram/?Chapter=06 ) is o.k.? An online search thru Google …

---

## [Re: 99 bottles of beer...pg57](https://www.ruby-forum.com/t/re-99-bottles-of-beer-pg57/75139)

<div class="topic-metadata">

**Author:** [@jamison\_edmonds](https://www.ruby-forum.com/u/jamison_edmonds)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 7:09pm UTC](https://www.ruby-forum.com/t/re-99-bottles-of-beer-pg57/75139 "2006-11-07T19:09:32Z")

</div>

Thanks :-} ----- Original Message ---- From: Sammy L. removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@domain.invalid Sent: Tuesday, November 7, 2006 11:57:01 AM Subject: Re: 99 bottles of…

---

## [Re: 99 bottles of beer...pg57](https://www.ruby-forum.com/t/re-99-bottles-of-beer-pg57/75135)

<div class="topic-metadata">

**Author:** [@jamison\_edmonds](https://www.ruby-forum.com/u/jamison_edmonds)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 6:57pm UTC](https://www.ruby-forum.com/t/re-99-bottles-of-beer-pg57/75135 "2006-11-07T18:57:28Z")

</div>

Nice Thanks ----- Original Message ---- From: Shiloh M. removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@domain.invalid Sent: Tuesday, November 7, 2006 11:50:35 AM Subject: Re: 99 bottles…

---

## [Concat is driving me crazy](https://www.ruby-forum.com/t/concat-is-driving-me-crazy/75128)

<div class="topic-metadata">

**Author:** [@jay](https://www.ruby-forum.com/u/jay)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 6:18pm UTC](https://www.ruby-forum.com/t/concat-is-driving-me-crazy/75128 "2006-11-07T18:18:41Z")

</div>

This is driving me crazy. For some reason product.title = “this is” item.title = product.title.to\_s \<\< ’ my string’ yields “this is my string” but product.title = “this is” item.title = 'my string ’ \<\< product.tit…

---

## [Just a question to throw out there](https://www.ruby-forum.com/t/just-a-question-to-throw-out-there/74764)

<div class="topic-metadata">

**Author:** [@Skotty](https://www.ruby-forum.com/u/Skotty)\
**Replies:** 22\
**Last updated:** [November 7, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/just-a-question-to-throw-out-there/74764 "2006-11-07T18:13:48Z")

</div>

Another noobrube question. Is this the “easiest” language to learn? I’m well aware that none of these programming languages are “easy” but I’ve been struggling with this for a while and don’t want to give up. Or is t…

---

## [Higher Order Ruby (was Re: Book wanted: Metaprogramming in R](https://www.ruby-forum.com/t/higher-order-ruby-was-re-book-wanted-metaprogramming-in-r/75129)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/higher-order-ruby-was-re-book-wanted-metaprogramming-in-r/75129 "2006-11-07T18:10:38Z")

</div>

On 11/6/06, James Edward G. II removed\_email\_address@domain.invalid wrote: I’ve tried to translate a fair portion of the Higher Order Perl material on my blog: Gray Soft / Not Found I’ll get to the final two chapter…

---

## [Re: Book wanted: Concurrent Ruby Programming (was Re: Book w](https://www.ruby-forum.com/t/re-book-wanted-concurrent-ruby-programming-was-re-book-w/75125)

<div class="topic-metadata">

**Author:** [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/re-book-wanted-concurrent-ruby-programming-was-re-book-w/75125 "2006-11-07T17:06:26Z")

</div>

Quoting “M. Edward (Ed) Borasky” removed\_email\_address@domain.invalid: What I’d rather see a book on is dealing with concurrency in Ruby. Dual-core and quad-core chips aren’t going away. :slight\_smile: Francis? You’…

---

## [RubyConf2006: my presentation](https://www.ruby-forum.com/t/rubyconf2006-my-presentation/75073)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 4:44pm UTC](https://www.ruby-forum.com/t/rubyconf2006-my-presentation/75073 "2006-11-07T16:44:19Z")

</div>

Hi, I posted to yarv-dev-en about my presentation on RubyConf 2006. http://www.atdot.net/~ko1/w3ml/w3ml.cgi/yarv-dev-en/msg/227 Thank you for RubyConf Staffs! BTW, does anyone have photographs on RubyConf 2006 which …

---

## [Kinda quiet](https://www.ruby-forum.com/t/kinda-quiet/74418)

<div class="topic-metadata">

**Author:** [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Replies:** 12\
**Last updated:** [November 7, 2006, 3:48pm UTC](https://www.ruby-forum.com/t/kinda-quiet/74418 "2006-11-07T15:48:08Z")

</div>

Is it my imagination, or are things getting really quiet in this forum? It seems that the “movers and shakers” in this forum have moved on to better digs.

---

## [Modifying Time with DPrecision to work with Runt](https://www.ruby-forum.com/t/modifying-time-with-dprecision-to-work-with-runt/75088)

<div class="topic-metadata">

**Author:** [@pozza](https://www.ruby-forum.com/u/pozza)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 1:37pm UTC](https://www.ruby-forum.com/t/modifying-time-with-dprecision-to-work-with-runt/75088 "2006-11-07T13:37:38Z")

</div>

Hi there, I’m currently trying out Runt for a project at work where we want to work out the number of ‘business’ hours that have occurred between two dates. Using Runt I’ve found this super easy to express the workin…

---

## [Book wanted: Metaprogramming in Ruby](https://www.ruby-forum.com/t/book-wanted-metaprogramming-in-ruby/74986)

<div class="topic-metadata">

**Author:** [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Replies:** 9\
**Last updated:** [November 7, 2006, 12:43pm UTC](https://www.ruby-forum.com/t/book-wanted-metaprogramming-in-ruby/74986 "2006-11-07T12:43:28Z")

</div>

Now that Hal, David B, Curt, and others have some spare time: I’m an old-school, procedural programmer. I skipped C++ and Java, and went straight from PL/I to Ruby. Wow, times have changed! So I haven’t developed t…

---

## [Help ruby started acting strange](https://www.ruby-forum.com/t/help-ruby-started-acting-strange/75044)

<div class="topic-metadata">

**Author:** [@cparticle](https://www.ruby-forum.com/u/cparticle)\
**Replies:** 8\
**Last updated:** [November 7, 2006, 11:15am UTC](https://www.ruby-forum.com/t/help-ruby-started-acting-strange/75044 "2006-11-07T11:15:13Z")

</div>

Hey all, I need some help. I’m having some problems with strings in Ruby. More specifically I keep having to explicitly convert string to strings. Let me say that I’ve had some problems with my system and I’ve had …

---

## [Catching process output (Kernel#system)](https://www.ruby-forum.com/t/catching-process-output-kernel-system/69763)

<div class="topic-metadata">

**Author:** [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Replies:** 8\
**Last updated:** [November 7, 2006, 11:12am UTC](https://www.ruby-forum.com/t/catching-process-output-kernel-system/69763 "2006-11-07T11:12:12Z")

</div>

hi! when executing a program via the system method, how do i catch the output of the executed program? furthermore, is there a tutorial describing how to use the system function the best way? TIA, chris

---

## [Webrick $B$N(B Content-Range $B$K$D$$$F(B](https://www.ruby-forum.com/t/webrick-b-n-b-content-range-b-k-d-f-b/75077)

<div class="topic-metadata">

**Author:** [@SASAKI\_Shunsuke](https://www.ruby-forum.com/u/SASAKI_Shunsuke)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:09am UTC](https://www.ruby-forum.com/t/webrick-b-n-b-content-range-b-k-d-f-b/75077 "2006-11-07T11:09:06Z")

</div>

e$B:4!9LZ$H?=$7$^$9!#e(B Webrick e$B$GLdBj$i$7$-J\*$r8+$D$1$^$7$?!#e(B lib/webrick/httpservlet/filehandler.rb:110(1.8.5e$B$N\>l9ge(B) e$B$N!"e(B res\[‘content-range’\] = "#{first}-#{last}/#{filesize}"e$B$O!"e(B e$B@5$7$/…

---

## [Re: Win32ole & Adobe Acrobat Reader](https://www.ruby-forum.com/t/re-win32ole-adobe-acrobat-reader/75075)

<div class="topic-metadata">

**Author:** [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:09am UTC](https://www.ruby-forum.com/t/re-win32ole-adobe-acrobat-reader/75075 "2006-11-07T11:09:01Z")

</div>

I wrote: Does anyone know how to retreive and change the default printer maybe? One way is apprently to use Microsoft Word for that. Sounds crazy, I know… word = WIN32OLE.new(‘Word.Application’) default\_printer = …

---

## [Add dynamic instance methods in a controller class](https://www.ruby-forum.com/t/add-dynamic-instance-methods-in-a-controller-class/74914)

<div class="topic-metadata">

**Author:** [@Luc\_J](https://www.ruby-forum.com/u/Luc_J)\
**Replies:** 12\
**Last updated:** [November 7, 2006, 11:08am UTC](https://www.ruby-forum.com/t/add-dynamic-instance-methods-in-a-controller-class/74914 "2006-11-07T11:08:58Z")

</div>

Hello All, I have a problem while developping an application using rails. In fact, this is more a general question on Ruby methods. I’d like to add some methods to my controller depending upon some parameters read fr…

---

## [Re: Win32ole & Adobe Acrobat Reader](https://www.ruby-forum.com/t/re-win32ole-adobe-acrobat-reader/75072)

<div class="topic-metadata">

**Author:** [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:08am UTC](https://www.ruby-forum.com/t/re-win32ole-adobe-acrobat-reader/75072 "2006-11-07T11:08:57Z")

</div>

Philippe L. wrote: filename = “myfile.pdf” Works great, thanks a lot! I’ll keep on trying the OLE way of doing things: printing in the background could be useful too. Here we are: acrobat = WIN32OLE.new(‘AcroExc…

---

## [Re: Win32ole & Adobe Acrobat Reader](https://www.ruby-forum.com/t/re-win32ole-adobe-acrobat-reader/75069)

<div class="topic-metadata">

**Author:** [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:08am UTC](https://www.ruby-forum.com/t/re-win32ole-adobe-acrobat-reader/75069 "2006-11-07T11:08:55Z")

</div>

Jeff wrote: start #{filename} If it’s hard to see in your browser, I’m using the “backtick” not the apostrophe, which will induce a system call. I’m assuming Acrobat is installed as your handler for .pdf files. Je…

---

## [Simple mix-in example](https://www.ruby-forum.com/t/simple-mix-in-example/75056)

<div class="topic-metadata">

**Author:** [@pedro\_mg](https://www.ruby-forum.com/u/pedro_mg)\
**Replies:** 4\
**Last updated:** [November 7, 2006, 11:08am UTC](https://www.ruby-forum.com/t/simple-mix-in-example/75056 "2006-11-07T11:08:53Z")

</div>

Hi, can we consider this is a mix-in newbie example ? We are giving a new feature to method \> on our Mixin class. class Mixin def initialize(a) @a = a end def \>(arg) puts “Yep!” if @a \> arg end end test = Mixi…

---

## [Swiss Ruby User Group Meeting, 9.11.2006](https://www.ruby-forum.com/t/swiss-ruby-user-group-meeting-9-11-2006/75058)

<div class="topic-metadata">

**Author:** [@Jens-Christian\_F](https://www.ruby-forum.com/u/Jens-Christian_F)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:08am UTC](https://www.ruby-forum.com/t/swiss-ruby-user-group-meeting-9-11-2006/75058 "2006-11-07T11:08:52Z")

</div>

The Swiss Ruby U. Group will be meeting on Thursday 9.11.2006 in Zurich. Place: Ergon Informatik, Zurich Time: 18:30 - 20:00 + optional dinner Topics: Who’s doing what - Ruby / Rails Projects in Switzerland Behaviou…

---

## [Require\_gem scoping issue?](https://www.ruby-forum.com/t/require-gem-scoping-issue/75057)

<div class="topic-metadata">

**Author:** [@makenai](https://www.ruby-forum.com/u/makenai)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 11:08am UTC](https://www.ruby-forum.com/t/require-gem-scoping-issue/75057 "2006-11-07T11:08:50Z")

</div>

Hi all, I’m running into a weird problem with rubygems and using ‘require\_gem’. Given the following code, – being code – require ‘rubygems’ require\_gem ‘mechanize’, ‘\>= 0.6.3’ class MyClass def initialize @agent…

---

## [Paths, gentleman, paths](https://www.ruby-forum.com/t/paths-gentleman-paths/74415)

<div class="topic-metadata">

**Author:** [@ohad](https://www.ruby-forum.com/u/ohad)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 11:08am UTC](https://www.ruby-forum.com/t/paths-gentleman-paths/74415 "2006-11-07T11:08:43Z")

</div>

I have this bit of code in the beginning of an application I’m writing (in main.rb): require ‘pathname’ p = Pathname.new($0) if p.basename.to\_s == ‘main.rb’ Dir.chdir p.parent.to\_s end require ‘gui/main\_window’ ……

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

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