# Ruby

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

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

---

## [Temporarily change method access for test](https://www.ruby-forum.com/t/temporarily-change-method-access-for-test/90333)

<div class="topic-metadata">

**Author:** [@PerfectDayToChaseTo](https://www.ruby-forum.com/u/PerfectDayToChaseTo)\
**Replies:** 6\
**Last updated:** [March 28, 2007, 1:06am UTC](https://www.ruby-forum.com/t/temporarily-change-method-access-for-test/90333 "2007-03-28T01:06:28Z")

</div>

Hi All, I have seen an example of a unit test temporarily making a private method public to unit test it. Now that I need it I can’t find it :slight\_smile: Please could someone kindly point me in the right direction…

---

## [Setting cookies with apache eruby osx](https://www.ruby-forum.com/t/setting-cookies-with-apache-eruby-osx/90343)

<div class="topic-metadata">

**Author:** [@maxbohr](https://www.ruby-forum.com/u/maxbohr)\
**Replies:** 0\
**Last updated:** [March 28, 2007, 1:03am UTC](https://www.ruby-forum.com/t/setting-cookies-with-apache-eruby-osx/90343 "2007-03-28T01:03:07Z")

</div>

Hi list, I’m attempting to write a simple web app in ruby that uses cookies. I can’t seem to get the program to set a cookie on the users browser. I’m testing my “cookie setting ability” with this script from the Pr…

---

## [Drb recycled object problem](https://www.ruby-forum.com/t/drb-recycled-object-problem/90119)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 12\
**Last updated:** [March 28, 2007, 12:48am UTC](https://www.ruby-forum.com/t/drb-recycled-object-problem/90119 "2007-03-28T00:48:26Z")

</div>

I did a search on google and found the following page. http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/13236?13221-13721 Going down on that page, you find a header saying ‘drb and “recycled objects” erro…

---

## [Ruby/MySQL SELECT results](https://www.ruby-forum.com/t/ruby-mysql-select-results/90159)

<div class="topic-metadata">

**Author:** [@pozza](https://www.ruby-forum.com/u/pozza)\
**Replies:** 4\
**Last updated:** [March 27, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/ruby-mysql-select-results/90159 "2007-03-27T22:42:05Z")

</div>

Hi I am playing with Ruby/MySQL, I have everything installed ok. I can INSERT into my database but I am having trouble with SELECT. I want to see if the text in the field ‘title’ has been used before and if it has re…

---

## [Importing GEM libraries .... newby questions](https://www.ruby-forum.com/t/importing-gem-libraries-newby-questions/90115)

<div class="topic-metadata">

**Author:** [@cugf\_0956](https://www.ruby-forum.com/u/cugf_0956)\
**Replies:** 6\
**Last updated:** [March 27, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/importing-gem-libraries-newby-questions/90115 "2007-03-27T22:21:01Z")

</div>

I have installed ruby on my laptop using rpm and I installed a whole bunch of packages using GEM. Now when I run any scripts on my laptop, ruby can locate any package that is installed via rpm but not the one installe…

---

## [How do I put empty directories into a gem package?](https://www.ruby-forum.com/t/how-do-i-put-empty-directories-into-a-gem-package/85241)

<div class="topic-metadata">

**Author:** [@luke](https://www.ruby-forum.com/u/luke)\
**Replies:** 4\
**Last updated:** [March 27, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/how-do-i-put-empty-directories-into-a-gem-package/85241 "2007-03-27T22:18:00Z")

</div>

I feel like an idiot for being unable to get this working… I’m trying to put together a general purpose “project templating engine” and I’d like to just package a directory full of project templates that get copied an…

---

## [Ruby best practice re handling system exceptions/application](https://www.ruby-forum.com/t/ruby-best-practice-re-handling-system-exceptions-application/89689)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [March 27, 2007, 10:15pm UTC](https://www.ruby-forum.com/t/ruby-best-practice-re-handling-system-exceptions-application/89689 "2007-03-27T22:15:56Z")

</div>

Hi all, What is Ruby best practice re handling system exceptions/application errors/audit events? (mostly for usage with Rails, but also for general Ruby apps). How do Ruby developers normally handle the following c…

---

## ["Beginning Ruby" from Apress released](https://www.ruby-forum.com/t/beginning-ruby-from-apress-released/90328)

<div class="topic-metadata">

**Author:** [@pcooper](https://www.ruby-forum.com/u/pcooper)\
**Replies:** 0\
**Last updated:** [March 27, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/beginning-ruby-from-apress-released/90328 "2007-03-27T21:32:40Z")

</div>

Hi guys! My first book, “Beginning Ruby”, published by Apress, has been released. It’s available at all the usual places now. Amazon seems to have the best price at $26.39ish ( http://www.amazon.com/Beginning-Ruby-P…

---

## [Question about if in Ruby](https://www.ruby-forum.com/t/question-about-if-in-ruby/89864)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 15\
**Last updated:** [March 27, 2007, 8:35pm UTC](https://www.ruby-forum.com/t/question-about-if-in-ruby/89864 "2007-03-27T20:35:32Z")

</div>

I’ve seen this in Rails, but it is just ERb, so it is Ruby… \<%= link\_to ‘Previous page’, { :page =\> @product\_pages.current.previous } if @product\_pages.current.previous %\> I’m curious how it is different from this… \<%…

---

## [Oniguruma for ruby initial release](https://www.ruby-forum.com/t/oniguruma-for-ruby-initial-release/89792)

<div class="topic-metadata">

**Author:** [@Dizan\_V](https://www.ruby-forum.com/u/Dizan_V)\
**Replies:** 1\
**Last updated:** [March 27, 2007, 8:20pm UTC](https://www.ruby-forum.com/t/oniguruma-for-ruby-initial-release/89792 "2007-03-27T20:20:30Z")

</div>

Oniguruma regular expression library bindings for Ruby. This is the initial release of these bindings, which allow developers to use the powerful features of Oniguruma (named groups, look-behinds, etc.) without the ne…

---

## [USPS AMS API anyone?](https://www.ruby-forum.com/t/usps-ams-api-anyone/90317)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [March 27, 2007, 7:26pm UTC](https://www.ruby-forum.com/t/usps-ams-api-anyone/90317 "2007-03-27T19:26:23Z")

</div>

Has anybody worked with the USPS AMS API (Address Matching System Application Programming Interface) before? My objective is to verify addresses using the USPS DB and although there are existing ruby libs for that I h…

---

## [Suggestion: swap name of "puts" and "print" and rename "puts](https://www.ruby-forum.com/t/suggestion-swap-name-of-puts-and-print-and-rename-puts/89977)

<div class="topic-metadata">

**Author:** [@michaelb](https://www.ruby-forum.com/u/michaelb)\
**Replies:** 23\
**Last updated:** [March 27, 2007, 6:58pm UTC](https://www.ruby-forum.com/t/suggestion-swap-name-of-puts-and-print-and-rename-puts/89977 "2007-03-27T18:58:16Z")

</div>

Hello: I’ve been using Ruby on-and-off for about 4 weeks now and love it. However, some of the naming consistencies really bug me. The ones that bug me the most are the “print”, “puts” and “putc”. I’d like to sugges…

---

## [How do I implement the Unix 'tee' function for $stdout?](https://www.ruby-forum.com/t/how-do-i-implement-the-unix-tee-function-for-stdout/90235)

<div class="topic-metadata">

**Author:** [@lfast](https://www.ruby-forum.com/u/lfast)\
**Replies:** 13\
**Last updated:** [March 27, 2007, 6:55pm UTC](https://www.ruby-forum.com/t/how-do-i-implement-the-unix-tee-function-for-stdout/90235 "2007-03-27T18:55:14Z")

</div>

I already discovered that I can redirect $stdout just by pointing it at a new file handle. But what I really want is to have the output continue to STDOUT but ALSO go into my logging file along with a pile of trace d…

---

## [SWIG toy example problem](https://www.ruby-forum.com/t/swig-toy-example-problem/90001)

<div class="topic-metadata">

**Author:** [@Larrytheliquid](https://www.ruby-forum.com/u/Larrytheliquid)\
**Replies:** 2\
**Last updated:** [March 27, 2007, 6:51pm UTC](https://www.ruby-forum.com/t/swig-toy-example-problem/90001 "2007-03-27T18:51:15Z")

</div>

I’m having a bit of trouble trying to use SWIG to wrap a simple C++ header file, as follows: ‘MyTest.h’ #define SUCCESS 1 ‘myTest.i’ %include MyTest.h %module myTest %{ #include “MyTest.h” %} swig -c++ -ruby myTe…

---

## [Poll: What authentication framework/plugin do you use?](https://www.ruby-forum.com/t/poll-what-authentication-framework-plugin-do-you-use/90310)

<div class="topic-metadata">

**Author:** [@Jake\_C](https://www.ruby-forum.com/u/Jake_C)\
**Replies:** 1\
**Last updated:** [March 27, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/poll-what-authentication-framework-plugin-do-you-use/90310 "2007-03-27T18:26:13Z")

</div>

Very interested in seeing what you are using and why. We’re trying to choose ourselves, but having trouble coming to a conclusion. Thanks guys. Jake

---

## [Sorting an array based on two attributes of objects](https://www.ruby-forum.com/t/sorting-an-array-based-on-two-attributes-of-objects/90165)

<div class="topic-metadata">

**Author:** [@senthil](https://www.ruby-forum.com/u/senthil)\
**Replies:** 6\
**Last updated:** [March 27, 2007, 6:18pm UTC](https://www.ruby-forum.com/t/sorting-an-array-based-on-two-attributes-of-objects/90165 "2007-03-27T18:18:12Z")

</div>

Thanks for some of your replies for the lst post i need small modification in that post … i want to sort the salary in descending order. i have explained the same quesion again… Hi all, I want to sort the objects of …

---

## [How to tranlsate number to binary?](https://www.ruby-forum.com/t/how-to-tranlsate-number-to-binary/90099)

<div class="topic-metadata">

**Author:** [@ak756](https://www.ruby-forum.com/u/ak756)\
**Replies:** 14\
**Last updated:** [March 27, 2007, 5:59pm UTC](https://www.ruby-forum.com/t/how-to-tranlsate-number-to-binary/90099 "2007-03-27T17:59:08Z")

</div>

Hi, I am a ruby newbie. I want to write a program which will scan a input file, change every digital number into 4 bits len’s binary number. For example, for input.txt as 903 1047 I will get a new file as 1001000…

---

## [Splitting an array into sub\_arrays ...need advice](https://www.ruby-forum.com/t/splitting-an-array-into-sub-arrays-need-advice/90046)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 4\
**Last updated:** [March 27, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/splitting-an-array-into-sub-arrays-need-advice/90046 "2007-03-27T17:51:06Z")

</div>

I have an array similar to this example (after sorting it on a\[i\]\[1\] and a\[i\]\[2\]) start\_array = \[ \[1, 1, 1, 0\], \[2, 1, 1, 0\], \[3, 1, 1, 0\], \[4, 1, 2, 0\], \[5, 1, 2, 0\], \[6, 2, 1, 0\], \[7, 2, 1, 0\], \[8, 2, 2, 0\], \[9, 2,…

---

## [SQL Error](https://www.ruby-forum.com/t/sql-error/90079)

<div class="topic-metadata">

**Author:** [@donny24](https://www.ruby-forum.com/u/donny24)\
**Replies:** 2\
**Last updated:** [March 27, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/sql-error/90079 "2007-03-27T17:46:06Z")

</div>

All, I am getting an error when viewing localhost development of my Ruby app. Has anyone seen anything similar to that below? ActiveRecord::StatementInvalid in Admin/authorController#new Mysql::Error: Lost connection…

---

## [Timeout and windows](https://www.ruby-forum.com/t/timeout-and-windows/102728)

<div class="topic-metadata">

**Author:** [@jamie](https://www.ruby-forum.com/u/jamie)\
**Replies:** 1\
**Last updated:** [March 27, 2007, 4:33pm UTC](https://www.ruby-forum.com/t/timeout-and-windows/102728 "2007-03-27T16:33:44Z")

</div>

Hello, I am using windows, which is probably the source of the problem. I have a pipe that executes an external Ruby program, and i want to have a timeout on the pipe. The problem is that when the time is up the pipe …

---

## [Ruby on Rails course by Ruby Power and Light](https://www.ruby-forum.com/t/ruby-on-rails-course-by-ruby-power-and-light/90300)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [March 27, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-course-by-ruby-power-and-light/90300 "2007-03-27T16:22:36Z")

</div>

Hi everyone – I’m happy to announce that Ruby Power and Light, LLC is offering a four-day course: Ruby on Rails: Intro to Intermediate May 8-11, 2007 Edison, New Jersey, USA The course will be held at the new, …

---

## [Help me about nil check of veriable( question of a niw bie)](https://www.ruby-forum.com/t/help-me-about-nil-check-of-veriable-question-of-a-niw-bie/90275)

<div class="topic-metadata">

**Author:** [@Sasaki](https://www.ruby-forum.com/u/Sasaki)\
**Replies:** 2\
**Last updated:** [March 27, 2007, 4:11pm UTC](https://www.ruby-forum.com/t/help-me-about-nil-check-of-veriable-question-of-a-niw-bie/90275 "2007-03-27T16:11:34Z")

</div>

Hi guys, I have a string variable named as ‘last\_name’. how can i check NULL(nil) of this veriable? as exapmle if ( empty(last\_name) ) #\* # code else #code end How can I write the syntax in the if statement(\*)…

---

## [Tar2RubyScript: Path to original executable & browser issues](https://www.ruby-forum.com/t/tar2rubyscript-path-to-original-executable-browser-issues/90290)

<div class="topic-metadata">

**Author:** [@masschel](https://www.ruby-forum.com/u/masschel)\
**Replies:** 0\
**Last updated:** [March 27, 2007, 12:20pm UTC](https://www.ruby-forum.com/t/tar2rubyscript-path-to-original-executable-browser-issues/90290 "2007-03-27T12:20:24Z")

</div>

Getting the path to the original executable is possible with the script described here: http://www.erikveen.dds.nl/tar2rubyscript/index.html#3.2.0 I work with a rails application that consist of a executable and some …

---

## [Use Ruby to monitor a printer?](https://www.ruby-forum.com/t/use-ruby-to-monitor-a-printer/90272)

<div class="topic-metadata">

**Author:** [@ak756](https://www.ruby-forum.com/u/ak756)\
**Replies:** 3\
**Last updated:** [March 27, 2007, 11:39am UTC](https://www.ruby-forum.com/t/use-ruby-to-monitor-a-printer/90272 "2007-03-27T11:39:26Z")

</div>

Hi,everyone! I want to write a program to monitor a network printer and give statistic data as whom at what time print how many pages. Is it possible to do this using Ruby? Which library shall I use to do this?

---

## [Ruby Weekly News 19th - 25th March 2007](https://www.ruby-forum.com/t/ruby-weekly-news-19th-25th-march-2007/90279)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 0\
**Last updated:** [March 27, 2007, 10:40am UTC](https://www.ruby-forum.com/t/ruby-weekly-news-19th-25th-march-2007/90279 "2007-03-27T10:40:46Z")

</div>

Links are at http://www.rubyweeklynews.org/20070325.html Ruby Weekly News 19th - 25th March 2007 Ruby Weekly News takes a look at the week’s discussions on the ruby-talk mailing list (and its equivalents, the comp.la…

---

## [ANN: InstantERB](https://www.ruby-forum.com/t/ann-instanterb/90266)

<div class="topic-metadata">

**Author:** [@giaco](https://www.ruby-forum.com/u/giaco)\
**Replies:** 0\
**Last updated:** [March 27, 2007, 5:56am UTC](https://www.ruby-forum.com/t/ann-instanterb/90266 "2007-03-27T05:56:40Z")

</div>

Inspired by Florian G.'s Execute as Ruby Code Service for OS X (Execute as Ruby Code Service for OS X - Ruby - Ruby-Forum), I have created InstantERB. It uses the incredibly useful AutoHotKey utility. It will run any s…

---

## [Class Variables for subclases](https://www.ruby-forum.com/t/class-variables-for-subclases/90260)

<div class="topic-metadata">

**Author:** [@soroe](https://www.ruby-forum.com/u/soroe)\
**Replies:** 4\
**Last updated:** [March 27, 2007, 5:38am UTC](https://www.ruby-forum.com/t/class-variables-for-subclases/90260 "2007-03-27T05:38:54Z")

</div>

Hey Guys, Check out the following: class A @@anobject = ‘green’ def fun2 @@anobject end end class B \< A @@anobject = ‘blue’ def fun2 @@anobject end end puts B.new.fun2 # blue puts A.new.fun2 # blue S…

---

## [SciTE Alternatives](https://www.ruby-forum.com/t/scite-alternatives/89198)

<div class="topic-metadata">

**Author:** [@PythonUsr](https://www.ruby-forum.com/u/PythonUsr)\
**Replies:** 37\
**Last updated:** [March 27, 2007, 4:30am UTC](https://www.ruby-forum.com/t/scite-alternatives/89198 "2007-03-27T04:30:36Z")

</div>

Are there any good SciTE alternatives that are mainly for Ruby editing and compiling? I don’t mean FreeRIDE, as I can’t stand that program (so many warnings and errors when you run it, it’s unbelievable). Can you guys…

---

## [Newbie: Make this code better?](https://www.ruby-forum.com/t/newbie-make-this-code-better/90245)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 3\
**Last updated:** [March 27, 2007, 4:28am UTC](https://www.ruby-forum.com/t/newbie-make-this-code-better/90245 "2007-03-27T04:28:35Z")

</div>

Hi all Another newbie question. I have the following code: private def model\_obj\_name CountriesController.controller\_class\_name.underscore.sub(/\_controller$/, ‘’).singularize end I use it quite a lot, and it’s alw…

---

## [Ruby.NET on Channel9](https://www.ruby-forum.com/t/ruby-net-on-channel9/90227)

<div class="topic-metadata">

**Author:** [@JSSSSrg\_W\_Mittag](https://www.ruby-forum.com/u/JSSSSrg_W_Mittag)\
**Replies:** 1\
**Last updated:** [March 27, 2007, 4:20am UTC](https://www.ruby-forum.com/t/ruby-net-on-channel9/90227 "2007-03-27T04:20:35Z")

</div>

Hi, I just noticed that Channel9 (Microsoft’s community website – at least as far as Microsoft’s definition of “community” goes) posted a video interview with Dr. Wayne K., Senior Lecturer at Queensland University of…

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

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