# Ruby

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

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

---

## [Credit card](https://www.ruby-forum.com/t/credit-card/140003)

<div class="topic-metadata">

**Author:** [@MERLIN](https://www.ruby-forum.com/u/MERLIN)\
**Replies:** 0\
**Last updated:** [June 10, 2008, 12:15am UTC](https://www.ruby-forum.com/t/credit-card/140003 "2008-06-10T00:15:37Z")

</div>

---

## [Ruby wishlist](https://www.ruby-forum.com/t/ruby-wishlist/139853)

<div class="topic-metadata">

**Author:** [@jzakiya](https://www.ruby-forum.com/u/jzakiya)\
**Replies:** 22\
**Last updated:** [June 10, 2008, 12:14am UTC](https://www.ruby-forum.com/t/ruby-wishlist/139853 "2008-06-10T00:14:26Z")

</div>

You can do this: n1, n2, n3, n4 = nil But you can’t do this: n1, n2, n3, n4 = \[something\] And you can’t do this: n1, n2, n3, n4 \[+,-,\*, etc\]= \[something\] I really wish you could. I would make some of my code so …

---

## [Ruby Profiler](https://www.ruby-forum.com/t/ruby-profiler/139773)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 9\
**Last updated:** [June 9, 2008, 11:50pm UTC](https://www.ruby-forum.com/t/ruby-profiler/139773 "2008-06-09T23:50:52Z")

</div>

Hello, I’m looking for a program to profile my non-rails ruby program… I found ruby-prof, can that do the job? if it does, I have no idea how to install and run it to profile my programs =( Thanks for your help

---

## [Desktop multi-plataform ruby app](https://www.ruby-forum.com/t/desktop-multi-plataform-ruby-app/139774)

<div class="topic-metadata">

**Author:** [@Israel\_G](https://www.ruby-forum.com/u/Israel_G)\
**Replies:** 59\
**Last updated:** [June 9, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/desktop-multi-plataform-ruby-app/139774 "2008-06-09T23:15:09Z")

</div>

Hail everyone! This is my first post here. :slight\_smile: I want to develop a desktop app that runs in either linux or windows. I have many doubts about which GUI i should use. What’s the best option? I heard about …

---

## [Making a gem](https://www.ruby-forum.com/t/making-a-gem/139902)

<div class="topic-metadata">

**Author:** [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Replies:** 3\
**Last updated:** [June 9, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/making-a-gem/139902 "2008-06-09T22:58:42Z")

</div>

Hello! I’d like to release a Gem on Rubyforge and I need some help. I have created most of my project using Hoe and the gem builds and installs locally properly. When I try to release though (rake release VERSION=1.0…

---

## [Require mysql do not work](https://www.ruby-forum.com/t/require-mysql-do-not-work/139987)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [June 9, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/require-mysql-do-not-work/139987 "2008-06-09T22:18:06Z")

</div>

Hello guys, I am new to Ruby. I have been working with the core language so far without problems. Now I am starting to use mysql. I have installed it with gem install mysql, and it work perfectly. If I run gem list, …

---

## [Loading extensions and embedding](https://www.ruby-forum.com/t/loading-extensions-and-embedding/139992)

<div class="topic-metadata">

**Author:** [@Remi\_Gillig](https://www.ruby-forum.com/u/Remi_Gillig)\
**Replies:** 0\
**Last updated:** [June 9, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/loading-extensions-and-embedding/139992 "2008-06-09T22:06:21Z")

</div>

Hello, I’m trying to load the statically linked extensions. Ruby (1.8.7) was compiled using the “–with-static-linked-ext” flag. I made a little program that loads and runs a Ruby script. Unfortunately, the extensions…

---

## [Net::SSH problems](https://www.ruby-forum.com/t/net-ssh-problems/139730)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 4\
**Last updated:** [June 9, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/net-ssh-problems/139730 "2008-06-09T21:56:11Z")

</div>

I am trying to connect to one of our UNIX servers. I can connect and can validate myself but I cant seem to figure out how to ‘cd’ to another directory besides my ‘/home’ directory and then execute commands from the n…

---

## [Rexml & nested loops](https://www.ruby-forum.com/t/rexml-nested-loops/139839)

<div class="topic-metadata">

**Author:** [@Paul\_Ash](https://www.ruby-forum.com/u/Paul_Ash)\
**Replies:** 4\
**Last updated:** [June 9, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/rexml-nested-loops/139839 "2008-06-09T21:21:03Z")

</div>

I’m a bit of a newbie to Ruby, and to xpath… and hoping someone here can give me the one-liner version of why this is failing. I have an XML structure like: Foo1 foobar1 foobar2 …

---

## [Ruby and Db2 (UDB) setting the Node (dbpartition)](https://www.ruby-forum.com/t/ruby-and-db2-udb-setting-the-node-dbpartition/139986)

<div class="topic-metadata">

**Author:** [@sxkundu](https://www.ruby-forum.com/u/sxkundu)\
**Replies:** 0\
**Last updated:** [June 9, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/ruby-and-db2-udb-setting-the-node-dbpartition/139986 "2008-06-09T20:43:25Z")

</div>

Any idea on how to set the node (dbpartition)? The db2 CLP commands recongnize the partition set by the DB2NODE env. variable but the db2 api for ruby, still sees Node 0. db\_conn = IBM\_DB::connect “#{dbname}”, “#{user…

---

## [Auto\_complete not completing](https://www.ruby-forum.com/t/auto-complete-not-completing/139982)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 9, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/auto-complete-not-completing/139982 "2008-06-09T20:24:29Z")

</div>

Here is what I have done. In controller: auto\_complete\_for :search, :string Layouts/search.rhtml \<%=javascript\_include\_tag :defaults %\> Views/search: \<%= text\_field\_with\_auto\_complete ‘search’, ‘string’, :size =\> 35 %\>…

---

## [\[ruby1.9\] rb\_argv0](https://www.ruby-forum.com/t/ruby1-9-rb-argv0/139977)

<div class="topic-metadata">

**Author:** [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Replies:** 0\
**Last updated:** [June 9, 2008, 7:44pm UTC](https://www.ruby-forum.com/t/ruby1-9-rb-argv0/139977 "2008-06-09T19:44:23Z")

</div>

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B revision 17039 e$B$Ge(B \* ruby.c (rb\_argv0): no longer used. e$B$H$J$C$?$h$&$G$9$M!%e(B Ruby/Tk e$B$G$Oe(B rb\_argv0 e$B$re(B (rb\_argv0 ? RSTRING\_PTR(rb\_argv0) : 0) e$B$J$I$He(B e$B;H$…

---

## [Net::SSH 'channel\_failure: 0' Error on Remote Host](https://www.ruby-forum.com/t/net-ssh-channel-failure-0-error-on-remote-host/137244)

<div class="topic-metadata">

**Author:** [@Mike7739](https://www.ruby-forum.com/u/Mike7739)\
**Replies:** 4\
**Last updated:** [June 9, 2008, 7:16pm UTC](https://www.ruby-forum.com/t/net-ssh-channel-failure-0-error-on-remote-host/137244 "2008-06-09T19:16:09Z")

</div>

Hi, I am having trouble with the Net::SSH:start() function on one device, but not another. During a DEBUG I receive a ‘channel\_failure: 0’ error resulting in the commands passed to my exec!() function not executing o…

---

## [Ruby 1.8.7-p17 has been released](https://www.ruby-forum.com/t/ruby-1-8-7-p17-has-been-released/139958)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 3\
**Last updated:** [June 9, 2008, 6:32pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-p17-has-been-released/139958 "2008-06-09T18:32:09Z")

</div>

Folks, I am pleased to announce Ruby 1.8.7-p17, the latest patch release from the Ruby 1.8.7 series. This release fixes several problems and bugs found and reported in the 1.8.7 release to improve stabilities and com…

---

## [Jruby runs faster with "-r profile" then without](https://www.ruby-forum.com/t/jruby-runs-faster-with-r-profile-then-without/139772)

<div class="topic-metadata">

**Author:** [@cwolfinger](https://www.ruby-forum.com/u/cwolfinger)\
**Replies:** 9\
**Last updated:** [June 9, 2008, 5:39pm UTC](https://www.ruby-forum.com/t/jruby-runs-faster-with-r-profile-then-without/139772 "2008-06-09T17:39:44Z")

</div>

Hello - My development team is trying to track down a performance problem within our ruby code and we are using jruby 1.1.2. In an attempt to determine the bottleneck we are running jruby with the -r profile option …

---

## [Changing the environment for current process](https://www.ruby-forum.com/t/changing-the-environment-for-current-process/139867)

<div class="topic-metadata">

**Author:** [@Tammo\_T](https://www.ruby-forum.com/u/Tammo_T)\
**Replies:** 1\
**Last updated:** [June 9, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/changing-the-environment-for-current-process/139867 "2008-06-09T17:09:36Z")

</div>

I have the following situation: I require an additional library, not part of the current search path. I have done that simply by: $:.push() and that would work fine if I would not need shared libs. I tried to simply…

---

## [Flag this message private class methods- functionality or shortcoming?](https://www.ruby-forum.com/t/flag-this-message-private-class-methods-functionality-or-shortcoming/139961)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 9, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/flag-this-message-private-class-methods-functionality-or-shortcoming/139961 "2008-06-09T16:17:45Z")

</div>

My apologies for resending but there were some formatting errors in the code. I just switched to Ruby and came across it. If we have to make a class method private then we should write it as: class Abc class\<\<self …

---

## [Versions to run on Tomcat in Windows](https://www.ruby-forum.com/t/versions-to-run-on-tomcat-in-windows/139871)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 2\
**Last updated:** [June 9, 2008, 3:48pm UTC](https://www.ruby-forum.com/t/versions-to-run-on-tomcat-in-windows/139871 "2008-06-09T15:48:17Z")

</div>

Hi you all, I’ve recently post a comment and a bug, because, after generating a Rails app with JRuby and executing correctly in Mongrel, the .war generated by Warbler does not work. My question now is, anybody out th…

---

## [Overwrite a File (rexml)](https://www.ruby-forum.com/t/overwrite-a-file-rexml/139864)

<div class="topic-metadata">

**Author:** [@robtotheb](https://www.ruby-forum.com/u/robtotheb)\
**Replies:** 2\
**Last updated:** [June 9, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/overwrite-a-file-rexml/139864 "2008-06-09T15:21:41Z")

</div>

Hello, I am trying to get some simple create/update/delete xml-element to work with REXML, but I run into trouble when writing to file. Here’s a code example: def save file = File.open(@@filePath, “r+”) doc = Docum…

---

## [Finding duplicated lines in folder for refactoring purposes](https://www.ruby-forum.com/t/finding-duplicated-lines-in-folder-for-refactoring-purposes/139937)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 9, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/finding-duplicated-lines-in-folder-for-refactoring-purposes/139937 "2008-06-09T14:31:32Z")

</div>

Hello. I am wondering if anyone knows of a good trick to identify duplicated lines in a directory for refactoring purposes. The idea is this: If I can get a listing of all lines, by file in a directory (recursively) …

---

## [KNOWNBUGS.rb](https://www.ruby-forum.com/t/knownbugs-rb/139953)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 0\
**Last updated:** [June 9, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/knownbugs-rb/139953 "2008-06-09T14:26:48Z")

</div>

Hi, I move “bootstraptest/test\_knownbug.rb” to “./KNOWNBUGS.rb”. Before this change, “make test” runs: run sample/test.rb run bootstraptest/test\_\*.rb (2) runs all of test codes and results of test\_knownbug.rb is mix…

---

## [Autoit::watir outlook web access login pop up](https://www.ruby-forum.com/t/autoit-watir-outlook-web-access-login-pop-up/139951)

<div class="topic-metadata">

**Author:** [@devabrat](https://www.ruby-forum.com/u/devabrat)\
**Replies:** 0\
**Last updated:** [June 9, 2008, 2:14pm UTC](https://www.ruby-forum.com/t/autoit-watir-outlook-web-access-login-pop-up/139951 "2008-06-09T14:14:51Z")

</div>

Hi I have a script to login into outlook Web access When I run this def logon(title,name = ‘Connect to 192.2.24.88’,password = ‘john doe’) @autoit.WinWait title, “” @autoit.Send “devabrat” @autoit.Send “{TAB}” @au…

---

## [String extraction using RegExp](https://www.ruby-forum.com/t/string-extraction-using-regexp/139938)

<div class="topic-metadata">

**Author:** [@upgundecha](https://www.ruby-forum.com/u/upgundecha)\
**Replies:** 2\
**Last updated:** [June 9, 2008, 12:51pm UTC](https://www.ruby-forum.com/t/string-extraction-using-regexp/139938 "2008-06-09T12:51:37Z")

</div>

Hi, I want to extract “New User Registration” and “New User” from a string as follows. I am using RegExp for this. r1 = Regexp.new(’("(\[^.\]\*)")’) matches = r1.match(‘Page(“New User Registration”).Frame(“New User”)’) …

---

## [Problems when building C extensions with ruby 1.8.7](https://www.ruby-forum.com/t/problems-when-building-c-extensions-with-ruby-1-8-7/139933)

<div class="topic-metadata">

**Author:** [@crocco](https://www.ruby-forum.com/u/crocco)\
**Replies:** 1\
**Last updated:** [June 9, 2008, 12:51pm UTC](https://www.ruby-forum.com/t/problems-when-building-c-extensions-with-ruby-1-8-7/139933 "2008-06-09T12:51:17Z")

</div>

Hello to everyone. Today, I just tried installing ruby 1.8.7, and now I’m having problems compiling a C extension for it. In particular, the extension was svn version of korundum/qt-ruby, which compiled correctly wit…

---

## [Trying to duplicate Phil Haack's example](https://www.ruby-forum.com/t/trying-to-duplicate-phil-haacks-example/139886)

<div class="topic-metadata">

**Author:** [@akinsgre](https://www.ruby-forum.com/u/akinsgre)\
**Replies:** 11\
**Last updated:** [June 9, 2008, 12:34pm UTC](https://www.ruby-forum.com/t/trying-to-duplicate-phil-haacks-example/139886 "2008-06-09T12:34:11Z")

</div>

Using rev 113, I tried to duplicate Phil H.'s blog post (here My First IronRuby Unit Test Spec For ASP.NET MVC | You’ve Been Haacked) I downloaded Rspec 1.1.4 and ran the exact code from the blog; setting the path on …

---

## [\[Ruby 1.8 - Bug #116\] (Open) SortedSet#each does not return self](https://www.ruby-forum.com/t/ruby-1-8-bug-116-open-sortedset-each-does-not-return-self/139892)

<div class="topic-metadata">

**Author:** [@Arthur\_Schreiber](https://www.ruby-forum.com/u/Arthur_Schreiber)\
**Replies:** 1\
**Last updated:** [June 9, 2008, 11:02am UTC](https://www.ruby-forum.com/t/ruby-1-8-bug-116-open-sortedset-each-does-not-return-self/139892 "2008-06-09T11:02:53Z")

</div>

Issue #116 has been reported by Arthur Schreiber. Bug #116: SortedSet#each does not return self http://redmine.ruby-lang.org/issues/show/116 Author: Arthur Schreiber Status: Open Priority: Normal Assigned to: Akin…

---

## [My first program just shuttin' down](https://www.ruby-forum.com/t/my-first-program-just-shuttin-down/139897)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 11\
**Last updated:** [June 9, 2008, 9:25am UTC](https://www.ruby-forum.com/t/my-first-program-just-shuttin-down/139897 "2008-06-09T09:25:04Z")

</div>

Why? I tryin’ to open the “hello.rb” program, but it just shuttin’ down why? The hello.rb file, look’s like this… #!/usr/bin/ruby print “Hello World” and by the way… is methods like functions and object’s in PHP? Co…

---

## [Singleton object vs. enhancing singleton class](https://www.ruby-forum.com/t/singleton-object-vs-enhancing-singleton-class/139921)

<div class="topic-metadata">

**Author:** [@Paul\_McMahon](https://www.ruby-forum.com/u/Paul_McMahon)\
**Replies:** 3\
**Last updated:** [June 9, 2008, 8:07am UTC](https://www.ruby-forum.com/t/singleton-object-vs-enhancing-singleton-class/139921 "2008-06-09T08:07:28Z")

</div>

In ruby, as class are singleton objects, does anyone have any ideas when a a singleton object should be used vs. simply adding methods to the class? For example, class Foo include Singleton def bar end end vs. c…

---

## [\[Bug:1.9\] SEGV by ./ruby -e ''](https://www.ruby-forum.com/t/bug-1-9-segv-by-ruby-e/139929)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [June 9, 2008, 8:02am UTC](https://www.ruby-forum.com/t/bug-1-9-segv-by-ruby-e/139929 "2008-06-09T08:02:47Z")

</div>

e$B0J2\<$N$h$&$Ke(B ./ruby -e ‘’ e$B$,e(B SEGV e$B$7$^$9!#e(B % ./ruby -e ‘’ ./ruby: \[BUG\] Segmentation fault ruby 1.9.0 (2008-06-09 revision 17041) \[i686-linux\] – stack frame ------------ 0000 (0xb7d36008): 00000004 …

---

## [Newbie question about rails on apache2](https://www.ruby-forum.com/t/newbie-question-about-rails-on-apache2/139920)

<div class="topic-metadata">

**Author:** [@Allan](https://www.ruby-forum.com/u/Allan)\
**Replies:** 1\
**Last updated:** [June 9, 2008, 8:01am UTC](https://www.ruby-forum.com/t/newbie-question-about-rails-on-apache2/139920 "2008-06-09T08:01:07Z")

</div>

Hi, I just setup my rails application on apache2, just a very simply controller, and one method /stats/show When go to the root page, I can see the rails default page, but if I go to any other page like stats/show …

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

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