# Ruby

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

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

---

## [\[Feature:1.9\] io/console](https://www.ruby-forum.com/t/feature-1-9-io-console/186139)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 4\
**Last updated:** [April 1, 2010, 4:33pm UTC](https://www.ruby-forum.com/t/feature-1-9-io-console/186139 "2010-04-01T16:33:11Z")

</div>

e$B$J$+$@$G$9!#e(B e$B3HD%%i%$%V%i%je(Bio/consolee$B$N\<h$j9~$\_$r%j%/%(%9%H$7$^$9!#e(B http://www.rubyist.net/~nobu/ruby/io-console-0.2.gem http://www.rubyist.net/~nobu/ruby/io-console-20080905.tar.bz2 readlinee$B$de(…

---

## [Weird hash key: what am I asking Ruby to do?](https://www.ruby-forum.com/t/weird-hash-key-what-am-i-asking-ruby-to-do/186119)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 3\
**Last updated:** [April 1, 2010, 4:10pm UTC](https://www.ruby-forum.com/t/weird-hash-key-what-am-i-asking-ruby-to-do/186119 "2010-04-01T16:10:55Z")

</div>

I decided to type the following in irb: irb(main):010:0\> a = {} =\> {} irb(main):015:0\> a\[lambda { x } =\> 5\] = 5 =\> 5 irb(main):016:0\> a =\> {{#Proc:0x028cb304@:15(irb)=\>5}=\>5} irb(main):017:0\> a = {} =\> {} irb(ma…

---

## [Rails JQuery issue](https://www.ruby-forum.com/t/rails-jquery-issue/186168)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/rails-jquery-issue/186168 "2010-04-01T15:32:48Z")

</div>

Hey all, When I place this in my base application html.haml file: = javascript\_include\_tag :defaults, 'jquery-1.3.2.min', 'highcharts' \<!--\[if IE\]\> javascript\_include\_tag 'excanvas.compiled' \<!\[endif\]--\> %script{:type …

---

## [Mysql gem installation](https://www.ruby-forum.com/t/mysql-gem-installation/186159)

<div class="topic-metadata">

**Author:** [@juba](https://www.ruby-forum.com/u/juba)\
**Replies:** 1\
**Last updated:** [April 1, 2010, 11:17am UTC](https://www.ruby-forum.com/t/mysql-gem-installation/186159 "2010-04-01T11:17:44Z")

</div>

Hi I have recently installed a gentoo bootstrap prefix on os x, but when I want to install the mysql gem, I have this issue : %\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\<%\< env ARCHFLAGS="-…

---

## [Help needed: weird native libs dependency issue (calling system fixes this)](https://www.ruby-forum.com/t/help-needed-weird-native-libs-dependency-issue-calling-system-fixes-this/186106)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 4\
**Last updated:** [April 1, 2010, 10:47am UTC](https://www.ruby-forum.com/t/help-needed-weird-native-libs-dependency-issue-calling-system-fixes-this/186106 "2010-04-01T10:47:53Z")

</div>

Hello, I’m facing something that I just don’t understand. I rely on a Java library (ARS) that uses JNI and native dll. If I set LD\_LIBRARY\_PATH then call system(“jruby -S rake my-task”) from my Rakefile, for instan…

---

## [A question about gem's ~\>](https://www.ruby-forum.com/t/a-question-about-gems/185904)

<div class="topic-metadata">

**Author:** [@alby](https://www.ruby-forum.com/u/alby)\
**Replies:** 9\
**Last updated:** [April 1, 2010, 10:26am UTC](https://www.ruby-forum.com/t/a-question-about-gems/185904 "2010-04-01T10:26:14Z")

</div>

I have a question about RubyGems’s “~\>”. Sorry for asking this here. I’ve searched in their “manual”, but it’s like searching a needle in a haystack. My question is simple: My gem works only on Ruby 1.8 (that is, it …

---

## [Each\_slice()](https://www.ruby-forum.com/t/each-slice/186130)

<div class="topic-metadata">

**Author:** [@alby](https://www.ruby-forum.com/u/alby)\
**Replies:** 9\
**Last updated:** [April 1, 2010, 9:59am UTC](https://www.ruby-forum.com/t/each-slice/186130 "2010-04-01T09:59:52Z")

</div>

I’m using the following code: some\_array.each\_slice(2).to\_a Now, I have a problem. I distribute my code as a gem, and I need to know from which version Ruby supports this each\_slice() syntax (I’ll put this version nu…

---

## [\[Bug #1234\] RDoc failure in benchmark/bm\_so\_meteor\_contest.rb at or around line 542 column](https://www.ruby-forum.com/t/bug-1234-rdoc-failure-in-benchmark-bm-so-meteor-contest-rb-at-or-around-line-542-column/161703)

<div class="topic-metadata">

**Author:** [@daigo\_moriwaki](https://www.ruby-forum.com/u/daigo_moriwaki)\
**Replies:** 2\
**Last updated:** [April 1, 2010, 9:51am UTC](https://www.ruby-forum.com/t/bug-1234-rdoc-failure-in-benchmark-bm-so-meteor-contest-rb-at-or-around-line-542-column/161703 "2010-04-01T09:51:40Z")

</div>

Bug #1234: RDoc failure in benchmark/bm\_so\_meteor\_contest.rb at or around line 542 column http://redmine.ruby-lang.org/issues/show/1234 e$B5/I\<\<Te(B: daigo moriwaki e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low Target v…

---

## [\[ANN\] Rumai 3.2.2 (2010-04-01)](https://www.ruby-forum.com/t/ann-rumai-3-2-2-2010-04-01/186151)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 9:33am UTC](https://www.ruby-forum.com/t/ann-rumai-3-2-2-2010-04-01/186151 "2010-04-01T09:33:22Z")

</div>

Rumai 3.2.2 (2010-04-01) Ruby interface to the wmii window manager http://snk.tuxfamily.org/lib/rumai/ Rumai is a \[1\]Ruby interface to the \[2\]wmii window manager. Version 3.2.2 (…

---

## [\[ANN\] Dfect 2.1.0 (2010-03-31)](https://www.ruby-forum.com/t/ann-dfect-2-1-0-2010-03-31/186150)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 8:57am UTC](https://www.ruby-forum.com/t/ann-dfect-2-1-0-2010-03-31/186150 "2010-04-01T08:57:17Z")

</div>

Dfect 2.1.0 (2010-03-31) Assertion testing library for Ruby http://snk.tuxfamily.org/lib/dfect/ Dfect is an assertion testing library for Ruby that emphasizes a simple asserti…

---

## [Rubygame 2.6.3, Nice-FFI 0.4](https://www.ruby-forum.com/t/rubygame-2-6-3-nice-ffi-0-4/186148)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 8:35am UTC](https://www.ruby-forum.com/t/rubygame-2-6-3-nice-ffi-0-4/186148 "2010-04-01T08:35:34Z")

</div>

Rubygame 2.6.3 and Nice-FFI 0.4 are now available – no foolin’! Both versions are maintenance releases to fix bugs reported by users. For details, please see the related blog posts: http://blog.rubygame.org/2010/03/3…

---

## [Rubygems update breaks other gems?](https://www.ruby-forum.com/t/rubygems-update-breaks-other-gems/185849)

<div class="topic-metadata">

**Author:** [@kgthegreat](https://www.ruby-forum.com/u/kgthegreat)\
**Replies:** 1\
**Last updated:** [April 1, 2010, 5:15am UTC](https://www.ruby-forum.com/t/rubygems-update-breaks-other-gems/185849 "2010-04-01T05:15:26Z")

</div>

Hello, I am on Ubuntu 9.10 I ran the following commands for a rubygems update from 1.3.5 to 1.3.6 $ sudo gem install update\_rubygems $ cd /var/lib/gems/1.8/bin $ sudo ./update\_rubygems $ gem -v 1.3.6 but afte…

---

## [Deployment Options](https://www.ruby-forum.com/t/deployment-options/185891)

<div class="topic-metadata">

**Author:** [@kturner](https://www.ruby-forum.com/u/kturner)\
**Replies:** 9\
**Last updated:** [April 1, 2010, 4:19am UTC](https://www.ruby-forum.com/t/deployment-options/185891 "2010-04-01T04:19:21Z")

</div>

Hi, I’m trying to figure out a strategy for deploying a JRuby intranet application. The server-side landscape has been confusing to me so far, trying to figure out the right one to use for this situation. So far, I’…

---

## [Error: uninitialized constant Mysql::Protocol::UNIXSocket](https://www.ruby-forum.com/t/error-uninitialized-constant-mysql-unixsocket/182861)

<div class="topic-metadata">

**Author:** [@shahab](https://www.ruby-forum.com/u/shahab)\
**Replies:** 14\
**Last updated:** [April 1, 2010, 4:16am UTC](https://www.ruby-forum.com/t/error-uninitialized-constant-mysql-unixsocket/182861 "2010-04-01T04:16:19Z")

</div>

/!\\ FAILSAFE /!\\ Wed Feb 03 23:02:50 +0500 2010 Status: 500 Internal Server Error uninitialized constant Mysql::Protocol::UNIXSocket C:/Program Files/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activesuppo…

---

## [\[Feature #2969\] String#to\_f $B$,(B -h.hhh$B!^(Bpd $B$r2r\<a$G$-$k$h$&$K(B](https://www.ruby-forum.com/t/feature-2969-string-to-f-b-b-h-hhh-b-bpd-b-r2r-a-g-k-h-k-b/186141)

<div class="topic-metadata">

**Author:** [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 3:43am UTC](https://www.ruby-forum.com/t/feature-2969-string-to-f-b-b-h-hhh-b-bpd-b-r2r-a-g-k-h-k-b/186141 "2010-04-01T03:43:32Z")

</div>

e$B%A%1%C%He(B #2969 e$B$,99?7$5$l$^$7$?!#e(B (by Yuki S.) String#to\_fe$B$d%j%F%i%k$K$O$A$g$C$Hm4m0$7$^$9$,!":#2s$O$=$l$OF~$i$J$$$H8@$&$3$H$G$9$N$G$$$\`$M:9$7;Y$($J$$$H;W$$$^$9!#e(B e$B1F6AHO0O$rFI$@Z$l$J$$ItJ,$,$“$k$N…

---

## [\[Feature #3068\] \[TypedData\] RUBY\_TYPED\_DEFAULT\_FREE $B$OI,MW(B?](https://www.ruby-forum.com/t/feature-3068-typeddata-ruby-typed-default-free-b-oi-mw-b/186114)

<div class="topic-metadata">

**Author:** [@sugie](https://www.ruby-forum.com/u/sugie)\
**Replies:** 2\
**Last updated:** [April 1, 2010, 2:16am UTC](https://www.ruby-forum.com/t/feature-3068-typeddata-ruby-typed-default-free-b-oi-mw-b/186114 "2010-04-01T02:16:21Z")

</div>

Feature #3068: \[TypedData\] RUBY\_TYPED\_DEFAULT\_FREE e$B$OI,MWe(B? http://redmine.ruby-lang.org/issues/show/3068 e$B5/I\<\<Te(B: Tadashi S. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B:XF#$H?=$7$^$9!#e(B 1.9.2e$B$+$…

---

## [How to solve this regular expression problem](https://www.ruby-forum.com/t/how-to-solve-this-regular-expression-problem/186132)

<div class="topic-metadata">

**Author:** [@amishera](https://www.ruby-forum.com/u/amishera)\
**Replies:** 6\
**Last updated:** [April 1, 2010, 1:52am UTC](https://www.ruby-forum.com/t/how-to-solve-this-regular-expression-problem/186132 "2010-04-01T01:52:26Z")

</div>

I have strings of this form: s = ‘C#039;era una volta il east’ I want to replace ‘#039;’ with the octal representation of 39 ie 47 so the string becomes s = ‘C\\47era una volta il east’ I have tried this: 1 def conv…

---

## [RubyDictionary - First Try](https://www.ruby-forum.com/t/rubydictionary-first-try/186058)

<div class="topic-metadata">

**Author:** [@maxmotor](https://www.ruby-forum.com/u/maxmotor)\
**Replies:** 12\
**Last updated:** [April 1, 2010, 1:30am UTC](https://www.ruby-forum.com/t/rubydictionary-first-try/186058 "2010-04-01T01:30:58Z")

</div>

Hello folks, Last week I started learning Ruby by the book The Ruby P.ming Language if it’s relevant. Today I decided to practise a little bit with my new knowledge by trying to develop my first “serious” application …

---

## [Boid writeup idea](https://www.ruby-forum.com/t/boid-writeup-idea/185840)

<div class="topic-metadata">

**Author:** [@thunk](https://www.ruby-forum.com/u/thunk)\
**Replies:** 29\
**Last updated:** [March 31, 2010, 11:31pm UTC](https://www.ruby-forum.com/t/boid-writeup-idea/185840 "2010-03-31T23:31:14Z")

</div>

Hi guys, I’m struggling with a write-up on my project, and aware that technically these things are not really Boids as somebody here with direct AI background pointed out. These program units that rather define the …

---

## [Need help installing ruby and libraries](https://www.ruby-forum.com/t/need-help-installing-ruby-and-libraries/186052)

<div class="topic-metadata">

**Author:** [@jasv](https://www.ruby-forum.com/u/jasv)\
**Replies:** 8\
**Last updated:** [March 31, 2010, 10:27pm UTC](https://www.ruby-forum.com/t/need-help-installing-ruby-and-libraries/186052 "2010-03-31T22:27:27Z")

</div>

Hello everybody… I want to install Redmine Project Management in my PC (Windows XP), whose requirement is Ruby On Rails. So I need to install Ruby on my machine and it is at that point where I’ve got my first problems…

---

## [Stetecting change in number of leading spaces while looping](https://www.ruby-forum.com/t/stetecting-change-in-number-of-leading-spaces-while-looping/186120)

<div class="topic-metadata">

**Author:** [@xtremebain](https://www.ruby-forum.com/u/xtremebain)\
**Replies:** 0\
**Last updated:** [March 31, 2010, 8:35pm UTC](https://www.ruby-forum.com/t/stetecting-change-in-number-of-leading-spaces-while-looping/186120 "2010-03-31T20:35:02Z")

</div>

I am looping through a file and using a script that detects leading spaces (based on a previous post to this forum) What I want to do is to detect changes in number of leading spaces, for instance when one line has mo…

---

## [Uninitialized constant CSV::Reader](https://www.ruby-forum.com/t/uninitialized-constant-csv-reader/185801)

<div class="topic-metadata">

**Author:** [@confundido](https://www.ruby-forum.com/u/confundido)\
**Replies:** 6\
**Last updated:** [March 31, 2010, 8:12pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-csv-reader/185801 "2010-03-31T20:12:58Z")

</div>

Hi, I’ve searched google and these forums but can’t find anything for this error i get. code in a file called test.rb require ‘csv’ CSV::Reader.parse(File.open(‘stuff.csv’, ‘rb’)) do |row| p row break if !row\[0\].is…

---

## [Pop Quiz: aliasing versus wrapping](https://www.ruby-forum.com/t/pop-quiz-aliasing-versus-wrapping/186067)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 3\
**Last updated:** [March 31, 2010, 7:37pm UTC](https://www.ruby-forum.com/t/pop-quiz-aliasing-versus-wrapping/186067 "2010-03-31T19:37:05Z")

</div>

Below are two files that differ only in the 2nd line of code in each. Can you guess what difference they will reveal? I must admit I was surprised when I ran into this. $ cat alias.rb class Object alias\_method :to\_j…

---

## [Saving to YAML not working as expected](https://www.ruby-forum.com/t/saving-to-yaml-not-working-as-expected/186015)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 8\
**Last updated:** [March 31, 2010, 7:31pm UTC](https://www.ruby-forum.com/t/saving-to-yaml-not-working-as-expected/186015 "2010-03-31T19:31:49Z")

</div>

I am following the Stock Portfolio post from RubyQuiz.com and it involves using YAML for its storage. Under ruby 1.8.7, the data is being saved and loaded with no problem. Under ironruby rc4, when it gets saved and t…

---

## [\[Feature #3065\] \[TypedData\] $B$H$$$&L\>A0$K$D$$$F(B](https://www.ruby-forum.com/t/feature-3065-typeddata-b-h-l-a0-k-d-f-b/186105)

<div class="topic-metadata">

**Author:** [@sugie](https://www.ruby-forum.com/u/sugie)\
**Replies:** 4\
**Last updated:** [March 31, 2010, 7:28pm UTC](https://www.ruby-forum.com/t/feature-3065-typeddata-b-h-l-a0-k-d-f-b/186105 "2010-03-31T19:28:53Z")

</div>

Feature #3065: \[TypedData\] e$B$H$$$&L\>A0$K$D$$$Fe(B http://redmine.ruby-lang.org/issues/show/3065 e$B5/I\<\<Te(B: Tadashi S. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B:XF#$H?=$7$^$9!#e(B 1.9.2e$B$K\<h$j9~$^$l$J$$…

---

## [\[Feature #3066\] \[TypedData\] wrap\_struct\_name $B$OI,MW(B?](https://www.ruby-forum.com/t/feature-3066-typeddata-wrap-struct-name-b-oi-mw-b/186111)

<div class="topic-metadata">

**Author:** [@sugie](https://www.ruby-forum.com/u/sugie)\
**Replies:** 1\
**Last updated:** [March 31, 2010, 7:24pm UTC](https://www.ruby-forum.com/t/feature-3066-typeddata-wrap-struct-name-b-oi-mw-b/186111 "2010-03-31T19:24:47Z")

</div>

Feature #3066: \[TypedData\] wrap\_struct\_name e$B$OI,MWe(B? http://redmine.ruby-lang.org/issues/show/3066 e$B5/I\<\<Te(B: Tadashi S. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B:XF#$H?=$7$^$9!#e(B rb\_data\_type\_te$B$…

---

## [Net::SSH - request a pty seems to put stderr in stdout](https://www.ruby-forum.com/t/net-ssh-request-a-pty-seems-to-put-stderr-in-stdout/186115)

<div class="topic-metadata">

**Author:** [@najati](https://www.ruby-forum.com/u/najati)\
**Replies:** 0\
**Last updated:** [March 31, 2010, 7:14pm UTC](https://www.ruby-forum.com/t/net-ssh-request-a-pty-seems-to-put-stderr-in-stdout/186115 "2010-03-31T19:14:11Z")

</div>

Hi all, As context, we’re simply trying to remotely (automatically) “su” to a different user and issue commands as that user, while still being able to differentiate between stderr and stdout on the subsequent command…

---

## [\[Feature:trunk\] RubyVM::InstructionSequence to accept IOs](https://www.ruby-forum.com/t/feature-trunk-rubyvm-instructionsequence-to-accept-ios/182456)

<div class="topic-metadata">

**Author:** [@Urabe\_S](https://www.ruby-forum.com/u/Urabe_S)\
**Replies:** 8\
**Last updated:** [March 31, 2010, 5:45pm UTC](https://www.ruby-forum.com/t/feature-trunk-rubyvm-instructionsequence-to-accept-ios/182456 "2010-03-31T17:45:50Z")

</div>

Rippere$B$Oe(BRipper#initializee$B$Ge(BIOe$B$r\<u$1IU$1$^$9$,!"e(BISeqe$B$O$=$&$O$J$C$F$$$^$;$s!#e(B e$BHsBP\>N$J$N$Ge(BISeqe$B$be(BIOe$B$r\<u$1IU$1$k$h$&$K$9$k$N$O$I$&$G$7$g$&$+!#e(B Signed-off-by: Urabe, Shyuohei remov…

---

## [GitHub and DjangoBook like inline comments](https://www.ruby-forum.com/t/github-and-djangobook-like-inline-comments/186108)

<div class="topic-metadata">

**Author:** [@mitkok](https://www.ruby-forum.com/u/mitkok)\
**Replies:** 0\
**Last updated:** [March 31, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/github-and-djangobook-like-inline-comments/186108 "2010-03-31T17:32:40Z")

</div>

Hey, guys. I’m wondering how to implement comments like in GitHub ( pere line ) or like DjangoBook ( per paragraph ). The only thing I came with is parsing each file, split it to lines/paragraphs and append div ids, …

---

## [Connects to .NET wsdl](https://www.ruby-forum.com/t/connects-to-net-wsdl/186107)

<div class="topic-metadata">

**Author:** [@P\_Yh](https://www.ruby-forum.com/u/P_Yh)\
**Replies:** 0\
**Last updated:** [March 31, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/connects-to-net-wsdl/186107 "2010-03-31T17:32:21Z")

</div>

Hi, What’s the correct module and method for making connection to .NET wsdl from a linux OS? Thanks. -pack

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

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