# Ruby

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

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

---

## [Ruby error - cannot find ruby gem active record](https://www.ruby-forum.com/t/ruby-error-cannot-find-ruby-gem-active-record/110360)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 7\
**Last updated:** [July 26, 2007, 8:56am UTC](https://www.ruby-forum.com/t/ruby-error-cannot-find-ruby-gem-active-record/110360 "2007-07-26T08:56:05Z")

</div>

I get the following error message C:/InstantRails/ruby/lib/ruby/site\_ruby/1.8/rubygems.rb:251:in report\_activate\_error': Could not find RubyGem activerecord (\>= 0.0.0) (Gem::LoadError) from C:/InstantRails/ruby/lib/rub…

---

## [Page reader](https://www.ruby-forum.com/t/page-reader/110422)

<div class="topic-metadata">

**Author:** [@ti-mara](https://www.ruby-forum.com/u/ti-mara)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 8:21am UTC](https://www.ruby-forum.com/t/page-reader/110422 "2007-07-26T08:21:59Z")

</div>

I was wondering if theres anything out there that can take web page full of text and search it for particular phrases I give it… say for example I have A web page or several linked webpages… I could say find “how to …

---

## [Calling a Perl script from Ruby](https://www.ruby-forum.com/t/calling-a-perl-script-from-ruby/109442)

<div class="topic-metadata">

**Author:** [@mtnbiker](https://www.ruby-forum.com/u/mtnbiker)\
**Replies:** 16\
**Last updated:** [July 26, 2007, 6:24am UTC](https://www.ruby-forum.com/t/calling-a-perl-script-from-ruby/109442 "2007-07-26T06:24:50Z")

</div>

I’d like to use gpsPhoto.pl in a Ruby script. http://www.carto.net/projects/photoTools/gpsPhoto/ Assuming I have the script on my computer. Syntax from command line is: perl gpsPhoto.pl --dir photos/ --gpsfile GPS…

---

## [Initialization after YAML load?](https://www.ruby-forum.com/t/initialization-after-yaml-load/110368)

<div class="topic-metadata">

**Author:** [@lfast](https://www.ruby-forum.com/u/lfast)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 5:51am UTC](https://www.ruby-forum.com/t/initialization-after-yaml-load/110368 "2007-07-26T05:51:53Z")

</div>

I’m saving and restoring a large tree structure using YAML. What I’ve read is that the Initialize method is not called after loading. Is there something like a post-load method within YAML that I can override and is a…

---

## [IO.getc (Based off of #45 MUD)](https://www.ruby-forum.com/t/io-getc-based-off-of-45-mud/110388)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 5:27am UTC](https://www.ruby-forum.com/t/io-getc-based-off-of-45-mud/110388 "2007-07-26T05:27:47Z")

</div>

I have some questions about sockets, IO.getc(), and IO.ready?(). So my telnet server accepts connections. That works. It displays the prompt. That works. It accepts the s…

---

## [Efficiency/runtime trouble - may not be Ruby-specific](https://www.ruby-forum.com/t/efficiency-runtime-trouble-may-not-be-ruby-specific/110353)

<div class="topic-metadata">

**Author:** [@Kaldrenon](https://www.ruby-forum.com/u/Kaldrenon)\
**Replies:** 7\
**Last updated:** [July 26, 2007, 4:12am UTC](https://www.ruby-forum.com/t/efficiency-runtime-trouble-may-not-be-ruby-specific/110353 "2007-07-26T04:12:44Z")

</div>

Hi all - apologies in advance since this issue is not necessarily a Ruby issue, but I’ve written the program in Ruby and the community here has been very helpful/friendly in my experience. I’m working on another probl…

---

## [Why Ruby?](https://www.ruby-forum.com/t/why-ruby/110390)

<div class="topic-metadata">

**Author:** [@al\_batuul](https://www.ruby-forum.com/u/al_batuul)\
**Replies:** 7\
**Last updated:** [July 26, 2007, 3:50am UTC](https://www.ruby-forum.com/t/why-ruby/110390 "2007-07-26T03:50:42Z")

</div>

Could any body explain what distinguishes Ruby from other languages?

---

## [How to properly iterate an array (using TDD)](https://www.ruby-forum.com/t/how-to-properly-iterate-an-array-using-tdd/110411)

<div class="topic-metadata">

**Author:** [@desertfox](https://www.ruby-forum.com/u/desertfox)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 3:40am UTC](https://www.ruby-forum.com/t/how-to-properly-iterate-an-array-using-tdd/110411 "2007-07-26T03:40:41Z")

</div>

Hello, Im trying to iterate an array, but its not working. I have setup a test that looks like this: def test\_getting\_component\_info original = \[“1 1 C1 0805,C56p 0805”, “2 5 C2,C5,C19,C24,C25 0603,C0.01 0603…

---

## [ActiveRecord Problem](https://www.ruby-forum.com/t/activerecord-problem/110283)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 7\
**Last updated:** [July 26, 2007, 2:32am UTC](https://www.ruby-forum.com/t/activerecord-problem/110283 "2007-07-26T02:32:36Z")

</div>

Ugh. ActiveRecord is giving me a hard time. I go to connect to my mysql database on localhost, and I get rejected! Actual IRB session: character.rb(main):015:0\* class Character \< ActiveRecord::Base; end =\> nil chara…

---

## [False](https://www.ruby-forum.com/t/false/110098)

<div class="topic-metadata">

**Author:** [@mtnbiker](https://www.ruby-forum.com/u/mtnbiker)\
**Replies:** 4\
**Last updated:** [July 26, 2007, 2:28am UTC](https://www.ruby-forum.com/t/false/110098 "2007-07-26T02:28:06Z")

</div>

I guess I don’t understand the concept of false. I wanted to set flag in my script manually. At first I flag = true and all was well. later I ran a test if flag But when I set the flag to false (flag=false), the scr…

---

## [Ruby DBAL?](https://www.ruby-forum.com/t/ruby-dbal/110394)

<div class="topic-metadata">

**Author:** [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 12:56am UTC](https://www.ruby-forum.com/t/ruby-dbal/110394 "2007-07-26T00:56:40Z")

</div>

I’m trying to write an ORM because it sounds like a fun learning experience. The idea is to grab some concepts of Og and some concepts of ActiveRecord and mix them with some of my own. But I don’t want to have to writ…

---

## [rubyQT](https://www.ruby-forum.com/t/rubyqt/110256)

<div class="topic-metadata">

**Author:** [@cbourne](https://www.ruby-forum.com/u/cbourne)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/rubyqt/110256 "2007-07-26T00:46:32Z")

</div>

Hi, I wonder if you can help. I’m currently exploring rubyqt in conjunction with the latest QT4 libraries. However, I can’t seem to get a TextEdit widget to refresh properly. My code runs correctly when I click the b…

---

## [Faster\_csv column type](https://www.ruby-forum.com/t/faster-csv-column-type/109471)

<div class="topic-metadata">

**Author:** [@migrate](https://www.ruby-forum.com/u/migrate)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/faster-csv-column-type/109471 "2007-07-26T00:46:31Z")

</div>

Hello all, I’m using faster\_csv to import some csv formatted data to a database. I’m using FasterCSV.foreach method to add all data but I came across with a problem I don’t know how to overcome. First I convert all c…

---

## [Array of arrays](https://www.ruby-forum.com/t/array-of-arrays/109964)

<div class="topic-metadata">

**Author:** [@divya](https://www.ruby-forum.com/u/divya)\
**Replies:** 4\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/array-of-arrays/109964 "2007-07-26T00:46:31Z")

</div>

i have a database with some 10 records each containing 2 columns, sno,name,city. I want to push this into an array of arrays. i see that Ruy doesnt support multi-dimensional arrays. Any ideas of how to do it?

---

## [Gems, put an executable script in path? like rails?](https://www.ruby-forum.com/t/gems-put-an-executable-script-in-path-like-rails/110075)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/gems-put-an-executable-script-in-path-like-rails/110075 "2007-07-26T00:46:24Z")

</div>

Hey all, how do you put an executable in your path through gems… like when installing rails. you have a new command called “rails” what are they doing to do that? - Thanks

---

## [Using IO objects?](https://www.ruby-forum.com/t/using-io-objects/110046)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/using-io-objects/110046 "2007-07-26T00:46:20Z")

</div>

hey… uh… slightly sumped with this. I’m using RSCM for some SVN stuff, and when I do a diff i get a IO object back… Not sure exactly how to get what’s in it… any ideas? thanks all

---

## [Running a huge site](https://www.ruby-forum.com/t/running-a-huge-site/108421)

<div class="topic-metadata">

**Author:** [@zaki](https://www.ruby-forum.com/u/zaki)\
**Replies:** 11\
**Last updated:** [July 26, 2007, 12:45am UTC](https://www.ruby-forum.com/t/running-a-huge-site/108421 "2007-07-26T00:45:58Z")

</div>

Hi everyone, We are running apache with eruby to server .rhtml files. Every apache process loads eruby, thus every access makes a huge dent on memory. We have tried using mod\_ruby, and while memory usage got better, w…

---

## [How do I build a tree of directories?](https://www.ruby-forum.com/t/how-do-i-build-a-tree-of-directories/110293)

<div class="topic-metadata">

**Author:** [@thabenksta](https://www.ruby-forum.com/u/thabenksta)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 12:45am UTC](https://www.ruby-forum.com/t/how-do-i-build-a-tree-of-directories/110293 "2007-07-26T00:45:45Z")

</div>

Hello. I need to send XML back to a client app listing all my directories and sub-directories on the server. The XML will look something like this: \<folder name="directory name" …

---

## [Opposite of .flatten](https://www.ruby-forum.com/t/opposite-of-flatten/110372)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 8\
**Last updated:** [July 25, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/opposite-of-flatten/110372 "2007-07-25T23:59:32Z")

</div>

Ruby-ists: We all know this clever idiom to turn a variable that might be an Array into one known to be an Array: thing = \[thing\].flatten That saves a lot of if statements to permit thing’s type to overload. What i…

---

## [Read variables from string](https://www.ruby-forum.com/t/read-variables-from-string/110350)

<div class="topic-metadata">

**Author:** [@daniel](https://www.ruby-forum.com/u/daniel)\
**Replies:** 5\
**Last updated:** [July 25, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/read-variables-from-string/110350 "2007-07-25T23:56:17Z")

</div>

Hi, I would like to extract an array of e.g. integers or floats from a string: s = “1234” → \[12,34\] s = “12.413.423.7” → \[12.4,13.4,23.7\] How can I use unpack for that? What format string do I need for the two exam…

---

## [Cross-reference RDoc](https://www.ruby-forum.com/t/cross-reference-rdoc/110270)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 3\
**Last updated:** [July 25, 2007, 11:31pm UTC](https://www.ruby-forum.com/t/cross-reference-rdoc/110270 "2007-07-25T23:31:24Z")

</div>

Ruby zealots: I want RDoc to document two modules. One contains def foo and the other def bar. I want the comment for foo to link to bar, so I write # See: bar If bar were in the same module as foo, RDoc would hyper…

---

## [RDE 1.1.1 released](https://www.ruby-forum.com/t/rde-1-1-1-released/108805)

<div class="topic-metadata">

**Author:** [@sakazuki](https://www.ruby-forum.com/u/sakazuki)\
**Replies:** 3\
**Last updated:** [July 25, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/rde-1-1-1-released/108805 "2007-07-25T21:55:13Z")

</div>

Hi. I released RDE 1.1.1. RDE is a Ruby IDE and Ruby editor on Windows. You can edit, run and debug your scripts quickly and easily. RDE debugger is the GUI wrapper of debug.rb. RDE editor has functions that syntax …

---

## [Ruby Canada launched - The Canadian resource for all things](https://www.ruby-forum.com/t/ruby-canada-launched-the-canadian-resource-for-all-things/110371)

<div class="topic-metadata">

**Author:** [@nshb](https://www.ruby-forum.com/u/nshb)\
**Replies:** 3\
**Last updated:** [July 25, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/ruby-canada-launched-the-canadian-resource-for-all-things/110371 "2007-07-25T21:51:53Z")

</div>

Ruby Canada (http://rubycanada) is a new source for Ruby and Rails developers working in and around Canada. Without hyping it up to what it will be, what it is right now is an awesome resource for those looking for wo…

---

## [ANN: assert\_raise\_message](https://www.ruby-forum.com/t/ann-assert-raise-message/110367)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 1\
**Last updated:** [July 25, 2007, 8:52pm UTC](https://www.ruby-forum.com/t/ann-assert-raise-message/110367 "2007-07-25T20:52:03Z")

</div>

Rubies: I don’t like assert\_raise because the first thing I wanted to check was the e.message was correct. So I wrote assert\_raise\_message, and wrote that up as a tutorial on how to use assert\_raise in general: A…

---

## [Detecting the end of a text file](https://www.ruby-forum.com/t/detecting-the-end-of-a-text-file/110358)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [July 25, 2007, 8:21pm UTC](https://www.ruby-forum.com/t/detecting-the-end-of-a-text-file/110358 "2007-07-25T20:21:01Z")

</div>

I’m just beginning to learn the Ruby progamming language, although I have some previous programming experience in Java. I would like to know if how I can detect the end of a file when parsing a text file in Ruby. I do…

---

## [Requiring multiple files](https://www.ruby-forum.com/t/requiring-multiple-files/110344)

<div class="topic-metadata">

**Author:** [@rnuby](https://www.ruby-forum.com/u/rnuby)\
**Replies:** 3\
**Last updated:** [July 25, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/requiring-multiple-files/110344 "2007-07-25T19:52:02Z")

</div>

Hi all! I was wonder how one goes about requireing multiple files. I have the follow file structure: Project/ run.rb sub/ go.rb require\_me.rb now in run.rb require ‘sub/go’ in go.rb require ‘require\_me’ but w…

---

## [YARV issues](https://www.ruby-forum.com/t/yarv-issues/110328)

<div class="topic-metadata">

**Author:** [@abhijith](https://www.ruby-forum.com/u/abhijith)\
**Replies:** 13\
**Last updated:** [July 25, 2007, 7:45pm UTC](https://www.ruby-forum.com/t/yarv-issues/110328 "2007-07-25T19:45:20Z")

</div>

Hi all, I have downloaded the latest version of YARV and built it from source on my gentoo box. I tried running ‘ruby-yarv script/server’ it doesn seem to be able to ‘require gems’. This is the error it is throwi…

---

## [Ruby extension with vararg function woes](https://www.ruby-forum.com/t/ruby-extension-with-vararg-function-woes/110236)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [July 25, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/ruby-extension-with-vararg-function-woes/110236 "2007-07-25T19:16:23Z")

</div>

I’m developing a port of Ruby for the Nokia internet tablets (N800 currently) with full bindings to the Maemo platform (hildon widgets, libosso, etc). I’ve hit a couple of snags along the way, which basically go like …

---

## [Strange error installing RubyGems](https://www.ruby-forum.com/t/strange-error-installing-rubygems/110357)

<div class="topic-metadata">

**Author:** [@vasudevram](https://www.ruby-forum.com/u/vasudevram)\
**Replies:** 0\
**Last updated:** [July 25, 2007, 7:05pm UTC](https://www.ruby-forum.com/t/strange-error-installing-rubygems/110357 "2007-07-25T19:05:54Z")

</div>

Hi, I’m on Windows 2000 with Service Pack 4. Was installing RubyGems and got the error shown below - at the end of this post. Tried it a few times (including uninstalling my complete Ruby installation, in case some …

---

## [Parsing bug with 'return not' (was, Syntax bug)](https://www.ruby-forum.com/t/parsing-bug-with-return-not-was-syntax-bug/110084)

<div class="topic-metadata">

**Author:** [@Good\_Night\_M](https://www.ruby-forum.com/u/Good_Night_M)\
**Replies:** 2\
**Last updated:** [July 25, 2007, 6:53pm UTC](https://www.ruby-forum.com/t/parsing-bug-with-return-not-was-syntax-bug/110084 "2007-07-25T18:53:19Z")

</div>

On Sun, 22 Jul 2007 03:50:01 -0400, Bil K. wrote: myrect.rb:8: syntax error, unexpected kNOT, expecting kEND return not ((other.x1 \< self.x0 or self.x1 \< other.x0) and You need to use the ‘!’ operator instead of t…

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

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