# Ruby

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

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

---

## [Something like Class.forName(''...").newInstance in Java?](https://www.ruby-forum.com/t/something-like-class-forname-newinstance-in-java/65295)

<div class="topic-metadata">

**Author:** [@femto\_femto](https://www.ruby-forum.com/u/femto_femto)\
**Replies:** 3\
**Last updated:** [August 17, 2006, 3:11pm UTC](https://www.ruby-forum.com/t/something-like-class-forname-newinstance-in-java/65295 "2006-08-17T15:11:17Z")

</div>

hello all, I’m looking for something like Class.forName(’’…").newInstance in Java?, I mean, where the className is passed in as a String, do ruby have similiar construct like that? Thank you very much.

---

## [Array Comparison](https://www.ruby-forum.com/t/array-comparison/65306)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 4\
**Last updated:** [August 17, 2006, 3:05pm UTC](https://www.ruby-forum.com/t/array-comparison/65306 "2006-08-17T15:05:17Z")

</div>

Hi Guys I have compared an array and ‘0’ is being returned which indicates to me that that array is equal p t = $ie.table(:index, ‘2’).to\_a.flatten p t \<=\> \[“HINCKLEY”, “HINDHEAD”, “HINTON ST GEORGE”\] Now would it b…

---

## [Ruby Compressor (little long)](https://www.ruby-forum.com/t/ruby-compressor-little-long/65268)

<div class="topic-metadata">

**Author:** [@patrickharlan](https://www.ruby-forum.com/u/patrickharlan)\
**Replies:** 4\
**Last updated:** [August 17, 2006, 2:05pm UTC](https://www.ruby-forum.com/t/ruby-compressor-little-long/65268 "2006-08-17T14:05:08Z")

</div>

I have need to distribute applications to customers. The customers have every right to the source code, but when it is installed we do not want the code to be easily visible. We are not worried about super hackers (or…

---

## [Einrichtung einer deutschsprachigen Ruby-Newsgroup (bitte le](https://www.ruby-forum.com/t/einrichtung-einer-deutschsprachigen-ruby-newsgroup-bitte-le/64517)

<div class="topic-metadata">

**Author:** [@chrisjo](https://www.ruby-forum.com/u/chrisjo)\
**Replies:** 11\
**Last updated:** [August 17, 2006, 1:38pm UTC](https://www.ruby-forum.com/t/einrichtung-einer-deutschsprachigen-ruby-newsgroup-bitte-le/64517 "2006-08-17T13:38:06Z")

</div>

Hi! First of all: My apologies! The rest of this article is in German. It’s about creating a german language newsgroup for Ruby. If you don’t speak German, just skip this thread, thank you! \*\*\*\* EINRICHTUNG EINER DE…

---

## [Ruby Weekly News 7th - 13th August 2006](https://www.ruby-forum.com/t/ruby-weekly-news-7th-13th-august-2006/65303)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 0\
**Last updated:** [August 17, 2006, 1:02pm UTC](https://www.ruby-forum.com/t/ruby-weekly-news-7th-13th-august-2006/65303 "2006-08-17T13:02:01Z")

</div>

http://www.rubyweeklynews.org/20060813.html Use the link above for a nicer version of this newsletter that’s formatted for the web, including links to threads and other sites. You can also subscribe to a newsletter-o…

---

## [Newbie - Test For JPEG Image Over HTTP](https://www.ruby-forum.com/t/newbie-test-for-jpeg-image-over-http/65284)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 2\
**Last updated:** [August 17, 2006, 12:38pm UTC](https://www.ruby-forum.com/t/newbie-test-for-jpeg-image-over-http/65284 "2006-08-17T12:38:42Z")

</div>

Hi I would like to test for the existence of a .jpg image on a remote server over HTTP. I have tried 2 different methods but they are not what I need. Method 1: require ‘open-uri’ if open(‘http://example.net/path/t…

---

## [Streamlined Framework](https://www.ruby-forum.com/t/streamlined-framework/65297)

<div class="topic-metadata">

**Author:** [@daniel](https://www.ruby-forum.com/u/daniel)\
**Replies:** 3\
**Last updated:** [August 17, 2006, 12:38pm UTC](https://www.ruby-forum.com/t/streamlined-framework/65297 "2006-08-17T12:38:01Z")

</div>

Hi, Im trying to install streamlined by “gem install streamlined” in wondows 2003. But when executing I get a error as follows. ERROR: While executing gem … (Gem::GemNotFoundException) Could not find streamlined (\> …

---

## [Browser whilst using Rails](https://www.ruby-forum.com/t/browser-whilst-using-rails/65281)

<div class="topic-metadata">

**Author:** [@dohmer](https://www.ruby-forum.com/u/dohmer)\
**Replies:** 4\
**Last updated:** [August 17, 2006, 11:01am UTC](https://www.ruby-forum.com/t/browser-whilst-using-rails/65281 "2006-08-17T11:01:54Z")

</div>

Hi I’m just starting to learn Rails, deploying it under SuSe Linux and Mac OS X. Silly question but without being contraversial what web browsers do people think its best to use to view the results. No need to compl…

---

## [\[QUIZ\] Pen and Paper (#90)](https://www.ruby-forum.com/t/quiz-pen-and-paper-90/65054)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 6\
**Last updated:** [August 17, 2006, 10:52am UTC](https://www.ruby-forum.com/t/quiz-pen-and-paper-90/65054 "2006-08-17T10:52:53Z")

</div>

This quiz reminds me about Knight Tour problem. So, I solve this quiz using brute-forcing combine with JC Warnsdorff (1823) rule. Move to the next case where has the minimum number of exits, if it fail then backtrackin…

---

## [Test For JPEG Image Over HTTP](https://www.ruby-forum.com/t/test-for-jpeg-image-over-http/65282)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 1\
**Last updated:** [August 17, 2006, 10:22am UTC](https://www.ruby-forum.com/t/test-for-jpeg-image-over-http/65282 "2006-08-17T10:22:51Z")

</div>

Hi I would like to test for the existence of a .jpg image on a remote server over HTTP. I have tried 2 different methods but they are not what I need. Method 1: require ‘open-uri’ if open(‘http://example.net/path/t…

---

## [Re: auto installing a gem](https://www.ruby-forum.com/t/re-auto-installing-a-gem/65283)

<div class="topic-metadata">

**Author:** [@CameronS\_Gemma\_SUK](https://www.ruby-forum.com/u/CameronS_Gemma_SUK)\
**Replies:** 0\
**Last updated:** [August 17, 2006, 10:22am UTC](https://www.ruby-forum.com/t/re-auto-installing-a-gem/65283 "2006-08-17T10:22:50Z")

</div>

rescue Gem::LoadError See this is why I like Ruby! It sounds like everyone’s talking about me! ( : Gem Regards Gemma Cameron This email and any attachments are confidential to the intended recipient and may als…

---

## [1.8.5$b$x$n:g=\*%3%\_%c%h(b](https://www.ruby-forum.com/t/1-8-5-b-x-n-g-3-c-h-b/64635)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 13\
**Last updated:** [August 17, 2006, 5:40am UTC](https://www.ruby-forum.com/t/1-8-5-b-x-n-g-3-c-h-b/64635 "2006-08-17T05:40:38Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B \[ruby-core:08577\]e$B$K$b=q$$$?$h$&$K0J2\<$N%Q%C%A$Oe(B1.8.5e$B$K\<h$j9~e(B e$B$s$G$b$h$$$N$G$O$J$$$+$H;W$$$^$9!#$,!"$^$"!";~4|$,;~4|$@$1$Ke(B e$BFHCG$G9TF0$9$k$N$O$d$a$h$&$H;W$$$^$9!#e(…

---

## [2 questions from a beginner](https://www.ruby-forum.com/t/2-questions-from-a-beginner/65189)

<div class="topic-metadata">

**Author:** [@diego\_v](https://www.ruby-forum.com/u/diego_v)\
**Replies:** 2\
**Last updated:** [August 17, 2006, 3:25am UTC](https://www.ruby-forum.com/t/2-questions-from-a-beginner/65189 "2006-08-17T03:25:24Z")

</div>

Hi, I am currently trying to find the solution to these two problems, but my first look at the documentation didn’t give any good answer, so here I go… :slight\_smile: 1-I would like my ruby program to call shell comm…

---

## [Fxri on OS X](https://www.ruby-forum.com/t/fxri-on-os-x/65259)

<div class="topic-metadata">

**Author:** [@lists](https://www.ruby-forum.com/u/lists)\
**Replies:** 0\
**Last updated:** [August 17, 2006, 2:13am UTC](https://www.ruby-forum.com/t/fxri-on-os-x/65259 "2006-08-17T02:13:21Z")

</div>

Anyone have any luck getting fxri to work on OS X? I’ve installed ruby, rubygems, fox 1.2.13, and fxscintilla with darwinports. Then I install fxruby 1.2.6 and fxri like this: sudo gem install fxruby --force – --wit…

---

## [Gems not working (Windows 184-20)](https://www.ruby-forum.com/t/gems-not-working-windows-184-20/65035)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 4\
**Last updated:** [August 17, 2006, 1:52am UTC](https://www.ruby-forum.com/t/gems-not-working-windows-184-20/65035 "2006-08-17T01:52:19Z")

</div>

I hate that I don’t understand why this is failing, and have to turn to the list for help. The problem is that rubygems can’t find files that it itself installed. In an attempt to fix things, I just deleted my entire …

---

## [Open-uri timeout](https://www.ruby-forum.com/t/open-uri-timeout/65238)

<div class="topic-metadata">

**Author:** [@Jeffrey](https://www.ruby-forum.com/u/Jeffrey)\
**Replies:** 2\
**Last updated:** [August 17, 2006, 12:31am UTC](https://www.ruby-forum.com/t/open-uri-timeout/65238 "2006-08-17T00:31:14Z")

</div>

I love open-uri, but does anyone know how to configure the time-out before open() will throw a Timeout::Error? I’d like to make it shorter. I’m trying to download some documents from a server that sometimes works fi…

---

## [How do I get the creation date of a file?](https://www.ruby-forum.com/t/how-do-i-get-the-creation-date-of-a-file/65071)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 12\
**Last updated:** [August 17, 2006, 12:10am UTC](https://www.ruby-forum.com/t/how-do-i-get-the-creation-date-of-a-file/65071 "2006-08-17T00:10:09Z")

</div>

Ruby’s file class has three methods for querying time related data: atime, ctime and mtime. None of these will give me the creation date of a file. Anyone got a clue? This is what the rubydoc says: atime Returns the …

---

## [Question about a multiple assignment statement used in Rails](https://www.ruby-forum.com/t/question-about-a-multiple-assignment-statement-used-in-rails/65145)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [August 17, 2006, 12:07am UTC](https://www.ruby-forum.com/t/question-about-a-multiple-assignment-statement-used-in-rails/65145 "2006-08-17T00:07:08Z")

</div>

As I’m very much still a ruby newbie, I’m hoping someone can help me to correctly parse the following statement generated by Rails scaffolding: @category\_pages, @categories = paginate :category, :per\_page =\> 10 This s…

---

## [Cgi.rb HTML construction tools - from within Webrick servlet](https://www.ruby-forum.com/t/cgi-rb-html-construction-tools-from-within-webrick-servlet/101727)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [August 16, 2006, 11:58pm UTC](https://www.ruby-forum.com/t/cgi-rb-html-construction-tools-from-within-webrick-servlet/101727 "2006-08-16T23:58:07Z")

</div>

Folks, I’m just playing with webrick and writing a servlet for the first time here. I’ve previously used Perl’s CGI.pm to write a lot of stuff, and used extensively its tools for generating HTML, especially forms - a…

---

## [Re: Ruby is exploding onto the scene as Java did at the end](https://www.ruby-forum.com/t/re-ruby-is-exploding-onto-the-scene-as-java-did-at-the-end/65209)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [August 16, 2006, 11:37pm UTC](https://www.ruby-forum.com/t/re-ruby-is-exploding-onto-the-scene-as-java-did-at-the-end/65209 "2006-08-16T23:37:05Z")

</div>

Java was never the answer to every software development problem, thank God. Yes. We all know it was Ada. :stuck\_out\_tongue: Dan This communication is the property of Qwest and may contain confidential or privil…

---

## [Reading in files, keeping \*ALL\* info from file](https://www.ruby-forum.com/t/reading-in-files-keeping-all-info-from-file/65076)

<div class="topic-metadata">

**Author:** [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Replies:** 3\
**Last updated:** [August 16, 2006, 10:52pm UTC](https://www.ruby-forum.com/t/reading-in-files-keeping-all-info-from-file/65076 "2006-08-16T22:52:01Z")

</div>

Hi, I am trying to read in a file and parse it. It uses hex values, such as 0x0000 to identify certain tags. When I read this into Ruby(IO.read), it simply gives me a blank string: “” However, I need to be able to …

---

## [Begin...rescue...retry next?](https://www.ruby-forum.com/t/begin-rescue-retry-next/65101)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 8\
**Last updated:** [August 16, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/begin-rescue-retry-next/65101 "2006-08-16T21:58:21Z")

</div>

Is there some way to do this in Ruby? begin do stuff, uh-oh an exception gets raised rescue retry next end There’s ‘retry’ which returns to the same statement that threw the exception, but I’d like execution to res…

---

## [A simple Hpricot text setter](https://www.ruby-forum.com/t/a-simple-hpricot-text-setter/102331)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 6\
**Last updated:** [August 16, 2006, 9:27pm UTC](https://www.ruby-forum.com/t/a-simple-hpricot-text-setter/102331 "2006-08-16T21:27:49Z")

</div>

If anyone is trying to use Hpricot to clean up the actual content of a site while leaving the markup alone, theymight find the following tiny method useful: class Hpricot::Text Adds a simple Hpricot method to change t…

---

## [Utahvalley.rb meeting Tue Aug 22 at 7PM](https://www.ruby-forum.com/t/utahvalley-rb-meeting-tue-aug-22-at-7pm/65213)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [August 16, 2006, 8:39pm UTC](https://www.ruby-forum.com/t/utahvalley-rb-meeting-tue-aug-22-at-7pm/65213 "2006-08-16T20:39:44Z")

</div>

utahvalley.rb monthly meeting Tuesday, Aug 22 at 7PM in room 120 of the TMCB that’s building 80 on the map at: http://map.byu.edu/Map.html I’ll be presenting my talk on Libraries for developers (consider it a dress…

---

## [Auto installing a gem](https://www.ruby-forum.com/t/auto-installing-a-gem/65210)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 16, 2006, 8:24pm UTC](https://www.ruby-forum.com/t/auto-installing-a-gem/65210 "2006-08-16T20:24:42Z")

</div>

I thought it would be clever to require a gem – and then if it wasn’t found – to install it automatically. I tried this for both a local gem file and for a remote install. I wasn’t able to get this to work in either c…

---

## [Block equality](https://www.ruby-forum.com/t/block-equality/65073)

<div class="topic-metadata">

**Author:** [@tomjerry](https://www.ruby-forum.com/u/tomjerry)\
**Replies:** 6\
**Last updated:** [August 16, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/block-equality/65073 "2006-08-16T19:57:39Z")

</div>

Is there a way to compare two blocks with each other? If you promote a block into a Proc, how would you know that the original block was the same? This is what I want to do (1…10).each do once { puts “Hi Tom”} end …

---

## [Some observations on Pen and Paper (#90) or to make it fast,](https://www.ruby-forum.com/t/some-observations-on-pen-and-paper-90-or-to-make-it-fast/65188)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 2\
**Last updated:** [August 16, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/some-observations-on-pen-and-paper-90-or-to-make-it-fast/65188 "2006-08-16T19:39:36Z")

</div>

Looking at the solutions posted so far, it seems: Those who have done best have recognized the relation between this problem and the well-known Knight’s Tour problem first posed by Leonhard Euler in 1758. Some, l…

---

## [Hash#each](https://www.ruby-forum.com/t/hash-each/64981)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 13\
**Last updated:** [August 16, 2006, 7:21pm UTC](https://www.ruby-forum.com/t/hash-each/64981 "2006-08-16T19:21:34Z")

</div>

The current implementation of Hash#each\[1\]: File lib/facets/core/hash/each.rb, line 19 def each(&yld) case yld.arity when 0 when 1 each\_value{|v| yield(v)} else each\_pair{|k,v| yld.call(k,v)} end self end To …

---

## [Website needs volunteer web guy](https://www.ruby-forum.com/t/website-needs-volunteer-web-guy/65183)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [August 16, 2006, 6:30pm UTC](https://www.ruby-forum.com/t/website-needs-volunteer-web-guy/65183 "2006-08-16T18:30:30Z")

</div>

I know of an organization that needs help with its website. I won’t mention it here, but I believe it to be a very good cause. Three catches: It’s not paid (at least not teh first 90 days or so). Actually, a colleg…

---

## [String equivalency](https://www.ruby-forum.com/t/string-equivalency/65146)

<div class="topic-metadata">

**Author:** [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Replies:** 4\
**Last updated:** [August 16, 2006, 6:12pm UTC](https://www.ruby-forum.com/t/string-equivalency/65146 "2006-08-16T18:12:26Z")

</div>

What’s the best way to check if a string is not exactly what you’re expecting? I’m doing this: b = ‘brad’ if not b.eql?(‘bradsdhsh’) puts ‘not equal’ else puts ‘equal’ end Is there a more proper way to do it?

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

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