# Ruby

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

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

---

## [Polite Strings](https://www.ruby-forum.com/t/polite-strings/100261)

<div class="topic-metadata">

**Author:** [@dpitman](https://www.ruby-forum.com/u/dpitman)\
**Replies:** 1\
**Last updated:** [July 28, 2006, 6:06am UTC](https://www.ruby-forum.com/t/polite-strings/100261 "2006-07-28T06:06:45Z")

</div>

Do you have ActiveRecord classes that contain strings? Do you sometimes put strings into those classes that are too wide for the database column? Is it really suboptimal when you get a SQL error when you .save the ob…

---

## [I try to use Exerb,but my exe failed to start](https://www.ruby-forum.com/t/i-try-to-use-exerb-but-my-exe-failed-to-start/100278)

<div class="topic-metadata">

**Author:** [@zdk](https://www.ruby-forum.com/u/zdk)\
**Replies:** 0\
**Last updated:** [July 28, 2006, 3:56am UTC](https://www.ruby-forum.com/t/i-try-to-use-exerb-but-my-exe-failed-to-start/100278 "2006-07-28T03:56:53Z")

</div>

DOS\>exerb watch1.rb and the output is watch1.exe DOS\>watch1.exe C:\\ruby\\samples\\FileSystemWatcher\>watch1.exe ./filesystemwatcher.rb:1:in \`require’: No such file to load – md5 (LoadError) from ./filesystemwatcher.rb…

---

## [Help with beginner code](https://www.ruby-forum.com/t/help-with-beginner-code/100258)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 28, 2006, 2:01am UTC](https://www.ruby-forum.com/t/help-with-beginner-code/100258 "2006-07-28T02:01:48Z")

</div>

Hello everyone. I’m trying to learn to program, and after some searching I’ve decided to learn while using Ruby. I’m using the Chris Pine guide for now, but I’ve gotten stuck on a simple program I’m messing with. Here…

---

## [Prevent class instantiation from the initialize method?](https://www.ruby-forum.com/t/prevent-class-instantiation-from-the-initialize-method/100221)

<div class="topic-metadata">

**Author:** [@wintermute](https://www.ruby-forum.com/u/wintermute)\
**Replies:** 6\
**Last updated:** [July 28, 2006, 1:11am UTC](https://www.ruby-forum.com/t/prevent-class-instantiation-from-the-initialize-method/100221 "2006-07-28T01:11:18Z")

</div>

Can some show me how to implement this java program using Ruby? I am simply trying to prevent the testclass from being instantiated in the constructor. I am then checking to see if the the class has instanatiated prop…

---

## [Newbie question: Working with iso-8859-1 files in Ruby](https://www.ruby-forum.com/t/newbie-question-working-with-iso-8859-1-files-in-ruby/100240)

<div class="topic-metadata">

**Author:** [@peterkemp](https://www.ruby-forum.com/u/peterkemp)\
**Replies:** 0\
**Last updated:** [July 27, 2006, 11:07pm UTC](https://www.ruby-forum.com/t/newbie-question-working-with-iso-8859-1-files-in-ruby/100240 "2006-07-27T23:07:50Z")

</div>

Hi! I am trying to load and parse text files with various encodings. Some are iso-8859-1, some are pure ASCII and others utf-8. None of them contain characters not available in iso-8859-1. What is a good strategy to …

---

## [How would I store data to a server?](https://www.ruby-forum.com/t/how-would-i-store-data-to-a-server/100213)

<div class="topic-metadata">

**Author:** [@rmac217](https://www.ruby-forum.com/u/rmac217)\
**Replies:** 4\
**Last updated:** [July 27, 2006, 9:35pm UTC](https://www.ruby-forum.com/t/how-would-i-store-data-to-a-server/100213 "2006-07-27T21:35:20Z")

</div>

What would be the best way to store data to a remote database like postgreSQL from any computer in the world, Is there a lib or binding to do this? Or would I have to use ruby on rails with ruby to get this effect?

---

## [Rand(-10..10)](https://www.ruby-forum.com/t/rand-10-10/100090)

<div class="topic-metadata">

**Author:** [@SchSSS\_le\_Daniel](https://www.ruby-forum.com/u/SchSSS_le_Daniel)\
**Replies:** 10\
**Last updated:** [July 27, 2006, 9:28pm UTC](https://www.ruby-forum.com/t/rand-10-10/100090 "2006-07-27T21:28:46Z")

</div>

Hi all, wouldn’t it make sense to allow rand -10…10 be aquivalent to -10 + rand(20) the first is by far more obvious. Of course rand -10…10 should work too. What do you think?

---

## [How to use rdoc parsers outside of rdoc?](https://www.ruby-forum.com/t/how-to-use-rdoc-parsers-outside-of-rdoc/100222)

<div class="topic-metadata">

**Author:** [@Paul\_Van\_Delst](https://www.ruby-forum.com/u/Paul_Van_Delst)\
**Replies:** 0\
**Last updated:** [July 27, 2006, 9:22pm UTC](https://www.ruby-forum.com/t/how-to-use-rdoc-parsers-outside-of-rdoc/100222 "2006-07-27T21:22:06Z")

</div>

Hello, I want to parse some source code using the parsers that come with rdoc. E.g. use parse\_f95.rb to read a Fortran95 source file and return all the various bits. The rdoc/parsers documentation isn’t very enlight…

---

## [Net::LDAP 0.0.3 released, adds TLS encryption](https://www.ruby-forum.com/t/net-ldap-0-0-3-released-adds-tls-encryption/100102)

<div class="topic-metadata">

**Author:** [@blackhedd](https://www.ruby-forum.com/u/blackhedd)\
**Replies:** 5\
**Last updated:** [July 27, 2006, 9:02pm UTC](https://www.ruby-forum.com/t/net-ldap-0-0-3-released-adds-tls-encryption/100102 "2006-07-27T21:02:44Z")

</div>

We’re pleased to announce version 0.0.3 of Net::LDAP, the first pure-Ruby LDAP library. Net::LDAP intends to be a feature-complete LDAP client which can access as much as possible of the functionality of the most-used…

---

## [Re: The Ruby/ERB way to do this?](https://www.ruby-forum.com/t/re-the-ruby-erb-way-to-do-this/100202)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 1\
**Last updated:** [July 27, 2006, 7:59pm UTC](https://www.ruby-forum.com/t/re-the-ruby-erb-way-to-do-this/100202 "2006-07-27T19:59:45Z")

</div>

Thanks for taking the time to reply. Using a variable of require is a good idea. Referencing variables as X::Size seems verbose. Is there any way for require to define a set of local scoped variables so the ERB temp…

---

## [getElementById on a SVG object](https://www.ruby-forum.com/t/getelementbyid-on-a-svg-object/100138)

<div class="topic-metadata">

**Author:** [@guillaume](https://www.ruby-forum.com/u/guillaume)\
**Replies:** 2\
**Last updated:** [July 27, 2006, 7:05pm UTC](https://www.ruby-forum.com/t/getelementbyid-on-a-svg-object/100138 "2006-07-27T19:05:20Z")

</div>

Hi all, I would like to know if it is possible to retreive a SVG object (in fact an image in a vector format that needs aa Adobe plugin to be displayed) by writing something like mySVGObject = ie.document.getElementBy…

---

## [Embedded socket error](https://www.ruby-forum.com/t/embedded-socket-error/100051)

<div class="topic-metadata">

**Author:** [@laserwhit](https://www.ruby-forum.com/u/laserwhit)\
**Replies:** 3\
**Last updated:** [July 27, 2006, 6:49pm UTC](https://www.ruby-forum.com/t/embedded-socket-error/100051 "2006-07-27T18:49:01Z")

</div>

I am running the following code in a C++ app: int \_tmain(int argc, \_TCHAR\* argv\[\]) { NtInitialize(&argc, &argv); ruby\_init(); ruby\_init\_loadpath(); ruby\_script(“embedded”); rb\_load\_file( “embr.rb” ); ruby\_run(); …

---

## [OO Paradigm and Ruby Exercises for a Beginner](https://www.ruby-forum.com/t/oo-paradigm-and-ruby-exercises-for-a-beginner/100053)

<div class="topic-metadata">

**Author:** [@Picklegnome](https://www.ruby-forum.com/u/Picklegnome)\
**Replies:** 15\
**Last updated:** [July 27, 2006, 6:41pm UTC](https://www.ruby-forum.com/t/oo-paradigm-and-ruby-exercises-for-a-beginner/100053 "2006-07-27T18:41:27Z")

</div>

I am at a loss for where to begin here, so I’ll jump in. I have worked with several languages, and Ruby is the first one I've really felt good about. I picked up the Pickaxe book and read through it. While I get conf…

---

## [The Ruby/ERB way to do this?](https://www.ruby-forum.com/t/the-ruby-erb-way-to-do-this/100182)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 1\
**Last updated:** [July 27, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/the-ruby-erb-way-to-do-this/100182 "2006-07-27T18:31:31Z")

</div>

Hello, I was wondering if someone could point me to a smarter way of doing the following? It’s probably a Ruby basics question. I am using ERB to generate sets of configuration files for different environments. I ima…

---

## [How to get an IO object for the response from an HTTP get?](https://www.ruby-forum.com/t/how-to-get-an-io-object-for-the-response-from-an-http-get/100074)

<div class="topic-metadata">

**Author:** [@tim\_o](https://www.ruby-forum.com/u/tim_o)\
**Replies:** 3\
**Last updated:** [July 27, 2006, 6:14pm UTC](https://www.ruby-forum.com/t/how-to-get-an-io-object-for-the-response-from-an-http-get/100074 "2006-07-27T18:14:34Z")

</div>

Hi, I’d like to get an IO object instead of a string for the response of an HTTP get. I am using the Net/HTTP library but it seems to only want to give me a string. I have a situation where the response can be quit…

---

## [Re: Named backreferences with Oniguruma](https://www.ruby-forum.com/t/re-named-backreferences-with-oniguruma/100178)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [July 27, 2006, 4:54pm UTC](https://www.ruby-forum.com/t/re-named-backreferences-with-oniguruma/100178 "2006-07-27T16:54:10Z")

</div>

Daniel B. wrote in \[ruby-talk:204267\]: I’m trying to figure out how to get at named backreferences with Oniguruma, but I’m having some problems figuring it out. Here’s the interface I would like to have: MatchD…

---

## [Ruby in a C# program](https://www.ruby-forum.com/t/ruby-in-a-c-program/99931)

<div class="topic-metadata">

**Author:** [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Replies:** 1\
**Last updated:** [July 27, 2006, 3:46pm UTC](https://www.ruby-forum.com/t/ruby-in-a-c-program/99931 "2006-07-27T15:46:34Z")

</div>

Hi! Is there a way to embed a Ruby interpreter into a C# program? I can call Ruby from C# fine, and then parse the console output, but I’m wondering if there’s not a better way. I have tried the Ruby .NET compiler he…

---

## [Named backreferences with Oniguruma](https://www.ruby-forum.com/t/named-backreferences-with-oniguruma/100172)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 4\
**Last updated:** [July 27, 2006, 3:37pm UTC](https://www.ruby-forum.com/t/named-backreferences-with-oniguruma/100172 "2006-07-27T15:37:09Z")

</div>

Hi all, Ruby 1.8.4 Oniguruma 2.5.6 I’m trying to figure out how to get at named backreferences with Oniguruma, but I’m having some problems figuring it out. Here’s the interface I would like to have: pseudo.rb str…

---

## [Positive lookahead in multiline strings (was gsub)](https://www.ruby-forum.com/t/positive-lookahead-in-multiline-strings-was-gsub/100134)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 2\
**Last updated:** [July 27, 2006, 1:31pm UTC](https://www.ruby-forum.com/t/positive-lookahead-in-multiline-strings-was-gsub/100134 "2006-07-27T13:31:54Z")

</div>

I was just rolling my own little thread about gsub ;\] and trying to fix my stupid regexen when I came up with the perfect solution to replace the last occurence of a pattern (if it is simple, thus not of any interest…

---

## [Proving Ruby's effectiveness](https://www.ruby-forum.com/t/proving-rubys-effectiveness/99757)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [July 27, 2006, 11:18am UTC](https://www.ruby-forum.com/t/proving-rubys-effectiveness/99757 "2006-07-27T11:18:44Z")

</div>

Our company (2500 employees) has a development conference in a few months. I want to present a talk about the effectiveness of Ruby. I’ve been asked (at late notice, grrrr) to give concrete evendence about it’s applic…

---

## [||= in an expression](https://www.ruby-forum.com/t/in-an-expression/100127)

<div class="topic-metadata">

**Author:** [@rejoc](https://www.ruby-forum.com/u/rejoc)\
**Replies:** 5\
**Last updated:** [July 27, 2006, 10:46am UTC](https://www.ruby-forum.com/t/in-an-expression/100127 "2006-07-27T10:46:50Z")

</div>

Hello, I new to Ruby and curious about this language I do use (yeet). I was browsing through some libraries/modules and I found a line looking like a\[:i\] ||= “a string” I could not find this syntax in any manual onl…

---

## [Re: Generate a tone using ruby?](https://www.ruby-forum.com/t/re-generate-a-tone-using-ruby/100131)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [July 27, 2006, 10:22am UTC](https://www.ruby-forum.com/t/re-generate-a-tone-using-ruby/100131 "2006-07-27T10:22:29Z")

</div>

Maybe snd (\_http://ccrma.stanford.edu/software/snd/snd/snd.html\_ (Snd) ) can be of help to you. You can access it using Ruby. Best regards, Axel

---

## [Finding files in a directory and regexp](https://www.ruby-forum.com/t/finding-files-in-a-directory-and-regexp/99742)

<div class="topic-metadata">

**Author:** [@alexanderl](https://www.ruby-forum.com/u/alexanderl)\
**Replies:** 2\
**Last updated:** [July 27, 2006, 7:51am UTC](https://www.ruby-forum.com/t/finding-files-in-a-directory-and-regexp/99742 "2006-07-27T07:51:35Z")

</div>

Hello, I am doing something like this: Find.find("/Users/alamb/\_Current-Work/fiches") do |path| if(path =~ /100\_/) ... In order to get all the files of the directory which have “100\_” in the name. Two questions: …

---

## [Issue extending a delegated class](https://www.ruby-forum.com/t/issue-extending-a-delegated-class/100088)

<div class="topic-metadata">

**Author:** [@rak\_rok](https://www.ruby-forum.com/u/rak_rok)\
**Replies:** 4\
**Last updated:** [July 27, 2006, 6:46am UTC](https://www.ruby-forum.com/t/issue-extending-a-delegated-class/100088 "2006-07-27T06:46:20Z")

</div>

Hi, I have a simple class that I’m extending via delegation: class A def one ; puts “A::one” ; two ; end def two ; puts “A::two” ; end end class B \< SimpleDelegator def initialize a = A.new # do some stuff…

---

## [Bit-struct and constructing ARP messages](https://www.ruby-forum.com/t/bit-struct-and-constructing-arp-messages/99714)

<div class="topic-metadata">

**Author:** [@inspire22](https://www.ruby-forum.com/u/inspire22)\
**Replies:** 3\
**Last updated:** [July 27, 2006, 4:11am UTC](https://www.ruby-forum.com/t/bit-struct-and-constructing-arp-messages/99714 "2006-07-27T04:11:03Z")

</div>

Hello all. I have been trying to write a ARP packet injector script for Ruby and did quite a bit of research on how to construct ARP Reply datagrams and what not, and now that I think I have an idea how to construct t…

---

## [Mongrel Patch - Fixes 404 Error in IE](https://www.ruby-forum.com/t/mongrel-patch-fixes-404-error-in-ie/99937)

<div class="topic-metadata">

**Author:** [@bct](https://www.ruby-forum.com/u/bct)\
**Replies:** 2\
**Last updated:** [July 27, 2006, 4:07am UTC](https://www.ruby-forum.com/t/mongrel-patch-fixes-404-error-in-ie/99937 "2006-07-27T04:07:54Z")

</div>

Hello, Using Mongrel has been great. Thank you Zed for developing such a fine piece of software. For some reason, when using IE to access a Rails app running on a Mongrel server, I get a 404 error. This is an inter…

---

## [Re: Embedded Ruby and OpenGL](https://www.ruby-forum.com/t/re-embedded-ruby-and-opengl/100075)

<div class="topic-metadata">

**Author:** [@Frank\_Davis](https://www.ruby-forum.com/u/Frank_Davis)\
**Replies:** 2\
**Last updated:** [July 27, 2006, 3:12am UTC](https://www.ruby-forum.com/t/re-embedded-ruby-and-opengl/100075 "2006-07-27T03:12:38Z")

</div>

There’s only one way I can see this working: Develop a plugin for Firefox, using C / C++, that would operate very similar to the way the Flash plugin works. Your plugin would have a Ruby interpreter embedded in it, an…

---

## [eRuby: A tutorial on using Ruby on the web](https://www.ruby-forum.com/t/eruby-a-tutorial-on-using-ruby-on-the-web/99995)

<div class="topic-metadata">

**Author:** [@tesla](https://www.ruby-forum.com/u/tesla)\
**Replies:** 11\
**Last updated:** [July 27, 2006, 3:12am UTC](https://www.ruby-forum.com/t/eruby-a-tutorial-on-using-ruby-on-the-web/99995 "2006-07-27T03:12:28Z")

</div>

A group (three) of us wanted to learn Ruby but we decided that Rails was no the way to do it. We could not find anything on getting started with using web oriented Ruby we took a bit of time to do a tutorial. It cove…

---

## [Apache using older ruby](https://www.ruby-forum.com/t/apache-using-older-ruby/99828)

<div class="topic-metadata">

**Author:** [@maxbohr](https://www.ruby-forum.com/u/maxbohr)\
**Replies:** 3\
**Last updated:** [July 27, 2006, 3:03am UTC](https://www.ruby-forum.com/t/apache-using-older-ruby/99828 "2006-07-27T03:03:06Z")

</div>

Hello List, I’m running into some problems serving rhtml files on OSX Tiger. I’m a bit of a noob so I apologize if the answer to my question is an obvious one. I have both 1.8.2 and 1.8.4 installed on my computer. …

---

## [Ruby TUI](https://www.ruby-forum.com/t/ruby-tui/100011)

<div class="topic-metadata">

**Author:** [@diragor](https://www.ruby-forum.com/u/diragor)\
**Replies:** 2\
**Last updated:** [July 27, 2006, 2:53am UTC](https://www.ruby-forum.com/t/ruby-tui/100011 "2006-07-27T02:53:58Z")

</div>

I’m creating a program with a TUI to then later implement a GUI using TK but for now I’m having trouble coming up with a menu system that works without a whole lot of loops and calls, which is what I have now but its …

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

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