# Ruby

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

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

---

## [Ruby / osx / mysql](https://www.ruby-forum.com/t/ruby-osx-mysql/70584)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [September 30, 2006, 6:24pm UTC](https://www.ruby-forum.com/t/ruby-osx-mysql/70584 "2006-09-30T18:24:38Z")

</div>

hi list - on windows i was able to install mysql drivers for ruby simply with gem. on osx, these seem not to work (pure ruby drivers) with current versions of mysql… is it really true i have to go through compiling /…

---

## [Wrong content-type when trying to parse emails with Net::IMA](https://www.ruby-forum.com/t/wrong-content-type-when-trying-to-parse-emails-with-net-ima/70486)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 3\
**Last updated:** [September 30, 2006, 4:56pm UTC](https://www.ruby-forum.com/t/wrong-content-type-when-trying-to-parse-emails-with-net-ima/70486 "2006-09-30T16:56:28Z")

</div>

i’m trying to parse an email that is supposed to be a multipart/mixed mail but i am not getting back the expected results. data = imap.fetch(7, \[“ENVELOPE”, “RFC822.HEADER”, “BODYSTRUCTURE”, “BODY\[1\]”\]) \[RFC822.HEADE…

---

## [Updaing MySQL in Instant Rails](https://www.ruby-forum.com/t/updaing-mysql-in-instant-rails/69401)

<div class="topic-metadata">

**Author:** [@rbogda](https://www.ruby-forum.com/u/rbogda)\
**Replies:** 3\
**Last updated:** [September 30, 2006, 4:16pm UTC](https://www.ruby-forum.com/t/updaing-mysql-in-instant-rails/69401 "2006-09-30T16:16:26Z")

</div>

Hi, I have installed Instant Rails and wish to upgrade MySQL to 5.0 - 5.1. If I do a standard install of the newer version of MySQL will this work? TIA Roger Bogda

---

## [Regexp help](https://www.ruby-forum.com/t/regexp-help/70458)

<div class="topic-metadata">

**Author:** [@pazu](https://www.ruby-forum.com/u/pazu)\
**Replies:** 15\
**Last updated:** [September 30, 2006, 2:46pm UTC](https://www.ruby-forum.com/t/regexp-help/70458 "2006-09-30T14:46:17Z")

</div>

Hello everyone, I have a string of the form 2h 3m or 3m 2h or 2h 3minutes or 2hour 3min and so on Is there a smart regexp one liner that could produce \[2, 3\] If anyone types just for example 2 than that sho…

---

## [Super simple serving of ruby pages](https://www.ruby-forum.com/t/super-simple-serving-of-ruby-pages/69376)

<div class="topic-metadata">

**Author:** [@zerohalo](https://www.ruby-forum.com/u/zerohalo)\
**Replies:** 34\
**Last updated:** [September 30, 2006, 2:26pm UTC](https://www.ruby-forum.com/t/super-simple-serving-of-ruby-pages/69376 "2006-09-30T14:26:14Z")

</div>

Hi. I apologize in advance if this is a dumb question, but though I’ve searched online I haven’t found an answer. I’m starting to teach my 8yr daughter Ruby. We’ve covered HTML and CSS already and she handcoded her ow…

---

## [Quick question: continuing Ruby methods on different line](https://www.ruby-forum.com/t/quick-question-continuing-ruby-methods-on-different-line/70561)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 4\
**Last updated:** [September 30, 2006, 1:26pm UTC](https://www.ruby-forum.com/t/quick-question-continuing-ruby-methods-on-different-line/70561 "2006-09-30T13:26:10Z")

</div>

If you have a long method call like: some.long.method.call how can i make it some.long (next line) .method.call

---

## [Using Ruby to drive Excel calculations](https://www.ruby-forum.com/t/using-ruby-to-drive-excel-calculations/70576)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [September 30, 2006, 11:12am UTC](https://www.ruby-forum.com/t/using-ruby-to-drive-excel-calculations/70576 "2006-09-30T11:12:00Z")

</div>

I have a Rails application that mimics some arithmetic calculations done in an Excel spreadsheet. The Excel spreadsheet generates outputs in two cells based on changes in one cell. There are on the order of at least …

---

## [On #\<, #\> and -w (void context warnings)](https://www.ruby-forum.com/t/on-and-w-void-context-warnings/70571)

<div class="topic-metadata">

**Author:** [@rue](https://www.ruby-forum.com/u/rue)\
**Replies:** 1\
**Last updated:** [September 30, 2006, 10:51am UTC](https://www.ruby-forum.com/t/on-and-w-void-context-warnings/70571 "2006-09-30T10:51:59Z")

</div>

Hello! Time for the weekly syntax analysis thingy. ruby -w causes this code to issue a warning: warning: useless use of \< in void context ‘/tmp/foo’ \< “Some text here” Same goes for #\>. The problem, somewhat obvious…

---

## [Pipe binary data](https://www.ruby-forum.com/t/pipe-binary-data/70568)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [September 30, 2006, 10:47am UTC](https://www.ruby-forum.com/t/pipe-binary-data/70568 "2006-09-30T10:47:59Z")

</div>

Hi there, I have a little program that mines the web. It consists of two ruby programs. The first is responsible to get the data from the web; the second is responsible of mining that data. I connect the two via comm…

---

## [Newbie: how to find & extract a string from a file](https://www.ruby-forum.com/t/newbie-how-to-find-extract-a-string-from-a-file/70548)

<div class="topic-metadata">

**Author:** [@Esmail\_B](https://www.ruby-forum.com/u/Esmail_B)\
**Replies:** 5\
**Last updated:** [September 30, 2006, 7:21am UTC](https://www.ruby-forum.com/t/newbie-how-to-find-extract-a-string-from-a-file/70548 "2006-09-30T07:21:49Z")

</div>

Hi, Just starting out to explore Ruby (I like it) and I have a question. I have an HTML file that contains several references to jpg files. I would like to extract the filename with the .jpg extension. What is the b…

---

## [Expect examples](https://www.ruby-forum.com/t/expect-examples/70560)

<div class="topic-metadata">

**Author:** [@Robert\_Love](https://www.ruby-forum.com/u/Robert_Love)\
**Replies:** 1\
**Last updated:** [September 30, 2006, 4:59am UTC](https://www.ruby-forum.com/t/expect-examples/70560 "2006-09-30T04:59:02Z")

</div>

Where can I find examples of using expect.rb? I find plenty of web references to a file sample\_expect.rb but I never seem to find the actual file.

---

## [Net/ssh question](https://www.ruby-forum.com/t/net-ssh-question/70556)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 5\
**Last updated:** [September 30, 2006, 3:26am UTC](https://www.ruby-forum.com/t/net-ssh-question/70556 "2006-09-30T03:26:54Z")

</div>

Can I use net/ssh to connect to a remote server, start a X application, and have the application’s display show up on my computer? Joe

---

## [Interacting with Mozilla DOM?](https://www.ruby-forum.com/t/interacting-with-mozilla-dom/69746)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 2\
**Last updated:** [September 30, 2006, 2:00am UTC](https://www.ruby-forum.com/t/interacting-with-mozilla-dom/69746 "2006-09-30T02:00:49Z")

</div>

I’m trying to figure out a way of controlling/interacting with the Mozilla DOM without JavaScript, and in a not-too-hacky way. Any thoughts? Thanks, Ken

---

## [SQLite3 Help](https://www.ruby-forum.com/t/sqlite3-help/70550)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [September 30, 2006, 1:08am UTC](https://www.ruby-forum.com/t/sqlite3-help/70550 "2006-09-30T01:08:46Z")

</div>

I have a web app (not rails) that is using sqlite3 directly. (Almost) all queries are working, all is largely well. However, I am trying to use a temp table as part of a complex query, and the web app isn’t returning …

---

## [Commit when error](https://www.ruby-forum.com/t/commit-when-error/70076)

<div class="topic-metadata">

**Author:** [@josemarquez](https://www.ruby-forum.com/u/josemarquez)\
**Replies:** 7\
**Last updated:** [September 30, 2006, 12:35am UTC](https://www.ruby-forum.com/t/commit-when-error/70076 "2006-09-30T00:35:52Z")

</div>

Ok, this is my problem: Im loading around 900,000 records from a file to my database. So, i commit after it has processed 10,000 with something like this: if (count % 10000) == 0 @dbh.commit end (Where the variable…

---

## [Vruby question](https://www.ruby-forum.com/t/vruby-question/70436)

<div class="topic-metadata">

**Author:** [@Esad\_H](https://www.ruby-forum.com/u/Esad_H)\
**Replies:** 3\
**Last updated:** [September 30, 2006, 12:03am UTC](https://www.ruby-forum.com/t/vruby-question/70436 "2006-09-30T00:03:50Z")

</div>

Hi! In the following code (Parked at Loopia), the Dialog returns the value (:test) the first time, but after the form B has been closed, and created again, it returns 0. Any idea why? Am I doing something wrong or is…

---

## [Ruby Rails - serving image files](https://www.ruby-forum.com/t/ruby-rails-serving-image-files/51956)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [September 29, 2006, 11:49pm UTC](https://www.ruby-forum.com/t/ruby-rails-serving-image-files/51956 "2006-09-29T23:49:54Z")

</div>

I’m pretty new to Ruby and Rails. I am writing a Rails application that is meant to be run on a local machine. It allows the user to select a bunch of image (jpg, gif, etc) files from anywhere on their file system …

---

## [String indexing/setting](https://www.ruby-forum.com/t/string-indexing-setting/70540)

<div class="topic-metadata">

**Author:** [@stevenreplica](https://www.ruby-forum.com/u/stevenreplica)\
**Replies:** 2\
**Last updated:** [September 29, 2006, 11:11pm UTC](https://www.ruby-forum.com/t/string-indexing-setting/70540 "2006-09-29T23:11:44Z")

</div>

I think I found a version difference between 1.82 and 1.84-20 Stable and I wanted to know what correct code was and what was not. pos = s.index(“11”) s = “000011481^3” s\[2…pos\] = “BigString” puts s On one server I…

---

## [Extremely simple printf question](https://www.ruby-forum.com/t/extremely-simple-printf-question/70531)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 2\
**Last updated:** [September 29, 2006, 10:41pm UTC](https://www.ruby-forum.com/t/extremely-simple-printf-question/70531 "2006-09-29T22:41:42Z")

</div>

How embarrassing - how long have I been away from C to have to ask this? I want to display a float with only two digits of precision. I’m trying this: irb(main):011:0\> printf("%2f", 5.3456) 5.345600=\> nil What am I …

---

## [Toronto RUG meeting Sun Oct 1](https://www.ruby-forum.com/t/toronto-rug-meeting-sun-oct-1/70541)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 0\
**Last updated:** [September 29, 2006, 10:31pm UTC](https://www.ruby-forum.com/t/toronto-rug-meeting-sun-oct-1/70541 "2006-09-29T22:31:41Z")

</div>

Sorry for the late reminder. The Toronto Ruby U. Group will be having their regular monthly meeting on Sunday October 1 at the Linux Caffe at 1pm. http://www.trug.ca/Sun\_Oct\_01%2C\_2006 Mike – Mike S. removed\_email\_…

---

## [HTML tags in database](https://www.ruby-forum.com/t/html-tags-in-database/70479)

<div class="topic-metadata">

**Author:** [@thekernel](https://www.ruby-forum.com/u/thekernel)\
**Replies:** 5\
**Last updated:** [September 29, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/html-tags-in-database/70479 "2006-09-29T22:09:40Z")

</div>

I put html tags in a longtext field in my database, but when I grab it for the page it uses it as regualr text. How can I get the html tags to be recognized?

---

## [String starts? and ends? methods](https://www.ruby-forum.com/t/string-starts-and-ends-methods/70196)

<div class="topic-metadata">

**Author:** [@George](https://www.ruby-forum.com/u/George)\
**Replies:** 51\
**Last updated:** [September 29, 2006, 9:51pm UTC](https://www.ruby-forum.com/t/string-starts-and-ends-methods/70196 "2006-09-29T21:51:38Z")

</div>

This comes up every now and again, and lots of frameworks implement their own versions. I’m thinking of submitting an RCR for something functionally equivalent to the following to be incorporated into the base librar…

---

## [Files?](https://www.ruby-forum.com/t/files/70352)

<div class="topic-metadata">

**Author:** [@jonathan](https://www.ruby-forum.com/u/jonathan)\
**Replies:** 6\
**Last updated:** [September 29, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/files/70352 "2006-09-29T20:49:31Z")

</div>

I’m getting quite lost and discouraged trying to learn Ruby. \[I have no programming experiance, just html and css\] for something to start with, I would like to use ruby to create a file in directory G:\\Ruby named “myF…

---

## [New JRuby interview posted](https://www.ruby-forum.com/t/new-jruby-interview-posted/70509)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [September 29, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/new-jruby-interview-posted/70509 "2006-09-29T19:57:25Z")

</div>

Two caveats: It’s long it’s part one (of probably 3) On the other hand I think Ola B., Charles Nutter, and Thomas Enebo have some really interesting things to say. Check it out: On Ruby: New JRuby Interview (part …

---

## [Re: $ anchor for string of a whole file](https://www.ruby-forum.com/t/re-anchor-for-string-of-a-whole-file/70496)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [September 29, 2006, 6:51pm UTC](https://www.ruby-forum.com/t/re-anchor-for-string-of-a-whole-file/70496 "2006-09-29T18:51:15Z")

</div>

And, shouldn’t /m tell it to include everying, including newlines? No, the multiline option causes the regexp engine to include newlines in the ‘.’ character class. Unlike some other languages, I don’t believe it ha…

---

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

<div class="topic-metadata">

**Author:** [@MeadS\_Christopher](https://www.ruby-forum.com/u/MeadS_Christopher)\
**Replies:** 0\
**Last updated:** [September 29, 2006, 6:43pm UTC](https://www.ruby-forum.com/t/no-subject/70500 "2006-09-29T18:43:14Z")

</div>

unsubscribe Thank You, Christopher Mead Composition/Database Automated Graphic Systems

---

## [$ anchor for string of a whole file](https://www.ruby-forum.com/t/anchor-for-string-of-a-whole-file/70493)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 1\
**Last updated:** [September 29, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/anchor-for-string-of-a-whole-file/70493 "2006-09-29T18:17:23Z")

</div>

I can’t seem to get the regex I want when I’m searching for something at the end of a file. I express it with relevant characters, followed by a $. Because I’ve read in an entire file as one string into memory, should…

---

## [Range weirdness](https://www.ruby-forum.com/t/range-weirdness/70494)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 1\
**Last updated:** [September 29, 2006, 6:15pm UTC](https://www.ruby-forum.com/t/range-weirdness/70494 "2006-09-29T18:15:11Z")

</div>

This surprised me: C:\\Documents and Settings\\Alex\>ruby -e “(4…1).each{|a| puts a}” C:\\Documents and Settings\\Alex\>ruby -e “(1…4).each{|a| puts a}” 1 2 3 4 C:\\Documents and Settings\\Alex\> Should it have done? I f…

---

## [Re: $ anchor for string of a whole file](https://www.ruby-forum.com/t/re-anchor-for-string-of-a-whole-file/70495)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [September 29, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/re-anchor-for-string-of-a-whole-file/70495 "2006-09-29T18:01:08Z")

</div>

Because I’ve read in an entire file as one string into memory, shouldn’t $ mean the end of the file? And, shouldn’t /m tell it to include everying, including newlines? http://phrogz.net/ProgrammingRuby/language.html…

---

## [Putting a variable into a KirbyBase database cell](https://www.ruby-forum.com/t/putting-a-variable-into-a-kirbybase-database-cell/70393)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 2\
**Last updated:** [September 29, 2006, 5:47pm UTC](https://www.ruby-forum.com/t/putting-a-variable-into-a-kirbybase-database-cell/70393 "2006-09-29T17:47:49Z")

</div>

Hi, With a lot of help from Jamey, the KirbyBase inventor, I’ve managed to get a script that does what I want it to. I’ve proven that I can populate my database properly. But, so far, I’ve only been able to update my…

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

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