# Ruby

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

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

---

## [When run from cron, regex NEVER match, always give nil](https://www.ruby-forum.com/t/when-run-from-cron-regex-never-match-always-give-nil/173984)

<div class="topic-metadata">

**Author:** [@jimdeuc](https://www.ruby-forum.com/u/jimdeuc)\
**Replies:** 6\
**Last updated:** [August 20, 2009, 4:19am UTC](https://www.ruby-forum.com/t/when-run-from-cron-regex-never-match-always-give-nil/173984 "2009-08-20T04:19:27Z")

</div>

I’m using ruby 1.8.6 on RHEL 5.3. I also had this problem with ruby 1.8.5 that comes with RHEL. I had hoped the ruby upgrade would fix it but it didn’t. Anyway, no regexps will match, even the most blatant matches, wh…

---

## [If defined on var](https://www.ruby-forum.com/t/if-defined-on-var/173990)

<div class="topic-metadata">

**Author:** [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Replies:** 6\
**Last updated:** [August 20, 2009, 2:22am UTC](https://www.ruby-forum.com/t/if-defined-on-var/173990 "2009-08-20T02:22:20Z")

</div>

db = Amalgalite::Database.new("/usr/local/vrep/repo/db/development.sqlite3") table\_exists = db.execute(“select name from sqlite\_master where type=‘table’ and tbl\_name=‘derek’”) if defined?(table\_exists) p “yes” end …

---

## [Using third party java classes (It must be something simple)](https://www.ruby-forum.com/t/using-third-party-java-classes-it-must-be-something-simple/174048)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 0\
**Last updated:** [August 20, 2009, 2:09am UTC](https://www.ruby-forum.com/t/using-third-party-java-classes-it-must-be-something-simple/174048 "2009-08-20T02:09:06Z")

</div>

I’ve been using ruby for a while, but I’m know to both Java and JRuby. In spite of that, I’m trying to use JRuby on the Google App Engine. It is working well except when I try to use the “appengine-apis” gem. My envir…

---

## [Vlad-git 2.0.0 Released](https://www.ruby-forum.com/t/vlad-git-2-0-0-released/174045)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 0\
**Last updated:** [August 20, 2009, 12:48am UTC](https://www.ruby-forum.com/t/vlad-git-2-0-0-released/174045 "2009-08-20T00:48:45Z")

</div>

vlad-git version 2.0.0 has been released! http://github.com/jbarnette/vlad-git http://rubyforge.org/projects/hitsquad Vlad plugin for Git support. This was previously part of Vlad, but all modules outside the core re…

---

## [Diff for 2 Text Files](https://www.ruby-forum.com/t/diff-for-2-text-files/151025)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 8\
**Last updated:** [August 20, 2009, 12:30am UTC](https://www.ruby-forum.com/t/diff-for-2-text-files/151025 "2009-08-20T00:30:35Z")

</div>

Is there an easy way available in Ruby to compare two text files and report the differences? thanks jack

---

## [Ruby 1.9 side by side with 1.8](https://www.ruby-forum.com/t/ruby-1-9-side-by-side-with-1-8/173806)

<div class="topic-metadata">

**Author:** [@oreng](https://www.ruby-forum.com/u/oreng)\
**Replies:** 10\
**Last updated:** [August 20, 2009, 12:09am UTC](https://www.ruby-forum.com/t/ruby-1-9-side-by-side-with-1-8/173806 "2009-08-20T00:09:31Z")

</div>

I followed this guide that uses ruby switcher - http://blog.thinkrelevance.com/2009/7/29/ruby-switcher-working-with-multiple-ruby-versions-has-never-been-this-easy/comments/11186#comment-11186 I switch to 1.9 with this…

---

## [Ruby2c 1.0.0.7 Released](https://www.ruby-forum.com/t/ruby2c-1-0-0-7-released/174005)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 6\
**Last updated:** [August 19, 2009, 10:34pm UTC](https://www.ruby-forum.com/t/ruby2c-1-0-0-7-released/174005 "2009-08-19T22:34:05Z")

</div>

ruby2c version 1.0.0.7 has been released! http://rubyforge.org/projects/ruby2c/ removed\_email\_address@domain.invalid \<removed\_email\_address@domain.invalid - mailing list\> ruby\_to\_c translates a static ruby subset to C…

---

## [A question with](https://www.ruby-forum.com/t/a-question-with/174019)

<div class="topic-metadata">

**Author:** [@Im\_still](https://www.ruby-forum.com/u/Im_still)\
**Replies:** 3\
**Last updated:** [August 19, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/a-question-with/174019 "2009-08-19T19:58:58Z")

</div>

hi when im running a code like this a = 0 Thread.start{ while true puts "#{a+=1}" end } This will be terminated automatically but wont keep on looping as expected. And by my test, the running result wil…

---

## [One-click Windows installer for Ruby 1.9](https://www.ruby-forum.com/t/one-click-windows-installer-for-ruby-1-9/173952)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 7\
**Last updated:** [August 19, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/one-click-windows-installer-for-ruby-1-9/173952 "2009-08-19T19:45:29Z")

</div>

Hi, Does anyone know when they’re be a one-click installer for Ruby 1.9? I really don’t trust the .zip file that’s on the Ruby site now. There’s no real install script for it. I’m too dumb to do any kind of “manual” …

---

## [Windows GUI automation question](https://www.ruby-forum.com/t/windows-gui-automation-question/174035)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 7:01pm UTC](https://www.ruby-forum.com/t/windows-gui-automation-question/174035 "2009-08-19T19:01:34Z")

</div>

Dear all, I want to use Ruby to automate some Windows GUI application. I tried to use WET (Ruby gem: wet-winobj), because in this book: Pragmatic Bookshelf: By Developers, For Developers , it is promised that using t…

---

## [StopIteration#result](https://www.ruby-forum.com/t/stopiteration-result/173953)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 9\
**Last updated:** [August 19, 2009, 6:56pm UTC](https://www.ruby-forum.com/t/stopiteration-result/173953 "2009-08-19T18:56:18Z")

</div>

StopIteration#result e$B$r?7@\_$9$k$N$O$I$&$G$7$g$&e(B? e$B0J2\<$NNc$G!"e(BStopIteration#result e$B$O!"e(B(e$B%V%m%C%/$D$-$Ne(B) Array#each e$B$NJV$jCM$rJV$7$^$9!#e(B a = \[1,2,3\] e = a.enum\_for(:each) p e.next #=\> 1 …

---

## [\[Bug #1919\] sparc-solaris-2.10 $B$G(B 1.9.2-preview1 $B$,%S%k%I$G$-$J$$(B](https://www.ruby-forum.com/t/bug-1919-sparc-solaris-2-10-b-g-b-1-9-2-preview1-b-s-k-i-g-j-b/173536)

<div class="topic-metadata">

**Author:** [@Naohisa\_G](https://www.ruby-forum.com/u/Naohisa_G)\
**Replies:** 2\
**Last updated:** [August 19, 2009, 6:10pm UTC](https://www.ruby-forum.com/t/bug-1919-sparc-solaris-2-10-b-g-b-1-9-2-preview1-b-s-k-i-g-j-b/173536 "2009-08-19T18:10:03Z")

</div>

e$B%A%1%C%He(B #1919 e$B$,99?7$5$l$^$7$?!#e(B (by Naohisa G.) e$B%U%!%$%ke(B config.h e$BDI2Ce(B Solaris e$B$Ne(B readdir\_r e$B$K$D$$$FD4$Y$F$\_$?$H$3$m!"e(B “readdir\_r considered harmful” http://womble.decadentplace.…

---

## [\[Bug #1957\] NKF.nkf $B$G%7%U%H(BJIS$B$N(B "\\e" $B$,(B "" $B$KJQ49$5$l$k(B](https://www.ruby-forum.com/t/bug-1957-nkf-nkf-b-g-7-u-h-bjis-b-n-b-e-b-b-b-kjq49-5-l-k-b/174027)

<div class="topic-metadata">

**Author:** [@masa16](https://www.ruby-forum.com/u/masa16)\
**Replies:** 0\
**Last updated:** [August 19, 2009, 5:34pm UTC](https://www.ruby-forum.com/t/bug-1957-nkf-nkf-b-g-7-u-h-bjis-b-n-b-e-b-b-b-kjq49-5-l-k-b/174027 "2009-08-19T17:34:21Z")

</div>

e$B%A%1%C%He(B #1957 e$B$,99?7$5$l$^$7$?!#e(B (by Masahiro T.) e$B8D?ME\*$K$O$3$N$^$^$G$b:$$k$3$H$O$J$$$G$9!#e(B e$B%P%0$i$7$-5sF0$@$C$?$N$G$H$j$“$($:EPO?$7$^$7$?!#e(B e$B$J$N$G!”$3$N$^$^%/%m!\<%:$7$F$b$i$C$F$b9=$$$^$;…

---

## [Named Matrix like ArrayFields](https://www.ruby-forum.com/t/named-matrix-like-arrayfields/173896)

<div class="topic-metadata">

**Author:** [@dbf](https://www.ruby-forum.com/u/dbf)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/named-matrix-like-arrayfields/173896 "2009-08-19T14:52:47Z")

</div>

I’m looking for a named matrix that acts like arrayfields so you can get and set cells based on a name and/or an index. This is array fields \<http://codeforpeople.com/lib/ruby/arrayfields/ arrayfields-4.7.0/\> : req…

---

## [Array#abbrev depreciated?](https://www.ruby-forum.com/t/array-abbrev-depreciated/173791)

<div class="topic-metadata">

**Author:** [@leveille](https://www.ruby-forum.com/u/leveille)\
**Replies:** 6\
**Last updated:** [August 19, 2009, 12:49pm UTC](https://www.ruby-forum.com/t/array-abbrev-depreciated/173791 "2009-08-19T12:49:50Z")

</div>

If you look at the core ruby doc, it says Array#abbrev will let you do this: %w{ car cone }.abbrev #=\> { “ca” =\> “car”, “car” =\> “car”, “co” =\> “cone”, “con” =\> cone", “cone” =\> “cone” } But if I try this in IRB, …

---

## [Copying values from a different file into variables](https://www.ruby-forum.com/t/copying-values-from-a-different-file-into-variables/173918)

<div class="topic-metadata">

**Author:** [@shekarls](https://www.ruby-forum.com/u/shekarls)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 12:30pm UTC](https://www.ruby-forum.com/t/copying-values-from-a-different-file-into-variables/173918 "2009-08-19T12:30:31Z")

</div>

I would like to copy specific lines(contents) from file1 into file2. File1 has following information: browser = “firefox” id = “removed\_email\_address@domain.invalid” password= “12345678” account = “Yes” I want the f…

---

## [\[Feature #1951\] open$B$N(BBOM$B;XDj3HD%(B](https://www.ruby-forum.com/t/feature-1951-open-b-n-bbom-b-xdj3hd-b/173947)

<div class="topic-metadata">

**Author:** [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Replies:** 4\
**Last updated:** [August 19, 2009, 10:48am UTC](https://www.ruby-forum.com/t/feature-1951-open-b-n-bbom-b-xdj3hd-b/173947 "2009-08-19T10:48:40Z")

</div>

Feature #1951: opene$B$Ne(BBOMe$B;XDj3HD%e(B http://redmine.ruby-lang.org/issues/show/1951 e$B5/I\<\<Te(B: Yui NARUSE e$B%9%F!\<%?%9e(B: Assigned, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Yui NARUSE #747e$B$He(B#802e$B$G5DO@…

---

## [Relative Path in ruby - for File open](https://www.ruby-forum.com/t/relative-path-in-ruby-for-file-open/174002)

<div class="topic-metadata">

**Author:** [@shekarls](https://www.ruby-forum.com/u/shekarls)\
**Replies:** 3\
**Last updated:** [August 19, 2009, 10:24am UTC](https://www.ruby-forum.com/t/relative-path-in-ruby-for-file-open/174002 "2009-08-19T10:24:35Z")

</div>

Hi Guys, I am trying to fetch a file to do some processing in ruby, instead of giving the absolute path i wanted to give relative path. File.open(“config.txt”) do |source| source.each\_line do |line| if line =~ /^(\\w…

---

## [Fromdos dos2unix in ruby](https://www.ruby-forum.com/t/fromdos-dos2unix-in-ruby/173933)

<div class="topic-metadata">

**Author:** [@ciapecki](https://www.ruby-forum.com/u/ciapecki)\
**Replies:** 17\
**Last updated:** [August 19, 2009, 9:35am UTC](https://www.ruby-forum.com/t/fromdos-dos2unix-in-ruby/173933 "2009-08-19T09:35:29Z")

</div>

how can I achieve in ruby the result of running: fromdos dos\_file.txt unix\_file.txt or in vim: set ff=unix ? thanks, chris

---

## [How to Get the list of MenuBars in excel using ruby](https://www.ruby-forum.com/t/how-to-get-the-list-of-menubars-in-excel-using-ruby/173927)

<div class="topic-metadata">

**Author:** [@vamsi](https://www.ruby-forum.com/u/vamsi)\
**Replies:** 2\
**Last updated:** [August 19, 2009, 9:09am UTC](https://www.ruby-forum.com/t/how-to-get-the-list-of-menubars-in-excel-using-ruby/173927 "2009-08-19T09:09:15Z")

</div>

Hi, i’m trying to get the list of menubars in the excel using ruby i can able to get the menubars count but unable to get the list of menu bars. my idea is to get the list of menubars and click on a perticular menu …

---

## [Good tuyorial for ruby](https://www.ruby-forum.com/t/good-tuyorial-for-ruby/174001)

<div class="topic-metadata">

**Author:** [@praveenosi](https://www.ruby-forum.com/u/praveenosi)\
**Replies:** 2\
**Last updated:** [August 19, 2009, 7:57am UTC](https://www.ruby-forum.com/t/good-tuyorial-for-ruby/174001 "2009-08-19T07:57:43Z")

</div>

Hi, Iam new to ruby.Can any suggest good tutorial for ruby.Iam also working on Watir.If anybody know about watir ,suggest good tutorial for watir also.

---

## [External Model Definition Using ActiveRecord](https://www.ruby-forum.com/t/external-model-definition-using-activerecord/173911)

<div class="topic-metadata">

**Author:** [@Elizabeth](https://www.ruby-forum.com/u/Elizabeth)\
**Replies:** 4\
**Last updated:** [August 19, 2009, 7:12am UTC](https://www.ruby-forum.com/t/external-model-definition-using-activerecord/173911 "2009-08-19T07:12:39Z")

</div>

I’ve been Googling this topic, and I haven’t found the answer. In Rails, the Models are defined in external files. How do you use externally defined models in Ruby using ActiveRecord. I have a rails app and a ruby a…

---

## [Vlad 2.0.0 Released](https://www.ruby-forum.com/t/vlad-2-0-0-released/173994)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 6:06am UTC](https://www.ruby-forum.com/t/vlad-2-0-0-released/173994 "2009-08-19T06:06:32Z")

</div>

vlad version 2.0.0 has been released! http://rubyhitsquad.com/ http://rubyforge.org/projects/hitsquad/ Vlad the Deployer is pragmatic application deployment automation, without mercy. Much like Capistrano, but with 1…

---

## [Good editor for Windows Ruby](https://www.ruby-forum.com/t/good-editor-for-windows-ruby/173570)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 20\
**Last updated:** [August 19, 2009, 6:04am UTC](https://www.ruby-forum.com/t/good-editor-for-windows-ruby/173570 "2009-08-19T06:04:47Z")

</div>

Hello, I’ve been using ArachnoRuby for years and it’s served me well as an editor, but, now it’s showing problems. It doesn’t work with Ruby 1.9. And, it doesn’t work with the latest httpclient gem. I use that gem all …

---

## [Todo](https://www.ruby-forum.com/t/todo/173813)

<div class="topic-metadata">

**Author:** [@slavix](https://www.ruby-forum.com/u/slavix)\
**Replies:** 5\
**Last updated:** [August 19, 2009, 5:50am UTC](https://www.ruby-forum.com/t/todo/173813 "2009-08-19T05:50:08Z")

</div>

What is the correct (if any) way to mark code with todo sign (#todo, @todo, …)?

---

## [Vlad-perforce 2.0.0 Released](https://www.ruby-forum.com/t/vlad-perforce-2-0-0-released/173996)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [August 19, 2009, 5:41am UTC](https://www.ruby-forum.com/t/vlad-perforce-2-0-0-released/173996 "2009-08-19T05:41:57Z")

</div>

vlad-perforce version 2.0.0 has been released! http://rubyforge.org/projects/hitsquad Vlad plugin providing perforce support. This was previously available in vlad but all extra modules outside of the core recipe hav…

---

## [\[Bug #1957\] NKF.nkf $B$G%7%U%H(BJIS$B$N(B "\\e" $B$,(B "" $B$KJQ49$5$l$k(B](https://www.ruby-forum.com/t/bug-1957-nkf-nkf-b-g-7-u-h-bjis-b-n-b-e-b-b-b-kjq49-5-l-k-b/173989)

<div class="topic-metadata">

**Author:** [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Replies:** 0\
**Last updated:** [August 19, 2009, 3:57am UTC](https://www.ruby-forum.com/t/bug-1957-nkf-nkf-b-g-7-u-h-bjis-b-n-b-e-b-b-b-kjq49-5-l-k-b/173989 "2009-08-19T03:57:11Z")

</div>

e$B%A%1%C%He(B #1957 e$B$,99?7$5$l$^$7$?!#e(B (by Yui NARUSE) e$B8=\>u\<N$F$F$$$^$9$M!#e(B e$B;D$7$F$\*$$$?J}$,$$$$$G$9$+e(B? e$B$^$?!"$3$NJQ99$Oe(B1.8.7e$B$N%Q%C%A%j%j!\<%9$K$b4^$a$?$$$G$9$+e(B? http://redmine.ruby-lang…

---

## [\[Bug #1957\] NKF.nkf $B$G%7%U%H(BJIS$B$N(B "\\e" $B$,(B "" $B$KJQ49$5$l$k(B](https://www.ruby-forum.com/t/bug-1957-nkf-nkf-b-g-7-u-h-bjis-b-n-b-e-b-b-b-kjq49-5-l-k-b/173991)

<div class="topic-metadata">

**Author:** [@masa16](https://www.ruby-forum.com/u/masa16)\
**Replies:** 0\
**Last updated:** [August 19, 2009, 3:28am UTC](https://www.ruby-forum.com/t/bug-1957-nkf-nkf-b-g-7-u-h-bjis-b-n-b-e-b-b-b-kjq49-5-l-k-b/173991 "2009-08-19T03:28:29Z")

</div>

Bug #1957: NKF.nkf e$B$G%7%U%He(BJISe$B$Ne(B “\\e” e$B$,e(B “” e$B$KJQ49$5$l$ke(B http://redmine.ruby-lang.org/issues/show/1957 e$B5/I\<\<Te(B: Masahiro T. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal ruby -v: ruby 1.8…

---

## [Problem with Net::SFTP](https://www.ruby-forum.com/t/problem-with-net-sftp/173983)

<div class="topic-metadata">

**Author:** [@robintw](https://www.ruby-forum.com/u/robintw)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 3:27am UTC](https://www.ruby-forum.com/t/problem-with-net-sftp/173983 "2009-08-19T03:27:39Z")

</div>

I apologize if this is not the right place to post a message about a gem like Net::SFTP - if there is a more appropriate forum please let me know. When I try to connect to one SFTP server, everything works great. Thi…

---

## [Problem with Net::SFTP](https://www.ruby-forum.com/t/problem-with-net-sftp/173986)

<div class="topic-metadata">

**Author:** [@robintw](https://www.ruby-forum.com/u/robintw)\
**Replies:** 1\
**Last updated:** [August 19, 2009, 3:26am UTC](https://www.ruby-forum.com/t/problem-with-net-sftp/173986 "2009-08-19T03:26:25Z")

</div>

I apologize if this is not the right place to post a message about a gem like Net::SFTP - if there is a more appropriate forum please let me know. When I try to connect to one SFTP server, everything works great. Thi…

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

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