# Ruby

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

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

---

## [Hpricot files ------](https://www.ruby-forum.com/t/hpricot-files/187684)

<div class="topic-metadata">

**Author:** [@kevid](https://www.ruby-forum.com/u/kevid)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 8:58pm UTC](https://www.ruby-forum.com/t/hpricot-files/187684 "2010-04-27T20:58:14Z")

</div>

Hi all, I need to make use of “Hpricot gem” files. I don’t want to install it as a gem. I copied lib/hpricot/\*{all files} and lib/hpricot.rb to my application. below is lib/hpricot.rb begin require ‘encoding/char…

---

## [App.config file in a rails app](https://www.ruby-forum.com/t/app-config-file-in-a-rails-app/187666)

<div class="topic-metadata">

**Author:** [@Chris\_Ortman](https://www.ruby-forum.com/u/Chris_Ortman)\
**Replies:** 4\
**Last updated:** [April 27, 2010, 8:55pm UTC](https://www.ruby-forum.com/t/app-config-file-in-a-rails-app/187666 "2010-04-27T20:55:54Z")

</div>

I am playing around with ir + rails and using it in front of a bunch of existing .NET code. The .NET code really really wants a couple of settings in When i run via script/server though the app.config file is ir.exe.…

---

## [Preferred state machine gem?](https://www.ruby-forum.com/t/preferred-state-machine-gem/187541)

<div class="topic-metadata">

**Author:** [@pollopoop92](https://www.ruby-forum.com/u/pollopoop92)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 8:25pm UTC](https://www.ruby-forum.com/t/preferred-state-machine-gem/187541 "2010-04-27T20:25:27Z")

</div>

Hi everyone, today i would ask what state machine is more well writed and to be specific, more complete and simple to use for a network project. AFAIK i think state\_machine is pretty straightforward but a newbie have …

---

## [Ruby eval function](https://www.ruby-forum.com/t/ruby-eval-function/197132)

<div class="topic-metadata">

**Author:** [@kevid](https://www.ruby-forum.com/u/kevid)\
**Replies:** 7\
**Last updated:** [April 27, 2010, 7:55pm UTC](https://www.ruby-forum.com/t/ruby-eval-function/197132 "2010-04-27T19:55:35Z")

</div>

Hi all, I have the code below from “mechanize gem” \[ the file is module.rb\]. am a newbie in ruby. Could anyone help me redesign the code below to use either (a) block eval OR (b) not use eval at all. Thoughts ? c…

---

## [Client server](https://www.ruby-forum.com/t/client-server/187681)

<div class="topic-metadata">

**Author:** [@lykos](https://www.ruby-forum.com/u/lykos)\
**Replies:** 1\
**Last updated:** [April 27, 2010, 7:24pm UTC](https://www.ruby-forum.com/t/client-server/187681 "2010-04-27T19:24:24Z")

</div>

Hi, in our family, we often play a strongly modified version of Monopoly. But since this sometimes needs a lot of calculations, I’m programming this for Computers with brother. We intended to use a server which handl…

---

## [Local install of sqlite3-ruby](https://www.ruby-forum.com/t/local-install-of-sqlite3-ruby/187673)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 1\
**Last updated:** [April 27, 2010, 6:56pm UTC](https://www.ruby-forum.com/t/local-install-of-sqlite3-ruby/187673 "2010-04-27T18:56:18Z")

</div>

Hi, i want to install sqlite3-ruby without root on my system. I can compile it and i know how to set a custom path for install but how can my ruby-installation find it? Think sqlite3-ruby puts the native files into t…

---

## [Directory structure](https://www.ruby-forum.com/t/directory-structure/187678)

<div class="topic-metadata">

**Author:** [@lykos](https://www.ruby-forum.com/u/lykos)\
**Replies:** 0\
**Last updated:** [April 27, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/directory-structure/187678 "2010-04-27T18:31:06Z")

</div>

Hi, I always have problems with the directory structure of my bigger programs, earlier, I used absolute paths, which is of course a very bad solution and stopped working when I started to do distributed projects with…

---

## [\[BUG:trunk\] eval with binding, without location](https://www.ruby-forum.com/t/bug-trunk-eval-with-binding-without-location/172005)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 6:00pm UTC](https://www.ruby-forum.com/t/bug-trunk-eval-with-binding-without-location/172005 "2010-04-27T18:00:47Z")

</div>

evale$B$NBhe(B3, 4e$B0z?t$r\>JN,$7$?:\]$Ke(Bbindinge$B$,;}$C$F$$$ke(Bfile, linee$B$,EAGE$7$J$/e(B e$B$J$C$F$$$^$9!#$3$l$O0U?^$7$?$3$H$G$7$g$&$+!#e(B irbe$B$N%P%C%/%H%l!\<%9$,$3$l$N$?$a$K$A$g$C$HIT?F@Z$K$J$C$F$$$^$9!#e(B …

---

## [File handle question - eventpoll and pipe](https://www.ruby-forum.com/t/file-handle-question-eventpoll-and-pipe/187674)

<div class="topic-metadata">

**Author:** [@homerlex](https://www.ruby-forum.com/u/homerlex)\
**Replies:** 0\
**Last updated:** [April 27, 2010, 5:55pm UTC](https://www.ruby-forum.com/t/file-handle-question-eventpoll-and-pipe/187674 "2010-04-27T17:55:10Z")

</div>

Not sure if we have any experts on the topic here but I thought I’d give it a shot. We are running Rails 2.3.5 with a warbler war in Tomcat 5 on RHEL 5.4. I’m noticing some file handle leakage on our production server…

---

## [Forcing a string to valid UTF-8](https://www.ruby-forum.com/t/forcing-a-string-to-valid-utf-8/187629)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 4:45pm UTC](https://www.ruby-forum.com/t/forcing-a-string-to-valid-utf-8/187629 "2010-04-27T16:45:51Z")

</div>

I have some legacy text data that’s gone through several databases and web services in its life, playing promiscuously with dirty web servers, browsers, and encodings. It’s coming out of the source database as ASCII-8…

---

## [Variable number of arguments for methods called with "send"](https://www.ruby-forum.com/t/variable-number-of-arguments-for-methods-called-with-send/187665)

<div class="topic-metadata">

**Author:** [@pierrebombay](https://www.ruby-forum.com/u/pierrebombay)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/variable-number-of-arguments-for-methods-called-with-send/187665 "2010-04-27T16:22:37Z")

</div>

Hi there, I have a (soooo) dummy class : – class Main \< XXXXX def time 'Il est ’ + Time.now.to\_s end def salut \[‘salut’, ‘les’, ‘musclÃ©s’\] end def test\_with\_args(arg1, arg2) \[arg1, arg2\] end def test\_with\_mu…

---

## [\[Bug:trunk\] race condition of /#{ foo }/o](https://www.ruby-forum.com/t/bug-trunk-race-condition-of-foo-o/179415)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 4:07pm UTC](https://www.ruby-forum.com/t/bug-trunk-race-condition-of-foo-o/179415 "2010-04-27T16:07:48Z")

</div>

e$B1sF#$G$9!#e(B e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B $ cat race.rb f = proc {|s| /#{ sleep 1; s }/o } \[ Thread.new { f.call(“foo”); nil }, Thread.new { sleep 0.5; f.call(“bar”); nil }, \].each {|…

---

## [Net::HTTP and numerical adress](https://www.ruby-forum.com/t/net-http-and-numerical-adress/187636)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvue](https://www.ruby-forum.com/u/Une_BSSSSvue)\
**Replies:** 3\
**Last updated:** [April 27, 2010, 3:56pm UTC](https://www.ruby-forum.com/t/net-http-and-numerical-adress/187636 "2010-04-27T15:56:05Z")

</div>

if i use : Net::HTTP.start(‘http://88.183.xyz.uvw’) with numerical (i don’t have a domain name) i get an error : essais/download\_files.rb:16: no . floating literal anymore; put 0 before dot http://88.183.xyz.uvw ^ …

---

## [Ruby des encrypt](https://www.ruby-forum.com/t/ruby-des-encrypt/187663)

<div class="topic-metadata">

**Author:** [@niedhui](https://www.ruby-forum.com/u/niedhui)\
**Replies:** 1\
**Last updated:** [April 27, 2010, 3:46pm UTC](https://www.ruby-forum.com/t/ruby-des-encrypt/187663 "2010-04-27T15:46:27Z")

</div>

I’m trying to using ruby des encrypt , in php(some gives me ) function encrypt($input) { $size = mcrypt\_get\_block\_size(‘des’, ‘ecb’); $input = $this-\>pkcs5\_pad($input, $size); $key = $this-\>key; $td = mcrypt\_modul…

---

## [\[Bug #1919\](Closed) 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-closed-sparc-solaris-2-10-b-g-b-1-9-2-preview1-b-s-k-i-g-j-b/187662)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 0\
**Last updated:** [April 27, 2010, 2:56pm UTC](https://www.ruby-forum.com/t/bug-1919-closed-sparc-solaris-2-10-b-g-b-1-9-2-preview1-b-s-k-i-g-j-b/187662 "2010-04-27T14:56:21Z")

</div>

e$B%A%1%C%He(B #1919 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.) e$B%9%F!\<%?%9e(B Feedbacke$B$+$ie(BClosede$B$KJQ99e(B e$B1sF#$G$9!#e(B \[ruby-dev:39132\] e$B$GDs\<($5$l$?$H$j$“$($:$N%Q%C%A$Oe(B r24585 e$B$Ge(B e$B\<h$j9~$^$…

---

## [\[Bug:trunk\] various behavior when reopening File twice](https://www.ruby-forum.com/t/bug-trunk-various-behavior-when-reopening-file-twice/182631)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 2:37pm UTC](https://www.ruby-forum.com/t/bug-trunk-various-behavior-when-reopening-file-twice/182631 "2010-04-27T14:37:36Z")

</div>

e$B1sF#$G$9!#e(B e$B2\<5-$N$h$&$K!“FI$\_$+$1$Ne(B File e$B%$%s%9%?%s%9$r;H$C$Fe(B 2 e$B2se(B reopen e$B$7$?e(B e$B$H$-$N5sF0$,!”%P!\<%8%g%s$K$h$C$F$^$A$^$A$G$9!#e(B $ cat foo.txt 1 2 3 $ cat bar.txt a b c $ cat …

---

## [\[Bug #2516\](Rejected) IO#reopen Compatibility (original: )](https://www.ruby-forum.com/t/bug-2516-rejected-io-reopen-compatibility-original/187660)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 0\
**Last updated:** [April 27, 2010, 2:37pm UTC](https://www.ruby-forum.com/t/bug-2516-rejected-io-reopen-compatibility-original/187660 "2010-04-27T14:37:01Z")

</div>

e$B%A%1%C%He(B #2516 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.) e$B%9%F!\<%?%9e(B Assignede$B$+$ie(BRejectede$B$KJQ99e(B e$B1sF#$G$9!#e(B 1.9.2 e$B$G$O;EMM$H$$$&$3$H$Ge(B reject e$B$7$^$9!#e(B(\[ruby-core:28335\] e$BB\>e(B) …

---

## [Missing base64 library in Ruby1.9, cannot run cloudkit](https://www.ruby-forum.com/t/missing-base64-library-in-ruby1-9-cannot-run-cloudkit/187655)

<div class="topic-metadata">

**Author:** [@jod](https://www.ruby-forum.com/u/jod)\
**Replies:** 4\
**Last updated:** [April 27, 2010, 2:04pm UTC](https://www.ruby-forum.com/t/missing-base64-library-in-ruby1-9-cannot-run-cloudkit/187655 "2010-04-27T14:04:17Z")

</div>

Hi, I install cloudkit. I have followed the steps in the manual (CloudKit via cURL), but when I execute “rackup config.ru”, I get this error message: /usr/lib/ruby1.9/gems/1.9.0/gems/oauth-0.4.0/lib/oauth/helper.rb:2…

---

## [Ruby Assocations](https://www.ruby-forum.com/t/ruby-assocations/187656)

<div class="topic-metadata">

**Author:** [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Replies:** 1\
**Last updated:** [April 27, 2010, 2:00pm UTC](https://www.ruby-forum.com/t/ruby-assocations/187656 "2010-04-27T14:00:43Z")

</div>

Hi in my project i have 2 tables logins and sentitems. these 2 have 1-many relation ship. The primay key in login table is cust\_id and i have defined the relational key other than conventional name which is login\_id. …

---

## [How do I find out what web server I have on connected to Ruby On Rails?](https://www.ruby-forum.com/t/how-do-i-find-out-what-web-server-i-have-on-connected-to-ruby-on-rails/187623)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 1\
**Last updated:** [April 27, 2010, 12:19pm UTC](https://www.ruby-forum.com/t/how-do-i-find-out-what-web-server-i-have-on-connected-to-ruby-on-rails/187623 "2010-04-27T12:19:40Z")

</div>

I recently changed the server for a rails install to a mongrel clone, but I see nowhere that it is seen as THE RoR server in my Rails installation. Where is the configuration point to point to that server? It is cal…

---

## [Config.threadsafe! configuration question](https://www.ruby-forum.com/t/config-threadsafe-configuration-question/187590)

<div class="topic-metadata">

**Author:** [@homerlex](https://www.ruby-forum.com/u/homerlex)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 9:06am UTC](https://www.ruby-forum.com/t/config-threadsafe-configuration-question/187590 "2010-04-27T09:06:49Z")

</div>

We are running Rails 2.3.5 on Tomcat 5 using warbler. I have config.threadsafe! set to true. I just read somewhere that with this on we should set config.webxml.jruby.min.runtimes and config.webxml.jruby.max.runtimes…

---

## [\[ANN\] Ember 0.3.0](https://www.ruby-forum.com/t/ann-ember-0-3-0/187633)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [April 27, 2010, 3:17am UTC](https://www.ruby-forum.com/t/ann-ember-0-3-0/187633 "2010-04-27T03:17:12Z")

</div>

Ember eRuby template processor http://snk.tuxfamily.org/lib/ember/ Ember (EMBEdded Ruby) is an \[1\]eRuby template processor that allows debugging, reduces markup…

---

## [Regular expressions](https://www.ruby-forum.com/t/regular-expressions/187606)

<div class="topic-metadata">

**Author:** [@b0rdslide](https://www.ruby-forum.com/u/b0rdslide)\
**Replies:** 3\
**Last updated:** [April 27, 2010, 2:10am UTC](https://www.ruby-forum.com/t/regular-expressions/187606 "2010-04-27T02:10:41Z")

</div>

I’m writing a script that is looking through a file for the following lines something and replacing it with something - info about the something my problem is that I can’t find info about searching for the “\*” char…

---

## [Re: RubyGems 1.3.6, Bundler, etc](https://www.ruby-forum.com/t/re-rubygems-1-3-6-bundler-etc/187616)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 2\
**Last updated:** [April 27, 2010, 12:19am UTC](https://www.ruby-forum.com/t/re-rubygems-1-3-6-bundler-etc/187616 "2010-04-27T00:19:27Z")

</div>

Can we take this as a patch? Have you signed an agreement? From: Kevin R. removed\_email\_address@domain.invalid Sent: Monday, April 26, 2010 12:26 PM To: removed\_email\_address@domain.invalid removed\_email\_address@doma…

---

## [Semi global variables](https://www.ruby-forum.com/t/semi-global-variables/187569)

<div class="topic-metadata">

**Author:** [@Don\_F](https://www.ruby-forum.com/u/Don_F)\
**Replies:** 4\
**Last updated:** [April 26, 2010, 11:36pm UTC](https://www.ruby-forum.com/t/semi-global-variables/187569 "2010-04-26T23:36:08Z")

</div>

I have an application where multiple objects are created processing different sets of data based upon a configuration specified. Each object uses several other objects but those objects must use the configuration init…

---

## [\[ANN\] JRuby 1.4.1 - Fixes XSS Vulnerability in JRuby 1.4.0 - Recommended Upgrade](https://www.ruby-forum.com/t/ann-jruby-1-4-1-fixes-xss-vulnerability-in-jruby-1-4-0-recommended-upgrade/187619)

<div class="topic-metadata">

**Author:** [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Replies:** 0\
**Last updated:** [April 26, 2010, 11:16pm UTC](https://www.ruby-forum.com/t/ann-jruby-1-4-1-fixes-xss-vulnerability-in-jruby-1-4-0-recommended-upgrade/187619 "2010-04-26T23:16:49Z")

</div>

Today we’re releasing JRuby 1.4.1 as a recommended upgrade for all previous versions of JRuby. Previous versions contained a bug in JRuby’s regular expression engine that could allow an attacker to perform, for exampl…

---

## [JRuby 1.4.1 - Fixes XSS Vulnerability in JRuby 1.4.0 - Recommended Upgrade](https://www.ruby-forum.com/t/jruby-1-4-1-fixes-xss-vulnerability-in-jruby-1-4-0-recommended-upgrade/187618)

<div class="topic-metadata">

**Author:** [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Replies:** 0\
**Last updated:** [April 26, 2010, 11:16pm UTC](https://www.ruby-forum.com/t/jruby-1-4-1-fixes-xss-vulnerability-in-jruby-1-4-0-recommended-upgrade/187618 "2010-04-26T23:16:14Z")

</div>

Today we’re releasing JRuby 1.4.1 as a recommended upgrade for all previous versions of JRuby. Previous versions contained a bug in JRuby’s regular expression engine that could allow an attacker to perform, for exampl…

---

## [Connect mysql:show tables](https://www.ruby-forum.com/t/connect-mysql-show-tables/187570)

<div class="topic-metadata">

**Author:** [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Replies:** 2\
**Last updated:** [April 26, 2010, 10:55pm UTC](https://www.ruby-forum.com/t/connect-mysql-show-tables/187570 "2010-04-26T22:55:44Z")

</div>

require “mysql” dbh = Mysql.real\_connect(“localhost”, “root”, “\*\*\*\*\*\*”, “valuation”) res = dbh.query(“show tables”) puts res res.free the output is: #Mysql::Result:0x997c014 in mysql console: mysql\> show tables; …

---

## [RubyGems 1.3.6, Bundler, etc](https://www.ruby-forum.com/t/rubygems-1-3-6-bundler-etc/187438)

<div class="topic-metadata">

**Author:** [@ryan](https://www.ruby-forum.com/u/ryan)\
**Replies:** 5\
**Last updated:** [April 26, 2010, 9:26pm UTC](https://www.ruby-forum.com/t/rubygems-1-3-6-bundler-etc/187438 "2010-04-26T21:26:44Z")

</div>

While trying to install DataMapper from source, I ran into a few additional issues. I can create cases if they are legit, but I suspect I’m just missing something. When I tried to install dm-more, I received an error…

---

## [Populate (an array or a matrix) from a vector](https://www.ruby-forum.com/t/populate-an-array-or-a-matrix-from-a-vector/187548)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 5\
**Last updated:** [April 26, 2010, 6:22pm UTC](https://www.ruby-forum.com/t/populate-an-array-or-a-matrix-from-a-vector/187548 "2010-04-26T18:22:18Z")

</div>

Hello, I have a simple, but very tricky, problem. I would like to fix it using an array. But matix are possibly more appropriate (even if matrix can not have 3 dimensional values, I think). I would like to populate…

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

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