# Ruby

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

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

---

## [Ruby, Wesley Chen has invited you to open a Google mail account](https://www.ruby-forum.com/t/ruby-wesley-chen-has-invited-you-to-open-a-google-mail-account/165101)

<div class="topic-metadata">

**Author:** [@chenpassion](https://www.ruby-forum.com/u/chenpassion)\
**Replies:** 0\
**Last updated:** [April 9, 2009, 3:51am UTC](https://www.ruby-forum.com/t/ruby-wesley-chen-has-invited-you-to-open-a-google-mail-account/165101 "2009-04-09T03:51:05Z")

</div>

I’ve been using Gmail and thought you might like to try it out. Here’s an invitation to create an account. Wesley C. has invited you to open a free Gmail account. To accept this invitation and register for your accou…

---

## [Filelocking](https://www.ruby-forum.com/t/filelocking/165098)

<div class="topic-metadata">

**Author:** [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Replies:** 4\
**Last updated:** [April 9, 2009, 3:40am UTC](https://www.ruby-forum.com/t/filelocking/165098 "2009-04-09T03:40:25Z")

</div>

Hi All, I have posted the same code b4, but could not find my original post, however this is a different question. I am a newb, so here I go. Thank you! This is my error: $ ruby test.rb test.rb:46: undefined metho…

---

## [Gmail\_contacts 1.0 Released](https://www.ruby-forum.com/t/gmail-contacts-1-0-released/165095)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [April 9, 2009, 1:45am UTC](https://www.ruby-forum.com/t/gmail-contacts-1-0-released/165095 "2009-04-09T01:45:11Z")

</div>

gmail\_contacts version 1.0 has been released! http://seattlerb.rubyforge.org/gmail\_contacts Simple Gmail contacts extraction using GData. gmail\_contacts development was sponsored by AT&T Interactive.

---

## [Instantiate different class based on variable contents](https://www.ruby-forum.com/t/instantiate-different-class-based-on-variable-contents/165083)

<div class="topic-metadata">

**Author:** [@stephen\_OSD](https://www.ruby-forum.com/u/stephen_OSD)\
**Replies:** 4\
**Last updated:** [April 9, 2009, 12:05am UTC](https://www.ruby-forum.com/t/instantiate-different-class-based-on-variable-contents/165083 "2009-04-09T00:05:44Z")

</div>

Lets say I have a two classes, Foo and Bar. In some code, I have a variable that can either contain the test ‘Foo’ or the text ‘Bar’. If it contains Foo, I would like to call Foo.new (v1, v2), if it contains Bar, I w…

---

## [Exec (new process or new thread?) to continue](https://www.ruby-forum.com/t/exec-new-process-or-new-thread-to-continue/161230)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 5\
**Last updated:** [April 8, 2009, 10:35pm UTC](https://www.ruby-forum.com/t/exec-new-process-or-new-thread-to-continue/161230 "2009-04-08T22:35:22Z")

</div>

Hi, I have fired off an exe with the kernal method exec loader\_app = “#{Dir.getwd}/PublishUi.exe” exec(loader\_app) The exec method seems to hold up the process so exec(loader\_app) puts “we got here” Will not prin…

---

## [Copying Windows system files](https://www.ruby-forum.com/t/copying-windows-system-files/165044)

<div class="topic-metadata">

**Author:** [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Replies:** 2\
**Last updated:** [April 8, 2009, 8:21pm UTC](https://www.ruby-forum.com/t/copying-windows-system-files/165044 "2009-04-08T20:21:41Z")

</div>

Hi all, Does anyone know how to copy Windows system files? I have a script which looks for certain files and writes a log with the path of the file found and copies the file found to a folder. This works fine for all…

---

## [SMTP problem sending to multiple recipients](https://www.ruby-forum.com/t/smtp-problem-sending-to-multiple-recipients/165067)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 7:56pm UTC](https://www.ruby-forum.com/t/smtp-problem-sending-to-multiple-recipients/165067 "2009-04-08T19:56:35Z")

</div>

Please consider the following code snippet: msg = \<\<EOS From: To: Subject: A Test Message This is a test message. EOS Net::SMTP.start(, 26, , , , :plain) do |smtp| smtp.send\_message(msg, , \[‘removed\_email\_addr…

---

## [Mysql::Error Table doesn't exist](https://www.ruby-forum.com/t/mysql-error-table-doesnt-exist/164944)

<div class="topic-metadata">

**Author:** [@mifi](https://www.ruby-forum.com/u/mifi)\
**Replies:** 1\
**Last updated:** [April 8, 2009, 7:40pm UTC](https://www.ruby-forum.com/t/mysql-error-table-doesnt-exist/164944 "2009-04-08T19:40:01Z")

</div>

I installed the Windows mysql gem, I’m using MySQL on Windows, and have been able to get the connection to work but am having trouble figuring out what is happening with my query. What I have is (with non-essential p…

---

## [JRuby Newbie - Migrating from Ruby to JRuby](https://www.ruby-forum.com/t/jruby-newbie-migrating-from-ruby-to-jruby/165060)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [April 8, 2009, 7:34pm UTC](https://www.ruby-forum.com/t/jruby-newbie-migrating-from-ruby-to-jruby/165060 "2009-04-08T19:34:40Z")

</div>

Group, I’m in a Java shop that uses scripts when we need something done fast. My CTO is a PHP guy, but I’ve been nudging us towards using Ruby for the last 6 months. Recently I needed a script that parsed some xml …

---

## [Beginner 'How-to' Question on getting Array info](https://www.ruby-forum.com/t/beginner-how-to-question-on-getting-array-info/164987)

<div class="topic-metadata">

**Author:** [@noumes](https://www.ruby-forum.com/u/noumes)\
**Replies:** 3\
**Last updated:** [April 8, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/beginner-how-to-question-on-getting-array-info/164987 "2009-04-08T18:49:27Z")

</div>

Hi, I am trying to learn ruby and had a question (multiple in fact, however, i’ll ask this one) Im making a tiny script that asks for the names of a person’s children, then replies by saying hi to each child. for ex…

---

## [How to find Operating system](https://www.ruby-forum.com/t/how-to-find-operating-system/165027)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 18\
**Last updated:** [April 8, 2009, 6:40pm UTC](https://www.ruby-forum.com/t/how-to-find-operating-system/165027 "2009-04-08T18:40:02Z")

</div>

Hi… Here me looking for some help… how to find web server’s operating system … whether it is running under windows or linux… Any helps Thanks

---

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

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/no-subject/165058 "2009-04-08T18:21:53Z")

</div>

tfpt review “/shelveset:MetaConv1;REDMOND\\tomat” Ruby and a simple outer DLR change. Prepares Ruby MetaObjectBuilder for removal of conversions from DLR binder. Tomas

---

## [Calendar](https://www.ruby-forum.com/t/calendar/196933)

<div class="topic-metadata">

**Author:** [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Replies:** 1\
**Last updated:** [April 8, 2009, 6:16pm UTC](https://www.ruby-forum.com/t/calendar/196933 "2009-04-08T18:16:00Z")

</div>

what is sedu gem? how to get that & use calendar control

---

## [Ruby compactor/consolidator?](https://www.ruby-forum.com/t/ruby-compactor-consolidator/165052)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 5\
**Last updated:** [April 8, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/ruby-compactor-consolidator/165052 "2009-04-08T17:54:19Z")

</div>

Is there a built-in or common way to consolidate a ruby project into one file? I’ve got a project of 8-10 files (one class per file & a script that use the classes). For ease of distributing it to my servers, I’ve go…

---

## [Looking for postgres-pr rdocs or other documentation ( tutorial etc )](https://www.ruby-forum.com/t/looking-for-postgres-pr-rdocs-or-other-documentation-tutorial-etc/165045)

<div class="topic-metadata">

**Author:** [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Replies:** 0\
**Last updated:** [April 8, 2009, 4:29pm UTC](https://www.ruby-forum.com/t/looking-for-postgres-pr-rdocs-or-other-documentation-tutorial-etc/165045 "2009-04-08T16:29:10Z")

</div>

I installed the latest postgres-pr, but it doesn’t look like any docs got generated. Looking for instructions on how to gen the rdocs, or where I can find them online. thanks, reid

---

## [Concatenating Regex Smartly](https://www.ruby-forum.com/t/concatenating-regex-smartly/165028)

<div class="topic-metadata">

**Author:** [@sshaikh](https://www.ruby-forum.com/u/sshaikh)\
**Replies:** 3\
**Last updated:** [April 8, 2009, 3:30pm UTC](https://www.ruby-forum.com/t/concatenating-regex-smartly/165028 "2009-04-08T15:30:29Z")

</div>

Is there a way of quickly concatenating two full string patterns in a way that takes into account the boundaries? So for example: \\A\\d+\\Z and \\A\[a-z\]+\\Z would give: \\A\\d+\[a-z\]+\\Z ? Or is this a context sensitive s…

---

## [What is happening here](https://www.ruby-forum.com/t/what-is-happening-here/165034)

<div class="topic-metadata">

**Author:** [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Replies:** 6\
**Last updated:** [April 8, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/what-is-happening-here/165034 "2009-04-08T15:25:48Z")

</div>

i have some perl code while ($high - $low \> 0.001) { # precision # calculate the sum of all normalized scores my $sum = Pn \* Pn \* exp($lambda \* $match) \* 4 + Pn \* Pn \* exp($lambda \* $mismatch) \* 12; # refine g…

---

## [Downloading a file using ruby](https://www.ruby-forum.com/t/downloading-a-file-using-ruby/164909)

<div class="topic-metadata">

**Author:** [@rubist](https://www.ruby-forum.com/u/rubist)\
**Replies:** 4\
**Last updated:** [April 8, 2009, 3:14pm UTC](https://www.ruby-forum.com/t/downloading-a-file-using-ruby/164909 "2009-04-08T15:14:44Z")

</div>

Hi All, I want to download a file from my web application using/calling ruby code. Manually i can download reports by clicking on ‘DOWNLOAD’ button in my app, which in turn gets the file from servlet path(where the f…

---

## [\[Bug:trunk\] String#dump with non-ascii-compatible string provides invalid code](https://www.ruby-forum.com/t/bug-trunk-string-dump-with-non-ascii-compatible-string-provides-invalid-code/165039)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [April 8, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/bug-trunk-string-dump-with-non-ascii-compatible-string-provides-invalid-code/165039 "2009-04-08T15:07:37Z")

</div>

e$B1sF#$G$9!#e(B e$B%"%9%-!\<Hs8\_49$JJ8;zNs$re(B String#dump e$B$9$k$He(B eval e$B$G$-$J$$J8;zNs$,e(B e$BF@$i$l$^$7$?!#e(B $ ./ruby -e ‘p “\\u3042”.encode(“UTF-16LE”).dump’ ““B0”.force\_encoding(“UTF-16LE”\\x00” Index:…

---

## [SFTP with ruby cgi-bin](https://www.ruby-forum.com/t/sftp-with-ruby-cgi-bin/164850)

<div class="topic-metadata">

**Author:** [@vagabond](https://www.ruby-forum.com/u/vagabond)\
**Replies:** 1\
**Last updated:** [April 8, 2009, 1:55pm UTC](https://www.ruby-forum.com/t/sftp-with-ruby-cgi-bin/164850 "2009-04-08T13:55:59Z")

</div>

When I execute the ruby manually, it works great. When I run it over http, no cake. Basically, when I run the ruby it will connect to sftp and have no problems, but when I navigate to the cgi-bin through my browser, I…

---

## [\[Bug #1362\] test/thread/lbtest.rb stops forever on mswin32](https://www.ruby-forum.com/t/bug-1362-test-thread-lbtest-rb-stops-forever-on-mswin32/164996)

<div class="topic-metadata">

**Author:** [@Usaku\_NAKAMURA](https://www.ruby-forum.com/u/Usaku_NAKAMURA)\
**Replies:** 2\
**Last updated:** [April 8, 2009, 12:04pm UTC](https://www.ruby-forum.com/t/bug-1362-test-thread-lbtest-rb-stops-forever-on-mswin32/164996 "2009-04-08T12:04:35Z")

</div>

Bug #1362: test/thread/lbtest.rb stops forever on mswin32 http://redmine.ruby-lang.org/issues/show/1362 e$B5/I\<\<Te(B: Usaku NAKAMURA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: High e$BC4Ev\<Te(B: Usaku NAKAMURA, e$B%+%F%4%…

---

## [Exceptions : should I else or not?](https://www.ruby-forum.com/t/exceptions-should-i-else-or-not/164966)

<div class="topic-metadata">

**Author:** [@Paganoni](https://www.ruby-forum.com/u/Paganoni)\
**Replies:** 3\
**Last updated:** [April 8, 2009, 10:57am UTC](https://www.ruby-forum.com/t/exceptions-should-i-else-or-not/164966 "2009-04-08T10:57:05Z")

</div>

Hello, when writing stuff like that begin call\_this() do\_that() tell\_them() print “Ho yes #{my\_dear} you did it” rescue SomeException =\> e snip end Should I move the print statement to the else part of begin/end …

---

## [Ruby 1.9.1 - invalid multibyte escape: // (RegexpError)](https://www.ruby-forum.com/t/ruby-1-9-1-invalid-multibyte-escape-regexperror/164732)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 11\
**Last updated:** [April 8, 2009, 10:02am UTC](https://www.ruby-forum.com/t/ruby-1-9-1-invalid-multibyte-escape-regexperror/164732 "2009-04-08T10:02:53Z")

</div>

Hi, using TreeTop parser I had a grammar defined working in Ruby1.8 but it fails in 1.9.1: ~# ruby1.8 -e “Regexp.new(‘\[\\xC0-\\xDF\]’)” OK ~# ruby1.9 -e “Regexp.new(‘\[\\xC0-\\xDF\]’)” -e:1:in \`initialize’: invalid multib…

---

## [\[ANN\] Wee 2.0.0 released (Rack, Continuations, Refactoring)](https://www.ruby-forum.com/t/ann-wee-2-0-0-released-rack-continuations-refactoring/164919)

<div class="topic-metadata">

**Author:** [@michaeln](https://www.ruby-forum.com/u/michaeln)\
**Replies:** 4\
**Last updated:** [April 8, 2009, 9:01am UTC](https://www.ruby-forum.com/t/ann-wee-2-0-0-released-rack-continuations-refactoring/164919 "2009-04-08T09:01:25Z")

</div>

Hi all, Around 4 years have passed since the last release of Wee. What is Wee? Wee is a Seaside-inspired 1 web-framework for building highly-dynamic component-based web-applications. What’s new? 100% Rack based Su…

---

## [Can't find table with ActiveRecord in different thread](https://www.ruby-forum.com/t/cant-find-table-with-activerecord-in-different-thread/164659)

<div class="topic-metadata">

**Author:** [@juan\_zanos](https://www.ruby-forum.com/u/juan_zanos)\
**Replies:** 4\
**Last updated:** [April 8, 2009, 7:24am UTC](https://www.ruby-forum.com/t/cant-find-table-with-activerecord-in-different-thread/164659 "2009-04-08T07:24:47Z")

</div>

Hi, I’m not sure if this is a ruby question or a rails question. If I create an ActiveRecord table in one thread I can’t find it in another thread, which I’d like to be able to do. Interestingly, this behavior seem…

---

## [Extremely hard to install rubygems on hpux](https://www.ruby-forum.com/t/extremely-hard-to-install-rubygems-on-hpux/164931)

<div class="topic-metadata">

**Author:** [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Replies:** 3\
**Last updated:** [April 8, 2009, 2:54am UTC](https://www.ruby-forum.com/t/extremely-hard-to-install-rubygems-on-hpux/164931 "2009-04-08T02:54:34Z")

</div>

hi, all. after installing ruby 1.8.7.p72 successfully, I tried to install rubygems.1.3.1. It seems to be normally installed. but, when I execute it, the errors is generated. #\> gem update /usr/local/lib/ruby/site\_r…

---

## [Review: GzipWriter.open](https://www.ruby-forum.com/t/review-gzipwriter-open/164971)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 3\
**Last updated:** [April 7, 2009, 11:54pm UTC](https://www.ruby-forum.com/t/review-gzipwriter-open/164971 "2009-04-07T23:54:26Z")

</div>

---

## [Running ruby1.9 bytecode](https://www.ruby-forum.com/t/running-ruby1-9-bytecode/164840)

<div class="topic-metadata">

**Author:** [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Replies:** 7\
**Last updated:** [April 7, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/running-ruby1-9-bytecode/164840 "2009-04-07T23:02:55Z")

</div>

Hi all, I just found out about the VM::InstructionSequence.compile method for turning Ruby code strings into ruby1.9 bytecode. Is there a standard method of de/serializing this bytecode to/from files, and is there a …

---

## [Re: Review: GzipWriter.open](https://www.ruby-forum.com/t/re-review-gzipwriter-open/164975)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [April 7, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/re-review-gzipwriter-open/164975 "2009-04-07T23:02:20Z")

</div>

My bad. These look fine as is then. jD

---

## [Regex select multiple words in the middle of a sentence](https://www.ruby-forum.com/t/regex-select-multiple-words-in-the-middle-of-a-sentence/164914)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 10\
**Last updated:** [April 7, 2009, 10:11pm UTC](https://www.ruby-forum.com/t/regex-select-multiple-words-in-the-middle-of-a-sentence/164914 "2009-04-07T22:11:52Z")

</div>

hello, Given a sentence with some words, I want only some words but not all of them … REGISTRO DE LA PROPIEDAD DE ALBACETE X EMISOR: MANUELA ADORACION CEBOLLA GARCIA Padre Romano, 12 2005 ALBACETE ALBACETE NIF: 44444…

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

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