# Ruby

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

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

---

## [Re: Howto Delete 3 Leftmost Characters](https://www.ruby-forum.com/t/re-howto-delete-3-leftmost-characters/100622)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [July 30, 2006, 11:41pm UTC](https://www.ruby-forum.com/t/re-howto-delete-3-leftmost-characters/100622 "2006-07-30T23:41:21Z")

</div>

string="#ip 127.0.0.1" new\_string=string\[3…-1\] =\>" 127.0.0.1" (Indexing in Ruby starts at 0 …) Best regards, Axel

---

## [Mimic File.open pattern](https://www.ruby-forum.com/t/mimic-file-open-pattern/100584)

<div class="topic-metadata">

**Author:** [@SchSSS\_le\_Daniel](https://www.ruby-forum.com/u/SchSSS_le_Daniel)\
**Replies:** 4\
**Last updated:** [July 30, 2006, 11:07pm UTC](https://www.ruby-forum.com/t/mimic-file-open-pattern/100584 "2006-07-30T23:07:30Z")

</div>

Hello all, open is singleton method of File and can be used in two ways 1 way f = File.open(“data”) f.readline until f.lineno == 10 puts f.readline f.close 2 way File.open(“data”) do |f| f.readline until f.lineno …

---

## [For performance, write it in C - Part 2, comparing C, Ruby a](https://www.ruby-forum.com/t/for-performance-write-it-in-c-part-2-comparing-c-ruby-a/100310)

<div class="topic-metadata">

**Author:** [@tekhne](https://www.ruby-forum.com/u/tekhne)\
**Replies:** 51\
**Last updated:** [July 30, 2006, 10:42pm UTC](https://www.ruby-forum.com/t/for-performance-write-it-in-c-part-2-comparing-c-ruby-a/100310 "2006-07-30T22:42:55Z")

</div>

This is the follow up to my “Write it in C post” and is intended to report the timings for the Java implementation that I said I would write for Charles O Nutter and the Ruby version by Simon Kroeger. First let us dea…

---

## [Ruby/Rails User Groups in Southern California](https://www.ruby-forum.com/t/ruby-rails-user-groups-in-southern-california/100611)

<div class="topic-metadata">

**Author:** [@daborg69](https://www.ruby-forum.com/u/daborg69)\
**Replies:** 0\
**Last updated:** [July 30, 2006, 9:57pm UTC](https://www.ruby-forum.com/t/ruby-rails-user-groups-in-southern-california/100611 "2006-07-30T21:57:36Z")

</div>

If you live in Orange County, California, USA, please come join us at the OC Ruby U.'s Group. http://www.ocruby.org We have formal meetings every 4th Thursday, usually at the Microsoft Office in Irvine (405 and Jambo…

---

## [Cgi vs. fcgi question](https://www.ruby-forum.com/t/cgi-vs-fcgi-question/100492)

<div class="topic-metadata">

**Author:** [@tma](https://www.ruby-forum.com/u/tma)\
**Replies:** 9\
**Last updated:** [July 30, 2006, 9:54pm UTC](https://www.ruby-forum.com/t/cgi-vs-fcgi-question/100492 "2006-07-30T21:54:25Z")

</div>

Under CGI I can create a cgi object like: cgi = CGI.new(“html4”) and have methods available to me like .head, .body, and so on. Under FCGI the cgi is created for me. I don’t see any way to make any CGI methods availa…

---

## [Fwd: CHIP-8 Solution](https://www.ruby-forum.com/t/fwd-chip-8-solution/100605)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [July 30, 2006, 9:00pm UTC](https://www.ruby-forum.com/t/fwd-chip-8-solution/100605 "2006-07-30T21:00:26Z")

</div>

Begin forwarded message:

---

## [RubyConf\*MI 2006!](https://www.ruby-forum.com/t/rubyconf-mi-2006/100603)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 0\
**Last updated:** [July 30, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/rubyconf-mi-2006/100603 "2006-07-30T20:53:54Z")

</div>

Announcing RubyConf\*MI! The Michigan Ruby U. Group \[1\] is pleased to announce RubyConf\*MI, http://www.rubyconfmi.org - a whole day of Ruby goodness. The conference will be an all day event held at Calvin College in Gr…

---

## [Build error on cygwin](https://www.ruby-forum.com/t/build-error-on-cygwin/100501)

<div class="topic-metadata">

**Author:** [@SchSSS\_le\_Daniel](https://www.ruby-forum.com/u/SchSSS_le_Daniel)\
**Replies:** 11\
**Last updated:** [July 30, 2006, 7:20pm UTC](https://www.ruby-forum.com/t/build-error-on-cygwin/100501 "2006-07-30T19:20:59Z")

</div>

I am trying to install ruby1.8.4 ./configure --prefix=/pool/installed2 --disable-nls make … make\[1\]: Leaving directory /pool/software/ruby/ruby-1.8.4/ext/enumerator' compiling etc /pool/software/ruby/ruby-1.8.4/lib/…

---

## [Saving objects to files](https://www.ruby-forum.com/t/saving-objects-to-files/100597)

<div class="topic-metadata">

**Author:** [@the-companion](https://www.ruby-forum.com/u/the-companion)\
**Replies:** 2\
**Last updated:** [July 30, 2006, 6:20pm UTC](https://www.ruby-forum.com/t/saving-objects-to-files/100597 "2006-07-30T18:20:57Z")

</div>

Is there a way to save an object (say, a hash map) to a file, and then retrieve the object from the file? Thanks

---

## [Rubygems configuration](https://www.ruby-forum.com/t/rubygems-configuration/100588)

<div class="topic-metadata">

**Author:** [@mickey](https://www.ruby-forum.com/u/mickey)\
**Replies:** 5\
**Last updated:** [July 30, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/rubygems-configuration/100588 "2006-07-30T18:17:47Z")

</div>

I used darwin ports to install ruby, rubygems, and apparently a few dependencies. Whenever I run the following to continue in my quest for a working ruby/rails/mysql playground … i get the following … what may I have…

---

## [Find\_all wierdness](https://www.ruby-forum.com/t/find-all-wierdness/100422)

<div class="topic-metadata">

**Author:** [@gbh](https://www.ruby-forum.com/u/gbh)\
**Replies:** 3\
**Last updated:** [July 30, 2006, 5:58pm UTC](https://www.ruby-forum.com/t/find-all-wierdness/100422 "2006-07-30T17:58:19Z")

</div>

My problem is as follows: book.chapters.find\_all{ |chapter| !chapter.pages.empty? }.size Theoretically it should return a number of chapters that have pages in them. However it doesn’t do that at all. It simply return…

---

## [Calling a dynamically generated Ruby script from a .rb](https://www.ruby-forum.com/t/calling-a-dynamically-generated-ruby-script-from-a-rb/100446)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 7\
**Last updated:** [July 30, 2006, 5:45pm UTC](https://www.ruby-forum.com/t/calling-a-dynamically-generated-ruby-script-from-a-rb/100446 "2006-07-30T17:45:48Z")

</div>

I have a Ruby script that dynamically generates a Ruby script. I would like to execute the dynamically generated script from within my script. I have some ideas but what’s the best way to do this? Got example code? …

---

## [GDK#create\_cairo\_context not found](https://www.ruby-forum.com/t/gdk-create-cairo-context-not-found/100247)

<div class="topic-metadata">

**Author:** [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Replies:** 12\
**Last updated:** [July 30, 2006, 5:42pm UTC](https://www.ruby-forum.com/t/gdk-create-cairo-context-not-found/100247 "2006-07-30T17:42:34Z")

</div>

What version of rcairo, and ruby-gnome2 do I need to have GDK#create\_cairo\_context? I get the following error demo.rb:23:in expose': undefined methodcreate\_cairo\_context’ for #\<Gdk::Window:0xb724dd28 ptr=0x82bb290\> (N…

---

## [Gems install - sans docs?](https://www.ruby-forum.com/t/gems-install-sans-docs/100546)

<div class="topic-metadata">

**Author:** [@tma](https://www.ruby-forum.com/u/tma)\
**Replies:** 3\
**Last updated:** [July 30, 2006, 5:08pm UTC](https://www.ruby-forum.com/t/gems-install-sans-docs/100546 "2006-07-30T17:08:38Z")

</div>

Something can’t be right… notebook:~# gem install calendar\_grid Install required dependency activesupport? \[Yn\] Y Successfully installed calendar\_grid-1.0.2 Successfully installed activesupport-1.3.1 Installing ri …

---

## [Pune Ruby web site / blog / wiki and Pune Rails Hackathon](https://www.ruby-forum.com/t/pune-ruby-web-site-blog-wiki-and-pune-rails-hackathon/100589)

<div class="topic-metadata">

**Author:** [@vasudevram](https://www.ruby-forum.com/u/vasudevram)\
**Replies:** 1\
**Last updated:** [July 30, 2006, 5:08pm UTC](https://www.ruby-forum.com/t/pune-ruby-web-site-blog-wiki-and-pune-rails-hackathon/100589 "2006-07-30T17:08:03Z")

</div>

News - http://jugad.livejournal.com/2006/07/28/ - about the Pune Ruby User Group’s web site / wiki and blog. Pune is a city in western India near Mumbai. The people behind these also organized a Pune Rails Hackathon - …

---

## [Please help install DBI on a Windows systems](https://www.ruby-forum.com/t/please-help-install-dbi-on-a-windows-systems/99413)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 5\
**Last updated:** [July 30, 2006, 3:54pm UTC](https://www.ruby-forum.com/t/please-help-install-dbi-on-a-windows-systems/99413 "2006-07-30T15:54:05Z")

</div>

I’m very frustrated because I’ve just spent the past few hours in the middle of the night (the sun is already up) trying to figure out how to install DBI for MySQL for Ruby on a Windows system and just failing horribl…

---

## [Many many warnings](https://www.ruby-forum.com/t/many-many-warnings/100507)

<div class="topic-metadata">

**Author:** [@tma](https://www.ruby-forum.com/u/tma)\
**Replies:** 2\
**Last updated:** [July 30, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/many-many-warnings/100507 "2006-07-30T15:26:41Z")

</div>

\[Sat Jul 29 10:40:30 2006\] \[warn\] mod\_fcgid: stderr: /usr/lib/ruby/1.8/cgi/session.rb:312: warning: instance variable @write\_lock not initialized \[Sat Jul 29 10:40:30 2006\] \[warn\] mod\_fcgid: stderr: /usr/lib/ruby/1.8…

---

## [Ruby threads? the point?](https://www.ruby-forum.com/t/ruby-threads-the-point/100393)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 25\
**Last updated:** [July 30, 2006, 3:20pm UTC](https://www.ruby-forum.com/t/ruby-threads-the-point/100393 "2006-07-30T15:20:29Z")

</div>

Saw an archived message yesterday that said, “when one thread blocks, they all block”. That matches my experience. I had a timer thread and an interactive-controller thread. But no display updates occur in the time…

---

## [Keystroke logger](https://www.ruby-forum.com/t/keystroke-logger/100579)

<div class="topic-metadata">

**Author:** [@Derek\_Haskin](https://www.ruby-forum.com/u/Derek_Haskin)\
**Replies:** 0\
**Last updated:** [July 30, 2006, 1:30pm UTC](https://www.ruby-forum.com/t/keystroke-logger/100579 "2006-07-30T13:30:20Z")

</div>

I wanted to look at writing a key logger type application. i.e. a tool that can detect and record key stroke and mouse movements. Does anyone have any clues or suggestions on how I can do this. thanks

---

## [Eval bind](https://www.ruby-forum.com/t/eval-bind/100580)

<div class="topic-metadata">

**Author:** [@kajism](https://www.ruby-forum.com/u/kajism)\
**Replies:** 3\
**Last updated:** [July 30, 2006, 1:12pm UTC](https://www.ruby-forum.com/t/eval-bind/100580 "2006-07-30T13:12:09Z")

</div>

How should I call eval from member function that binds to global context? Something like $binding = binding class InterpreterCallback def methods(expr) begin return eval(expr, $binding).class.instance\_methods(fals…

---

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

<div class="topic-metadata">

**Author:** [@kajism](https://www.ruby-forum.com/u/kajism)\
**Replies:** 0\
**Last updated:** [July 30, 2006, 12:44pm UTC](https://www.ruby-forum.com/t/no-subject/100578 "2006-07-30T12:44:20Z")

</div>

How should I call eval from member function that binds to global context? Something like $binding = binding class InterpreterCallback def methods(expr) begin return eval(expr, $binding).class.instance\_methods(fals…

---

## [\[ANN\] Composite Keys 0.3.3](https://www.ruby-forum.com/t/ann-composite-keys-0-3-3/100577)

<div class="topic-metadata">

**Author:** [@nicwilliams](https://www.ruby-forum.com/u/nicwilliams)\
**Replies:** 0\
**Last updated:** [July 30, 2006, 11:23am UTC](https://www.ruby-forum.com/t/ann-composite-keys-0-3-3/100577 "2006-07-30T11:23:32Z")

</div>

Composite Primary Keys for ActiveRecords Bug fix release - 0.3.3 Notes: Fixed errors with id= and create. Note, the create method does not use sequences to generate ids for you. If anyone has any use cases where the…

---

## [To\_i vs. to\_int](https://www.ruby-forum.com/t/to-i-vs-to-int/100505)

<div class="topic-metadata">

**Author:** [@Ico](https://www.ruby-forum.com/u/Ico)\
**Replies:** 9\
**Last updated:** [July 30, 2006, 10:52am UTC](https://www.ruby-forum.com/t/to-i-vs-to-int/100505 "2006-07-30T10:52:20Z")

</div>

Hello, I have a class which instances can be represented as integers. What is the difference between the to\_i and to\_int methods, and when is which form needed ? Ico

---

## [Keystroke logger](https://www.ruby-forum.com/t/keystroke-logger/100344)

<div class="topic-metadata">

**Author:** [@derek](https://www.ruby-forum.com/u/derek)\
**Replies:** 6\
**Last updated:** [July 30, 2006, 10:30am UTC](https://www.ruby-forum.com/t/keystroke-logger/100344 "2006-07-30T10:30:45Z")

</div>

Hi, I wanted to look at writing a key logger type application. i.e. a tool that can detect and record key stroke and mouse movements. Does anyone have any clues or suggestions on how I can do this. thanks

---

## [How to Create a New File](https://www.ruby-forum.com/t/how-to-create-a-new-file/100564)

<div class="topic-metadata">

**Author:** [@Skeets](https://www.ruby-forum.com/u/Skeets)\
**Replies:** 7\
**Last updated:** [July 30, 2006, 9:12am UTC](https://www.ruby-forum.com/t/how-to-create-a-new-file/100564 "2006-07-30T09:12:00Z")

</div>

let’s say I want to create a new file named new\_file.txt. how do i do this in ruby? it would seem to be trivial, however, i’m going through the pickaxe book and i can’t find anything that relates to this. tia…

---

## [Ruby-VPI 0.8](https://www.ruby-forum.com/t/ruby-vpi-0-8/100565)

<div class="topic-metadata">

**Author:** [@Suraj\_NSKurapati](https://www.ruby-forum.com/u/Suraj_NSKurapati)\
**Replies:** 0\
**Last updated:** [July 30, 2006, 8:44am UTC](https://www.ruby-forum.com/t/ruby-vpi-0-8/100565 "2006-07-30T08:44:06Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create complex Verilog test benches easily and wholly in Ruby. Website: http://ruby-vpi.rubyforge.org Download…

---

## [Not sure what is wrong. seems to look right to me](https://www.ruby-forum.com/t/not-sure-what-is-wrong-seems-to-look-right-to-me/100558)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [July 30, 2006, 6:14am UTC](https://www.ruby-forum.com/t/not-sure-what-is-wrong-seems-to-look-right-to-me/100558 "2006-07-30T06:14:55Z")

</div>

class ReportBuilder countExch=Hash.new def getStats(symbolObjColl) startCounter=0 #### add a loop to count thro symbolcollection. symbolObjColl.each{|eachSymbolObj| if (countExch.has\_key?(eachSymbolObj.exchange…

---

## [Slow regular expressions](https://www.ruby-forum.com/t/slow-regular-expressions/99671)

<div class="topic-metadata">

**Author:** [@S3S3S3](https://www.ruby-forum.com/u/S3S3S3)\
**Replies:** 8\
**Last updated:** [July 30, 2006, 1:09am UTC](https://www.ruby-forum.com/t/slow-regular-expressions/99671 "2006-07-30T01:09:32Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I am trying to write a simple script to parse an Apache log file, but it is taking an extremely long time. I used profile and the problem appears to be with the regular…

---

## [RubyScript2Exe 0.5.0](https://www.ruby-forum.com/t/rubyscript2exe-0-5-0/100525)

<div class="topic-metadata">

**Author:** [@erikveen](https://www.ruby-forum.com/u/erikveen)\
**Replies:** 1\
**Last updated:** [July 30, 2006, 12:29am UTC](https://www.ruby-forum.com/t/rubyscript2exe-0-5-0/100525 "2006-07-30T00:29:38Z")

</div>

I just released RubyScript2Exe 0.5.0. I added something I wanted to add for a long time: Support for directories. Usually, an application is more than just a program or a script. It consists of libraries, documentatio…

---

## [Keystroke logger](https://www.ruby-forum.com/t/keystroke-logger/100495)

<div class="topic-metadata">

**Author:** [@derek](https://www.ruby-forum.com/u/derek)\
**Replies:** 1\
**Last updated:** [July 29, 2006, 9:14pm UTC](https://www.ruby-forum.com/t/keystroke-logger/100495 "2006-07-29T21:14:27Z")

</div>

I wanted to look at writing a key logger type application. i.e. a tool that can detect and record key stroke and mouse movements. Does anyone have any clues or suggestions on how I can do this. thanks

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

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