# Ruby

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

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

---

## [Piston 1.3.1: Fixed switch subcommand](https://www.ruby-forum.com/t/piston-1-3-1-fixed-switch-subcommand/88308)

<div class="topic-metadata">

**Author:** [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Replies:** 0\
**Last updated:** [March 9, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/piston-1-3-1-fixed-switch-subcommand/88308 "2007-03-09T16:12:35Z")

</div>

Hello all ! = What is it ? Piston is a utility that eases vendor branch management. This is similar to svn:externals, except you have a local copy of the files, which you can modify at will. As long as the changes …

---

## [Input syntax](https://www.ruby-forum.com/t/input-syntax/88268)

<div class="topic-metadata">

**Author:** [@mosar](https://www.ruby-forum.com/u/mosar)\
**Replies:** 5\
**Last updated:** [March 9, 2007, 3:06pm UTC](https://www.ruby-forum.com/t/input-syntax/88268 "2007-03-09T15:06:10Z")

</div>

I have tried this little program taken from rubylearning.com site: puts “In which city do you stay ?” city= gets.chomp puts "The city is " + city At the right part of the Scite window I get ruby Dhomp.rb In which …

---

## [A better benchmarking syntax (was: Automatic Benchmark Itera](https://www.ruby-forum.com/t/a-better-benchmarking-syntax-was-automatic-benchmark-itera/88003)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 20\
**Last updated:** [March 9, 2007, 12:40pm UTC](https://www.ruby-forum.com/t/a-better-benchmarking-syntax-was-automatic-benchmark-itera/88003 "2007-03-09T12:40:45Z")

</div>

Reading Phrogz’ post about automatic benchmark iterations, and then seeing Mauricios’ lovely Adaptative Benchmark\[1\], I came to think we might need a friendlier syntax for benchmarks all together. Minutes later, I dis…

---

## [Vijil E Chenthamarakshan is out of the office](https://www.ruby-forum.com/t/vijil-e-chenthamarakshan-is-out-of-the-office/88262)

<div class="topic-metadata">

**Author:** [@Vijil\_E\_Chenthamara](https://www.ruby-forum.com/u/Vijil_E_Chenthamara)\
**Replies:** 1\
**Last updated:** [March 9, 2007, 12:16pm UTC](https://www.ruby-forum.com/t/vijil-e-chenthamarakshan-is-out-of-the-office/88262 "2007-03-09T12:16:40Z")

</div>

I will be out of the office starting 03/08/2007 and will not return until 03/11/2007. I will respond to your message when I return.

---

## [File open, read and store in Hash, efficient?](https://www.ruby-forum.com/t/file-open-read-and-store-in-hash-efficient/88270)

<div class="topic-metadata">

**Author:** [@Kev](https://www.ruby-forum.com/u/Kev)\
**Replies:** 5\
**Last updated:** [March 9, 2007, 11:55am UTC](https://www.ruby-forum.com/t/file-open-read-and-store-in-hash-efficient/88270 "2007-03-09T11:55:38Z")

</div>

Hello, I am writing a class and I require it to open a file, and store the contents in key, value pairs. This is my first def initialize() @@store = Hash.new end def read\_file if File.exists?(“LocationCopy.csv”) …

---

## [Time#to\_s format](https://www.ruby-forum.com/t/time-to-s-format/87702)

<div class="topic-metadata">

**Author:** [@OHARA\_Shigeki](https://www.ruby-forum.com/u/OHARA_Shigeki)\
**Replies:** 5\
**Last updated:** [March 9, 2007, 9:17am UTC](https://www.ruby-forum.com/t/time-to-s-format/87702 "2007-03-09T09:17:18Z")

</div>

e$BBg86$G$9!#e(B Ruby 1.8.6 e$B$+$ie(B Time#to\_s e$B$N7A\<0$,e(B RFC 2822 e$B=\`5r$KJQ99$K$J$k$h$&$J$N$G$9$,!"e(B e$B$3$N7A\<0$,4V0c$C$F$$$k$h$&$K;W$$$^$9!#e(B From: “NARUSE, Yui” removed\_email\_address@domain.invalid S…

---

## [2 lines in one](https://www.ruby-forum.com/t/2-lines-in-one/88263)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 5\
**Last updated:** [March 9, 2007, 8:55am UTC](https://www.ruby-forum.com/t/2-lines-in-one/88263 "2007-03-09T08:55:15Z")

</div>

Could I write it in just 1 line ? find the first value greater than d, in a list (special one : each value is the double of the previous…) then give me the index of this value (with special case …) i = (\[0.5,1.0,…

---

## [Rjust alignment](https://www.ruby-forum.com/t/rjust-alignment/88252)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [March 9, 2007, 7:23am UTC](https://www.ruby-forum.com/t/rjust-alignment/88252 "2007-03-09T07:23:09Z")

</div>

I think I’m going crazy. I tried to write a fairly simple program to test ljust, center and rjust. But I cannot make the page numbers of my table of contents line up. I tried to account for the string length of the…

---

## [Need help with if statement in helper class and view](https://www.ruby-forum.com/t/need-help-with-if-statement-in-helper-class-and-view/88250)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 9, 2007, 6:59am UTC](https://www.ruby-forum.com/t/need-help-with-if-statement-in-helper-class-and-view/88250 "2007-03-09T06:59:06Z")

</div>

I don’t know if this is a ruby only question or a rails question. I have a helper class that updates the view based on the info from the div tag. This information is passed using the link\_to\_function. But it doesn’t w…

---

## [Building ruby on Solaris (without root permissions)](https://www.ruby-forum.com/t/building-ruby-on-solaris-without-root-permissions/88011)

<div class="topic-metadata">

**Author:** [@jonathan](https://www.ruby-forum.com/u/jonathan)\
**Replies:** 4\
**Last updated:** [March 9, 2007, 5:41am UTC](https://www.ruby-forum.com/t/building-ruby-on-solaris-without-root-permissions/88011 "2007-03-09T05:41:01Z")

</div>

I’m trying to install ruby under my home directory on a Solaris 5.8 sparc machine. I ran ./configure with the --prefix switch to point to a directory ~/ruby and then ran /usr/local/bin/make to override the sun one on…

---

## [ActiveWarehouse ETL 0.6.0 Released](https://www.ruby-forum.com/t/activewarehouse-etl-0-6-0-released/88246)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 0\
**Last updated:** [March 9, 2007, 5:27am UTC](https://www.ruby-forum.com/t/activewarehouse-etl-0-6-0-released/88246 "2007-03-09T05:27:00Z")

</div>

ActiveWarehouse ETL 0.6.0 has been released. A bit of background: ActiveWarehouse ETL is an open source (MIT licensed) Ruby library which supports the Extract-Transform-Load process that is typically required by data …

---

## [Facets / Multiton 2.0.0](https://www.ruby-forum.com/t/facets-multiton-2-0-0/88237)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 2\
**Last updated:** [March 9, 2007, 5:26am UTC](https://www.ruby-forum.com/t/facets-multiton-2-0-0/88237 "2007-03-09T05:26:00Z")

</div>

Facets / Multiton 2.0.0 Implementation of the Multiton Design Pattern by Ara T Howard and Trans http://facets.rubyforge.org \[ S Y N O P S I S \] Multiton is similar to the Singleton, but rather than a single object …

---

## [Efficient processing of binary data streams in Ruby?](https://www.ruby-forum.com/t/efficient-processing-of-binary-data-streams-in-ruby/88233)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [March 9, 2007, 4:10am UTC](https://www.ruby-forum.com/t/efficient-processing-of-binary-data-streams-in-ruby/88233 "2007-03-09T04:10:56Z")

</div>

I’m writing a Ruby program that has to process binary data from files and sockets. Data items are in bytes, 16-bit words, or 32-bit words, and I cannot predict in advance whether the data will be msb-first or lsb-fir…

---

## [How to aliase a module method?](https://www.ruby-forum.com/t/how-to-aliase-a-module-method/88123)

<div class="topic-metadata">

**Author:** [@fxn](https://www.ruby-forum.com/u/fxn)\
**Replies:** 6\
**Last updated:** [March 9, 2007, 3:33am UTC](https://www.ruby-forum.com/t/how-to-aliase-a-module-method/88123 "2007-03-09T03:33:51Z")

</div>

I am trying to aliase a module method to some local alias (to ease some template). I’ve tried a few variations of alias escape\_latex MyUtils.escape\_latex without luck so far. I could mixin the module or write a wrappe…

---

## [Hi, I'm Ricardo & I need some Help](https://www.ruby-forum.com/t/hi-im-ricardo-i-need-some-help/88240)

<div class="topic-metadata">

**Author:** [@Ricardo\_Delvalle](https://www.ruby-forum.com/u/Ricardo_Delvalle)\
**Replies:** 0\
**Last updated:** [March 9, 2007, 2:52am UTC](https://www.ruby-forum.com/t/hi-im-ricardo-i-need-some-help/88240 "2007-03-09T02:52:48Z")

</div>

Hi, I’m Ricardo & I need some Help. I want to know, what Yukihiro Â“matzÂ” Matsumoto’s (Ruby-lang.org) (Creator & Founder of the Programming Language, Ruby) E-mail address is. Please tell me. P.S. Also, I need help …

---

## [Hi, I'm Ricardo & I need some Help](https://www.ruby-forum.com/t/hi-im-ricardo-i-need-some-help/88239)

<div class="topic-metadata">

**Author:** [@Ricardo\_Delvalle](https://www.ruby-forum.com/u/Ricardo_Delvalle)\
**Replies:** 0\
**Last updated:** [March 9, 2007, 2:51am UTC](https://www.ruby-forum.com/t/hi-im-ricardo-i-need-some-help/88239 "2007-03-09T02:51:48Z")

</div>

Hi, I’m Ricardo & I need some Help. I want to know, what Yukihiro Â“matzÂ” Matsumoto’s (Ruby-lang.org) (Creator & Founder of the Programming Language, Ruby) E-mail address is. Please tell me. P.S. Also, I need help u…

---

## [Paul Graham explains Ruby symbols](https://www.ruby-forum.com/t/paul-graham-explains-ruby-symbols/87947)

<div class="topic-metadata">

**Author:** [@Luciano\_R](https://www.ruby-forum.com/u/Luciano_R)\
**Replies:** 27\
**Last updated:** [March 9, 2007, 1:36am UTC](https://www.ruby-forum.com/t/paul-graham-explains-ruby-symbols/87947 "2007-03-09T01:36:39Z")

</div>

Paul Graham offers this excellent explanation for the symbol type: “Symbols are effectively pointers to strings stored in a hash table. So you can test equality by comparing a pointer, instead of comparing each charac…

---

## [Str.lines\[1..-1\]](https://www.ruby-forum.com/t/str-lines-1-1/87669)

<div class="topic-metadata">

**Author:** [@Minero\_A](https://www.ruby-forum.com/u/Minero_A)\
**Replies:** 6\
**Last updated:** [March 9, 2007, 1:20am UTC](https://www.ruby-forum.com/t/str-lines-1-1/87669 "2007-03-09T01:20:38Z")

</div>

e$B@DLZ$G$9!#e(B e$B\<!$N$h$&$J%3!\<%I$r=q$$$?$ie(B NoMethodError e$B$K$J$C$Fe(B e$BHa$7$$;W$$$r$7$^$7$?!#e(B str.lines\[1…-1\] e$B$7$g$&$,$J$/e(B str.lines.to\_a\[1…-1\] e$B$H=q$$$FF($2$^$7$?$,!"e(B e$B;zLL$,7y$9$.$^$9!#$…

---

## [Ruby 1.8.5 + Gem 0.9.2 + Rails 1.2.2 + Ubuntu Edgy 6.10](https://www.ruby-forum.com/t/ruby-1-8-5-gem-0-9-2-rails-1-2-2-ubuntu-edgy-6-10/88229)

<div class="topic-metadata">

**Author:** [@Brock\_Weaver](https://www.ruby-forum.com/u/Brock_Weaver)\
**Replies:** 0\
**Last updated:** [March 9, 2007, 1:11am UTC](https://www.ruby-forum.com/t/ruby-1-8-5-gem-0-9-2-rails-1-2-2-ubuntu-edgy-6-10/88229 "2007-03-09T01:11:37Z")

</div>

Maybe this could be considered blogspam, but it took me awhile to get the latest release version of ruby+rails running on my Ubuntu box and it involved googling several articles. I thought I might make it a little m…

---

## [Image\_science 1.1.1 Released](https://www.ruby-forum.com/t/image-science-1-1-1-released/88225)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [March 9, 2007, 12:19am UTC](https://www.ruby-forum.com/t/image-science-1-1-1-released/88225 "2007-03-09T00:19:31Z")

</div>

image\_science version 1.1.1 has been released! http://seattlerb.rubyforge.org/ImageScience.html ImageScience is a clean and happy Ruby library that generates thumbnails – and kicks the living crap out of RMagick. Oh, …

---

## [Rubyforge 0.4.1 Released](https://www.ruby-forum.com/t/rubyforge-0-4-1-released/88224)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [March 9, 2007, 12:18am UTC](https://www.ruby-forum.com/t/rubyforge-0-4-1-released/88224 "2007-03-09T00:18:31Z")

</div>

rubyforge version 0.4.1 has been released! http://rubyforge.org/projects/codeforpeople A simplistic script which automates a limited set of rubyforge operations Run ‘rubyforge help’ for complete usage. Setup: For fi…

---

## [Methods that affect subsequently defined methods](https://www.ruby-forum.com/t/methods-that-affect-subsequently-defined-methods/88214)

<div class="topic-metadata">

**Author:** [@MSAyhan](https://www.ruby-forum.com/u/MSAyhan)\
**Replies:** 1\
**Last updated:** [March 9, 2007, 12:07am UTC](https://www.ruby-forum.com/t/methods-that-affect-subsequently-defined-methods/88214 "2007-03-09T00:07:30Z")

</div>

Hi, I want to implement methods like Ruby’s protected that will effect some aspect of the subsequently defined methods. For example, I want write sth like follows: class Test authorize\_for :ROLE1, :ROLE2 def method…

---

## [Error message help](https://www.ruby-forum.com/t/error-message-help/88217)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 2\
**Last updated:** [March 8, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/error-message-help/88217 "2007-03-08T23:55:41Z")

</div>

My program is hitting an error and showing me: c:/ruby/lib/ruby/1.8/drb/drb.rb:743:in +': can't convert nil into String (TypeError) from c:/ruby/lib/ruby/1.8/drb/drb.rb:743:inopen’ from c:/ruby/lib/ruby/1.8/drb/drb.rb:…

---

## [Problems with alias\_method](https://www.ruby-forum.com/t/problems-with-alias-method/88189)

<div class="topic-metadata">

**Author:** [@pratik](https://www.ruby-forum.com/u/pratik)\
**Replies:** 1\
**Last updated:** [March 8, 2007, 11:24pm UTC](https://www.ruby-forum.com/t/problems-with-alias-method/88189 "2007-03-08T23:24:26Z")

</div>

Hi Guys, I’m trying to alias\_method in a bit different way. Here’s what I’m trying to do : http://pastie.caboo.se/45668 Any help would be great. Thanks for your time, Pratik

---

## [Looping through array, deleting elements](https://www.ruby-forum.com/t/looping-through-array-deleting-elements/88199)

<div class="topic-metadata">

**Author:** [@dkmd\_nielsen](https://www.ruby-forum.com/u/dkmd_nielsen)\
**Replies:** 5\
**Last updated:** [March 8, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/looping-through-array-deleting-elements/88199 "2007-03-08T22:45:18Z")

</div>

My idea of looping through an array, interrogating elements that are of class instruction, and deleting the element does not appear to work as I thought. I think I know why. What is the best solution? block.each {|i…

---

## [Net::HTTP.post\_form issue](https://www.ruby-forum.com/t/net-http-post-form-issue/88182)

<div class="topic-metadata">

**Author:** [@coosa](https://www.ruby-forum.com/u/coosa)\
**Replies:** 1\
**Last updated:** [March 8, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/net-http-post-form-issue/88182 "2007-03-08T22:06:10Z")

</div>

Dear all, I’m a newbie and have been looking for a solution regarding the following issue: I’m trying to get the results from the page http://daftarj.spr.gov.my/daftarbi.asp and looking at the source of the page I …

---

## [Rails 1.1 to 1.2 upgrade question - is it recommended to upg](https://www.ruby-forum.com/t/rails-1-1-to-1-2-upgrade-question-is-it-recommended-to-upg/88197)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [March 8, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/rails-1-1-to-1-2-upgrade-question-is-it-recommended-to-upg/88197 "2007-03-08T21:46:05Z")

</div>

Just a general question re upgrading an application to a new version of rails: Q1 - Is it recommended to upgrade the various rails files to the latest version (e.g. the scripts, configuration files etc) Q2 - If yes, …

---

## [HTTP problems on Windows?](https://www.ruby-forum.com/t/http-problems-on-windows/88192)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [March 8, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/http-problems-on-windows/88192 "2007-03-08T21:20:00Z")

</div>

Hi, I’m working with a colleague over in Unixland in our company. I’m down in Windowsland. He tells me that, using this same script below from Unix, he can transmit PNG files properly to our target. I can’t, though. …

---

## [Having problems fiddling with rake](https://www.ruby-forum.com/t/having-problems-fiddling-with-rake/88140)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 5\
**Last updated:** [March 8, 2007, 8:48pm UTC](https://www.ruby-forum.com/t/having-problems-fiddling-with-rake/88140 "2007-03-08T20:48:27Z")

</div>

I’m trying to get “rake doc:app” pull its input from a different Rails app’s source tree. In trying to prototype a solution, I’ve fiddled with documentation.rake. However, my hack isn’t working: rake aborted! stac…

---

## [Re: having problems fiddling with rake](https://www.ruby-forum.com/t/re-having-problems-fiddling-with-rake/88191)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 0\
**Last updated:** [March 8, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/re-having-problems-fiddling-with-rake/88191 "2007-03-08T20:42:56Z")

</div>

At 11:40 AM -0800 3/8/07, Rich M. wrote: Point taken, but it didn’t work even without the puts. So, my Ruby question remains… Actually, I just tried reworking the script to resolve the return value issue and the pr…

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

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