# Ruby

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

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

---

## [Struct with defaults?](https://www.ruby-forum.com/t/struct-with-defaults/76212)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 4\
**Last updated:** [November 17, 2006, 7:59pm UTC](https://www.ruby-forum.com/t/struct-with-defaults/76212 "2006-11-17T19:59:13Z")

</div>

is there an easy, elegant way to set up a Struct so it has defaults on initialization? (besides def initialize?)

---

## [\[Helppp xD\] Newbie issue](https://www.ruby-forum.com/t/helppp-xd-newbie-issue/76308)

<div class="topic-metadata">

**Author:** [@flaab](https://www.ruby-forum.com/u/flaab)\
**Replies:** 5\
**Last updated:** [November 17, 2006, 7:31pm UTC](https://www.ruby-forum.com/t/helppp-xd-newbie-issue/76308 "2006-11-17T19:31:06Z")

</div>

Hi all!! I’ve declared a method inside the string class that has to answer the amount of “X” and “2” chars in a string. The string is ALWAYS gonna be 15 chars size. The code is the following: class String # DAME…

---

## [Installation of GTK and GLADE for Windows](https://www.ruby-forum.com/t/installation-of-gtk-and-glade-for-windows/76340)

<div class="topic-metadata">

**Author:** [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Replies:** 2\
**Last updated:** [November 17, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/installation-of-gtk-and-glade-for-windows/76340 "2006-11-17T19:04:58Z")

</div>

After going thru the steps outline here, http://ruby-gnome2.sourceforge.jp/hiki.cgi?Install+Guide+for+Windows, I’m getting the following error messages when I test the installation as indicated in step #4. I checked a…

---

## [Referncing values of local variables](https://www.ruby-forum.com/t/referncing-values-of-local-variables/76339)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 3\
**Last updated:** [November 17, 2006, 6:25pm UTC](https://www.ruby-forum.com/t/referncing-values-of-local-variables/76339 "2006-11-17T18:25:01Z")

</div>

I apologize in advance, because I know this gets asked again and again (and again…) by newbies, but my searches don’t show a clear answer, and none of my attempts work. This should be simple. I want to define a const…

---

## [Irb on Ruby.NET](https://www.ruby-forum.com/t/irb-on-ruby-net/76336)

<div class="topic-metadata">

**Author:** [@Andrea\_Guerra](https://www.ruby-forum.com/u/Andrea_Guerra)\
**Replies:** 0\
**Last updated:** [November 17, 2006, 5:42pm UTC](https://www.ruby-forum.com/t/irb-on-ruby-net/76336 "2006-11-17T17:42:41Z")

</div>

Has someone tried to run irb on Ruby.NET? I tried but I just got this error message: PS D:\\Projects\\Ruby.NET\\Bin\> .\\RubyCompiler -I C:\\Programmi\\Ruby\\lib\\ruby\\1.8 C:\\Programmi\\Ruby\\lib\\ruby\\1.8\\launch.rb Error: Rub…

---

## [Nuby question - printing substring as non-ASCII](https://www.ruby-forum.com/t/nuby-question-printing-substring-as-non-ascii/76314)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 8\
**Last updated:** [November 17, 2006, 5:16pm UTC](https://www.ruby-forum.com/t/nuby-question-printing-substring-as-non-ascii/76314 "2006-11-17T17:16:38Z")

</div>

I’m reading in a string of numbers, as follows: " 1 45.3456 " How do I write out the first non-whitespace element as a number? Ruby wants to express as it in ASCII, and the .to\_i method doesn’t seem to work o…

---

## [Re: Protecting commercial ruby source code](https://www.ruby-forum.com/t/re-protecting-commercial-ruby-source-code/76313)

<div class="topic-metadata">

**Author:** [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Replies:** 2\
**Last updated:** [November 17, 2006, 5:10pm UTC](https://www.ruby-forum.com/t/re-protecting-commercial-ruby-source-code/76313 "2006-11-17T17:10:37Z")

</div>

Hiren B. wrote: Is there a way to obfuscate my ruby source code. I have come across ZenObfuscate which at \> about $2500. Does anyone know of any other options to protect ruby source code when it is \> distributed t…

---

## [Mac OS X SSL Certificates Path](https://www.ruby-forum.com/t/mac-os-x-ssl-certificates-path/75408)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 2\
**Last updated:** [November 17, 2006, 5:00pm UTC](https://www.ruby-forum.com/t/mac-os-x-ssl-certificates-path/75408 "2006-11-17T17:00:35Z")

</div>

Does anyone know the directory or file I could feed to OpenSSL via ca\_path or ca\_file for Mac OS X’s SSL certificates? I’m doing a get over HTTPS, need to verify, and can’t seem to locate the certificates. Thanks. J…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/76316)

<div class="topic-metadata">

**Author:** [@rjsquire](https://www.ruby-forum.com/u/rjsquire)\
**Replies:** 0\
**Last updated:** [November 17, 2006, 4:30pm UTC](https://www.ruby-forum.com/t/unsubscribe/76316 "2006-11-17T16:30:28Z")

</div>

– Robert S. Codecentric GmbH

---

## [Various errors installing gem documentation](https://www.ruby-forum.com/t/various-errors-installing-gem-documentation/76317)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [November 17, 2006, 4:26pm UTC](https://www.ruby-forum.com/t/various-errors-installing-gem-documentation/76317 "2006-11-17T16:26:27Z")

</div>

It’s usually some method called on a very large negative Fixnum. Note below how different install runs produce different errors. (Who said that computers were deterministic?) \[sliver:~/Desktop\] gkistner$ sudo gem inst…

---

## [Accessing rails render method outside of view / Decorating r](https://www.ruby-forum.com/t/accessing-rails-render-method-outside-of-view-decorating-r/76312)

<div class="topic-metadata">

**Author:** [@glenngore](https://www.ruby-forum.com/u/glenngore)\
**Replies:** 0\
**Last updated:** [November 17, 2006, 3:32pm UTC](https://www.ruby-forum.com/t/accessing-rails-render-method-outside-of-view-decorating-r/76312 "2006-11-17T15:32:16Z")

</div>

I’m developing a plugin for rails that ultimately needs to assign some HTML to a javascript variable. In the interest of DRY, I want to be able to basically specify a partial and pass in a collection and then render t…

---

## [Getting off this list](https://www.ruby-forum.com/t/getting-off-this-list/76310)

<div class="topic-metadata">

**Author:** [@Lee\_Benson](https://www.ruby-forum.com/u/Lee_Benson)\
**Replies:** 1\
**Last updated:** [November 17, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/getting-off-this-list/76310 "2006-11-17T15:26:14Z")

</div>

Can someone please tell me how to get off this list? I’ve tried sending e-mail to removed\_email\_address@domain.invalid with “unsubscribe” in the body as well as messages with “# unsubscribe” in there too. Every time …

---

## [Accessing base method](https://www.ruby-forum.com/t/accessing-base-method/76202)

<div class="topic-metadata">

**Author:** [@soso](https://www.ruby-forum.com/u/soso)\
**Replies:** 12\
**Last updated:** [November 17, 2006, 3:12pm UTC](https://www.ruby-forum.com/t/accessing-base-method/76202 "2006-11-17T15:12:11Z")

</div>

Hi all, I’m new to ruby, being trying to access base class method but with no luck until now. Here’s a snippet to get an idea: class Parent def knox puts ‘parent’ end end class Child \< Parent def knox puts ‘chi…

---

## [Changing permission on a file](https://www.ruby-forum.com/t/changing-permission-on-a-file/76261)

<div class="topic-metadata">

**Author:** [@apparna](https://www.ruby-forum.com/u/apparna)\
**Replies:** 5\
**Last updated:** [November 17, 2006, 2:46pm UTC](https://www.ruby-forum.com/t/changing-permission-on-a-file/76261 "2006-11-17T14:46:07Z")

</div>

I’m trying to change permission on a file on a windows machine. This should work according to the documentation (may be i’m missing something here). But it doesn’t here is the code: take away read permission new\_perm…

---

## [RubySSPI - Enabling NTLM proxy authentication on Windows](https://www.ruby-forum.com/t/rubysspi-enabling-ntlm-proxy-authentication-on-windows/74674)

<div class="topic-metadata">

**Author:** [@vtphysguy](https://www.ruby-forum.com/u/vtphysguy)\
**Replies:** 5\
**Last updated:** [November 17, 2006, 2:06pm UTC](https://www.ruby-forum.com/t/rubysspi-enabling-ntlm-proxy-authentication-on-windows/74674 "2006-11-17T14:06:02Z")

</div>

All, I’m pleased to announce the release of the RubySSPI library. So named because it allows interaction with Microsoft’s Security Support Provider Interface (SSPI) API, this library enables Ruby scripts using Net::H…

---

## [Newbie question about attr\_reader](https://www.ruby-forum.com/t/newbie-question-about-attr-reader/76160)

<div class="topic-metadata">

**Author:** [@ravi\_rao](https://www.ruby-forum.com/u/ravi_rao)\
**Replies:** 5\
**Last updated:** [November 17, 2006, 12:09pm UTC](https://www.ruby-forum.com/t/newbie-question-about-attr-reader/76160 "2006-11-17T12:09:41Z")

</div>

Hi, Why cant i have an attribute reader for a class variable. Here’s a program. class SomeClass @@var1 = 9 #class var def someMethod @@var1 = 1 end def initialize @var2 = 5 end def getVar1 return @@var1 end …

---

## [Case vs using if question](https://www.ruby-forum.com/t/case-vs-using-if-question/76287)

<div class="topic-metadata">

**Author:** [@sclaerhout](https://www.ruby-forum.com/u/sclaerhout)\
**Replies:** 9\
**Last updated:** [November 17, 2006, 10:25am UTC](https://www.ruby-forum.com/t/case-vs-using-if-question/76287 "2006-11-17T10:25:32Z")

</div>

Hello all, Nuby question? I need to parse the syntax on files based on a two charcter code such as PC which would return a value like this PC = Postcard I have many many codes and Im very new to Ruby and not sure w…

---

## [Encoding in windows (newby question)](https://www.ruby-forum.com/t/encoding-in-windows-newby-question/76251)

<div class="topic-metadata">

**Author:** [@Alfonso](https://www.ruby-forum.com/u/Alfonso)\
**Replies:** 7\
**Last updated:** [November 17, 2006, 9:49am UTC](https://www.ruby-forum.com/t/encoding-in-windows-newby-question/76251 "2006-11-17T09:49:30Z")

</div>

When I write my scripts in Linux, there is no problem with the special characters, but on windows, the special characters of my language are not properly set (spanish). Example puts “español”. I suppose for some reaso…

---

## [Popen, open3 problems](https://www.ruby-forum.com/t/popen-open3-problems/76256)

<div class="topic-metadata">

**Author:** [@splattael](https://www.ruby-forum.com/u/splattael)\
**Replies:** 4\
**Last updated:** [November 17, 2006, 9:05am UTC](https://www.ruby-forum.com/t/popen-open3-problems/76256 "2006-11-17T09:05:21Z")

</div>

Hi, I think this problem is surely solved but hven’t found anything on the net: I get two programs: a ruby (master) a perl (slave) I want the master to set commands to the slave and wait for the answer (repeatedly…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/76277)

<div class="topic-metadata">

**Author:** [@arum\_kone](https://www.ruby-forum.com/u/arum_kone)\
**Replies:** 1\
**Last updated:** [November 17, 2006, 8:43am UTC](https://www.ruby-forum.com/t/no-subject/76277 "2006-11-17T08:43:20Z")

</div>

help ----- Original Message ---- From: “removed\_email\_address@domain.invalid” removed\_email\_address@domain.invalid To: removed\_email\_address@domain.invalid Sent: Thursday, November 9, 2006 11:13:25 AM Subject: Welco…

---

## [Uninstall - arum kone](https://www.ruby-forum.com/t/uninstall-arum-kone/76276)

<div class="topic-metadata">

**Author:** [@arum\_kone](https://www.ruby-forum.com/u/arum_kone)\
**Replies:** 0\
**Last updated:** [November 17, 2006, 7:45am UTC](https://www.ruby-forum.com/t/uninstall-arum-kone/76276 "2006-11-17T07:45:13Z")

</div>

uninstall - arum kone ----- Original Message ---- From: Ilmari H. removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@domain.invalid Sent: Thursday, November 16, 2006 9:16:49 PM Subject: Re: …

---

## [Nebular Gauntlet 0.4](https://www.ruby-forum.com/t/nebular-gauntlet-0-4/76273)

<div class="topic-metadata">

**Author:** [@S-redyck](https://www.ruby-forum.com/u/S-redyck)\
**Replies:** 2\
**Last updated:** [November 17, 2006, 5:17am UTC](https://www.ruby-forum.com/t/nebular-gauntlet-0-4/76273 "2006-11-17T05:17:04Z")

</div>

Finally, a new release for Nebular Gauntlet. After 2 months this release includes a map editor rewrite using Fox 1.6 for cross-platform compatibility (One-Click Installer includes Fox by default). However, there hasn’…

---

## [Open source project needs help](https://www.ruby-forum.com/t/open-source-project-needs-help/76206)

<div class="topic-metadata">

**Author:** [@akoSS](https://www.ruby-forum.com/u/akoSS)\
**Replies:** 3\
**Last updated:** [November 17, 2006, 4:51am UTC](https://www.ruby-forum.com/t/open-source-project-needs-help/76206 "2006-11-17T04:51:02Z")

</div>

hello, i hope this is not off topic here… i have started a CMS in ruby a couple of years ago, and i have all the basic functionality working. i have no much time and i do not want to see it die because it seems promi…

---

## [Another IO.popen question](https://www.ruby-forum.com/t/another-io-popen-question/76246)

<div class="topic-metadata">

**Author:** [@addywaddy](https://www.ruby-forum.com/u/addywaddy)\
**Replies:** 12\
**Last updated:** [November 17, 2006, 4:14am UTC](https://www.ruby-forum.com/t/another-io-popen-question/76246 "2006-11-17T04:14:59Z")

</div>

Hi, I’m wanting to create thumbnails of pdfs in png format and send them off to be saved. I’ve come up with this so far: IO.popen("curl #{some\_uri} | convert -resize 700x700 pdf:-\[0\] png:-") {|f| do\_something\_with\_t…

---

## [\*Fast\* way to process large files line by line](https://www.ruby-forum.com/t/fast-way-to-process-large-files-line-by-line/76096)

<div class="topic-metadata">

**Author:** [@dagrawal](https://www.ruby-forum.com/u/dagrawal)\
**Replies:** 19\
**Last updated:** [November 17, 2006, 4:06am UTC](https://www.ruby-forum.com/t/fast-way-to-process-large-files-line-by-line/76096 "2006-11-17T04:06:57Z")

</div>

Hi Folks, I am using ruby to analyse a huge (around 60G) amount of my networking experiment data. Let me briefly describe my technique: I have to read around 40 files (of around 1.5G each) named f1,f2 … .Each file fi …

---

## [MSN protocol lib for Ruby?](https://www.ruby-forum.com/t/msn-protocol-lib-for-ruby/75916)

<div class="topic-metadata">

**Author:** [@jug](https://www.ruby-forum.com/u/jug)\
**Replies:** 1\
**Last updated:** [November 17, 2006, 3:20am UTC](https://www.ruby-forum.com/t/msn-protocol-lib-for-ruby/75916 "2006-11-17T03:20:51Z")

</div>

Hello everybody, I am building a community site in RoR and I’d like to give my users the possibility to import their MSN contact list to invite friends to my site (I mean, directly by entering their credentials on the…

---

## [Finding which OS?](https://www.ruby-forum.com/t/finding-which-os/76150)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 9\
**Last updated:** [November 17, 2006, 12:24am UTC](https://www.ruby-forum.com/t/finding-which-os/76150 "2006-11-17T00:24:27Z")

</div>

hi - is there a way to find which OS Ruby is running on? also, searching for ruby clues, i usually resort to google, wondering how other people find stuff? /dc David "DC" Collier mailto:removed\_email\_address@dom…

---

## [Ruby newbie & XML - What's the simplest way to get XML data](https://www.ruby-forum.com/t/ruby-newbie-xml-whats-the-simplest-way-to-get-xml-data/76248)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [November 17, 2006, 12:20am UTC](https://www.ruby-forum.com/t/ruby-newbie-xml-whats-the-simplest-way-to-get-xml-data/76248 "2006-11-17T00:20:25Z")

</div>

Sorry for having such a specific question, but is there a simple way to take the XML document below and put it into some sort of organized hash value without first knowing anything about it? This is an easy job using …

---

## [Two way communication with the command shell (IO.popen?)](https://www.ruby-forum.com/t/two-way-communication-with-the-command-shell-io-popen/75179)

<div class="topic-metadata">

**Author:** [@jspencer78](https://www.ruby-forum.com/u/jspencer78)\
**Replies:** 18\
**Last updated:** [November 16, 2006, 11:44pm UTC](https://www.ruby-forum.com/t/two-way-communication-with-the-command-shell-io-popen/75179 "2006-11-16T23:44:15Z")

</div>

Hi, I would basically like to be able to run a ruby program from my rails application and be able to read from it and write to it accordingly. OK, i am currently using: IO.popen(“ruby ruby\_program.rb”, “r+”) do |f| @…

---

## [Re: Beginner Needs Help](https://www.ruby-forum.com/t/re-beginner-needs-help/76250)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 11:24pm UTC](https://www.ruby-forum.com/t/re-beginner-needs-help/76250 "2006-11-16T23:24:08Z")

</div>

super irb(main):024:0\> hands = Array.new(4) {|idx| Array.new(4)} =\> \[\[nil, nil, nil, nil\], \[nil, nil, nil, nil\], \[nil, nil, nil, nil\], \[nil, nil, nil, nil\]\] Regards, Bill Ah, thanks Bill and others who might …

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

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