# Ruby

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

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

---

## [File.read ignores "rb" when ASCII incompatible encoding is specified](https://www.ruby-forum.com/t/file-read-ignores-rb-when-ascii-incompatible-encoding-is-specified/154386)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [November 28, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/file-read-ignores-rb-when-ascii-incompatible-encoding-is-specified/154386 "2008-11-28T17:08:01Z")

</div>

e$B1sF#$G$9!#e(B e$B0J2\<$N5sF0$O0U?^E\*$G$7$g$&$+!#e(B $ ./ruby -ve ‘File.read(“foo”, “rb”, :encoding =\> “UTF-16LE”)’ ruby 1.9.0 (2008-11-28 revision 20387) \[i686-linux\] -e:1:in read': ASCII incompatible encoding need…

---

## [Help with regexp and gsub](https://www.ruby-forum.com/t/help-with-regexp-and-gsub/154390)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 2\
**Last updated:** [November 28, 2008, 4:43pm UTC](https://www.ruby-forum.com/t/help-with-regexp-and-gsub/154390 "2008-11-28T16:43:59Z")

</div>

I need to be able to match all data before the word “Total:” and then I will replace it with “” using gsub. Here is the text: C THIS IS THE TEXT I WANT TO MATCH ON and this… and this too… and there could be this l…

---

## [XMPP4r helper class](https://www.ruby-forum.com/t/xmpp4r-helper-class/154393)

<div class="topic-metadata">

**Author:** [@kula](https://www.ruby-forum.com/u/kula)\
**Replies:** 0\
**Last updated:** [November 28, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/xmpp4r-helper-class/154393 "2008-11-28T16:34:36Z")

</div>

Hi, can anybody explain me why when I’m trying to check if contact is online using this code: rec = Roster::Helper::RosterItem.new(‘removed\_email\_address@domain.invalid’).online? I’m always receiving negative answer? …

---

## [Win32-nio](https://www.ruby-forum.com/t/win32-nio/154384)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 0\
**Last updated:** [November 28, 2008, 3:32pm UTC](https://www.ruby-forum.com/t/win32-nio/154384 "2008-11-28T15:32:55Z")

</div>

Hi all, The Win32Utils team is happy to announce the release of win32-nio 0.0.1. This is largely a proof of concept library, and should be considered alpha code. = What is it? Ruby’s IO methods implemented using nat…

---

## [Shebang! line not recognized in OS X Leopard?](https://www.ruby-forum.com/t/shebang-line-not-recognized-in-os-x-leopard/154320)

<div class="topic-metadata">

**Author:** [@pinkfrankenstein](https://www.ruby-forum.com/u/pinkfrankenstein)\
**Replies:** 6\
**Last updated:** [November 28, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/shebang-line-not-recognized-in-os-x-leopard/154320 "2008-11-28T15:30:32Z")

</div>

Hi Newbie to Ruby. Going through the O’Reily book I get this bit of code for creating a hello world script. The shebang line is suppossed to make it so I don’t have to type “ruby” before executing my scripts: #!/usr…

---

## [Problem of UDPSocket on Windows](https://www.ruby-forum.com/t/problem-of-udpsocket-on-windows/154305)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 28, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/problem-of-udpsocket-on-windows/154305 "2008-11-28T14:54:12Z")

</div>

Hi, All: I beg for your helps, my trouble as follow: Background: Use UDP socket to implement an C/S module, Client send messages and Server receive these messages and print them.Client run on Linux(RHEL 5.1) and Se…

---

## [Rest-client posting multipart to rails 2](https://www.ruby-forum.com/t/rest-client-posting-multipart-to-rails-2/154365)

<div class="topic-metadata">

**Author:** [@e\_deleflie](https://www.ruby-forum.com/u/e_deleflie)\
**Replies:** 3\
**Last updated:** [November 28, 2008, 1:30pm UTC](https://www.ruby-forum.com/t/rest-client-posting-multipart-to-rails-2/154365 "2008-11-28T13:30:17Z")

</div>

Hi all, I’m using rest-client (in a Shoooes app) to post a multi-part form to my rails server. I’ve been struck down by a gotcha (which may not be a gotcha for non-newbies). What I want to do is post an image file wi…

---

## [\[Feature #747\] /\\A/u ignores BOM](https://www.ruby-forum.com/t/feature-747-a-u-ignores-bom/153105)

<div class="topic-metadata">

**Author:** [@Shyouhei\_U](https://www.ruby-forum.com/u/Shyouhei_U)\
**Replies:** 13\
**Last updated:** [November 28, 2008, 11:25am UTC](https://www.ruby-forum.com/t/feature-747-a-u-ignores-bom/153105 "2008-11-28T11:25:03Z")

</div>

Feature #747: /\\A/u ignores BOM http://redmine.ruby-lang.org/issues/show/747 e$B5/I\<\<Te(B: Shyouhei U. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Yui NARUSE, e$B%+%F%4%je(B: M17N, Target version: 1.9.…

---

## [Private #initialize](https://www.ruby-forum.com/t/private-initialize/154334)

<div class="topic-metadata">

**Author:** [@Yossef\_M](https://www.ruby-forum.com/u/Yossef_M)\
**Replies:** 6\
**Last updated:** [November 28, 2008, 9:56am UTC](https://www.ruby-forum.com/t/private-initialize/154334 "2008-11-28T09:56:24Z")

</div>

My apologies if this has been discussed before, but I couldn’t find anything in a Google search, searching this particular list/group on Google, or my first attempt at blade. (Later attempts complained about not being…

---

## [Creating a dynamic hash](https://www.ruby-forum.com/t/creating-a-dynamic-hash/154281)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 5\
**Last updated:** [November 28, 2008, 7:59am UTC](https://www.ruby-forum.com/t/creating-a-dynamic-hash/154281 "2008-11-28T07:59:47Z")

</div>

Hi I am trying to draw a graph My question is not related to that In the below @tic\_num\_array is an array contains values like \[“IN1”,“IN2”,“IN3”…\] and @tic\_elapsed\_time\_array contains values like \[10,2,12,…\] They…

---

## [Test management system integrated with JIRA and Bugzilla](https://www.ruby-forum.com/t/test-management-system-integrated-with-jira-and-bugzilla/154356)

<div class="topic-metadata">

**Author:** [@sean](https://www.ruby-forum.com/u/sean)\
**Replies:** 0\
**Last updated:** [November 28, 2008, 7:51am UTC](https://www.ruby-forum.com/t/test-management-system-integrated-with-jira-and-bugzilla/154356 "2008-11-28T07:51:03Z")

</div>

Hello Everyone, Zephyr, which has revolutionized the IT scene, is now making quite a stir with the release of Zephyr 2.0, which features comprehensive, two- way integration with the popular defect tracking systems JIR…

---

## [Alternatives to ?\\C-n, ?\\M-a etc in ruby 1.9](https://www.ruby-forum.com/t/alternatives-to-c-n-m-a-etc-in-ruby-1-9/154277)

<div class="topic-metadata">

**Author:** [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Replies:** 5\
**Last updated:** [November 28, 2008, 6:31am UTC](https://www.ruby-forum.com/t/alternatives-to-c-n-m-a-etc-in-ruby-1-9/154277 "2008-11-28T06:31:35Z")

</div>

I need to make a rather important design in my 1.8 application, so i don’t have too much rework to do when i want to port to 1.9. I understand that in 1.9 we would use String.ord for cases like a\[0\] or ?a (getting asc…

---

## [Unable to load mysql drivers](https://www.ruby-forum.com/t/unable-to-load-mysql-drivers/154353)

<div class="topic-metadata">

**Author:** [@makarand\_km](https://www.ruby-forum.com/u/makarand_km)\
**Replies:** 1\
**Last updated:** [November 28, 2008, 5:45am UTC](https://www.ruby-forum.com/t/unable-to-load-mysql-drivers/154353 "2008-11-28T05:45:39Z")

</div>

Hi I ma trying to use the ruby dbi module to connect to mysql but i am getting the following error Mysql: Unable to load drivers? Can some please let me know the exact solution. Which mysql drivers i need to install…

---

## [Sending post request to API](https://www.ruby-forum.com/t/sending-post-request-to-api/154350)

<div class="topic-metadata">

**Author:** [@manoah](https://www.ruby-forum.com/u/manoah)\
**Replies:** 0\
**Last updated:** [November 28, 2008, 4:42am UTC](https://www.ruby-forum.com/t/sending-post-request-to-api/154350 "2008-11-28T04:42:12Z")

</div>

How shall we send a post request to API to get the response?

---

## [TudbcJRubyServlet shows JRuby+Tomcat is the fastest web svr](https://www.ruby-forum.com/t/tudbcjrubyservlet-shows-jruby-tomcat-is-the-fastest-web-svr/154349)

<div class="topic-metadata">

**Author:** [@tudbc](https://www.ruby-forum.com/u/tudbc)\
**Replies:** 0\
**Last updated:** [November 28, 2008, 2:58am UTC](https://www.ruby-forum.com/t/tudbcjrubyservlet-shows-jruby-tomcat-is-the-fastest-web-svr/154349 "2008-11-28T02:58:10Z")

</div>

Check out the free TudbcJRubyServlet which shows that JRuby is the fastest Ruby web server (using the “Echo” test) to run RB, ERB, and RBS (“Ruby Servlet”). http://www.tudbc.org/tudbcjrubyservlet It is even faster th…

---

## [Reg exp](https://www.ruby-forum.com/t/reg-exp/154309)

<div class="topic-metadata">

**Author:** [@hai\_l](https://www.ruby-forum.com/u/hai_l)\
**Replies:** 5\
**Last updated:** [November 28, 2008, 2:34am UTC](https://www.ruby-forum.com/t/reg-exp/154309 "2008-11-28T02:34:54Z")

</div>

Hi every body. I’m a newbie in Ruby and have problem with reg exp. In one string as example “The device 13c include something as in Fig. 2a and 3b”, I want to detect some numbers have style “13c” and ignore others num…

---

## [UnicodeUtils 0.4.0 - case conversion, normalization and more](https://www.ruby-forum.com/t/unicodeutils-0-4-0-case-conversion-normalization-and-more/154347)

<div class="topic-metadata">

**Author:** [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Replies:** 0\
**Last updated:** [November 28, 2008, 1:55am UTC](https://www.ruby-forum.com/t/unicodeutils-0-4-0-case-conversion-normalization-and-more/154347 "2008-11-28T01:55:33Z")

</div>

UnicodeUtils is a pure Ruby library that implements Unicode algorithms for Ruby 1.9. Install with RubyGems: $ gem install unicode\_utils Example code: require “unicode\_utils” UnicodeUtils.name(“Ã¦”) =\> “LATIN SMALL …

---

## [Read Database Metadata](https://www.ruby-forum.com/t/read-database-metadata/154271)

<div class="topic-metadata">

**Author:** [@xdork](https://www.ruby-forum.com/u/xdork)\
**Replies:** 4\
**Last updated:** [November 28, 2008, 1:50am UTC](https://www.ruby-forum.com/t/read-database-metadata/154271 "2008-11-28T01:50:34Z")

</div>

Hi All, I’m reviewing Ruby if its appropriate for my project. I’m planning to port my existing application made from Java to Ruby but before I do that I have to check if Ruby have capablities of doing the following: …

---

## [Good math/stats libraries for Ruby?](https://www.ruby-forum.com/t/good-math-stats-libraries-for-ruby/154063)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 9\
**Last updated:** [November 28, 2008, 1:21am UTC](https://www.ruby-forum.com/t/good-math-stats-libraries-for-ruby/154063 "2008-11-28T01:21:02Z")

</div>

There seem to be lots of small stats/math libraries for Ruby, but none that really dominate in the same way that NumPy/SciPy dominates in Python. Can anyone recommend what are the most reliable and stable? My needs ar…

---

## [Chris Pine tutorial assistance chapter 7 sort data without use of .sort method](https://www.ruby-forum.com/t/chris-pine-tutorial-assistance-chapter-7-sort-data-without-use-of-sort-method/154060)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 11\
**Last updated:** [November 27, 2008, 8:41pm UTC](https://www.ruby-forum.com/t/chris-pine-tutorial-assistance-chapter-7-sort-data-without-use-of-sort-method/154060 "2008-11-27T20:41:25Z")

</div>

I’m learning to progam and came accross Chris P.'s Ruby Tutorial. I’ve got to the Array and Iterators chapter ( http://pine.fm/LearnToProgram/?Chapter=07 ). and the following assignment " Let’s write a program which …

---

## [Problems while creating a new migration file](https://www.ruby-forum.com/t/problems-while-creating-a-new-migration-file/196849)

<div class="topic-metadata">

**Author:** [@indu](https://www.ruby-forum.com/u/indu)\
**Replies:** 2\
**Last updated:** [November 27, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/problems-while-creating-a-new-migration-file/196849 "2008-11-27T20:20:51Z")

</div>

Hello , I am a ROR beginner. I have a controller named “users” and the corresponding view,model created using the command “ruby script/generate scaffold user name:string”.By running the command rake db:migrate will c…

---

## [Moving Ruby Application](https://www.ruby-forum.com/t/moving-ruby-application/154317)

<div class="topic-metadata">

**Author:** [@masolino](https://www.ruby-forum.com/u/masolino)\
**Replies:** 0\
**Last updated:** [November 27, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/moving-ruby-application/154317 "2008-11-27T16:54:39Z")

</div>

Hallo everybody, I am trying to move one application from one server to another both running Suse 10.2 64Bit (one is a SLES one is Open Suse). I’ve tried to reinstall all packages on both machines (so that they both …

---

## [Ayuda con Ejercicio](https://www.ruby-forum.com/t/ayuda-con-ejercicio/153671)

<div class="topic-metadata">

**Author:** [@farebalk](https://www.ruby-forum.com/u/farebalk)\
**Replies:** 6\
**Last updated:** [November 27, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/ayuda-con-ejercicio/153671 "2008-11-27T16:17:30Z")

</div>

Buenas Tardes a todos, primero quisiera informarles que yo no se nada de programaciÃ³n pero reciente mente estoy intentando aprender un poco de Ruby, por lo mismo estoy intentando responder unos ejercicios para poder …

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/154310)

<div class="topic-metadata">

**Author:** [@Ranieri\_T](https://www.ruby-forum.com/u/Ranieri_T)\
**Replies:** 0\
**Last updated:** [November 27, 2008, 3:37pm UTC](https://www.ruby-forum.com/t/unsubscribe/154310 "2008-11-27T15:37:39Z")

</div>

unsubscribe

---

## [Install a ruby library with it's .gem file](https://www.ruby-forum.com/t/install-a-ruby-library-with-its-gem-file/153613)

<div class="topic-metadata">

**Author:** [@lyes](https://www.ruby-forum.com/u/lyes)\
**Replies:** 3\
**Last updated:** [November 27, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/install-a-ruby-library-with-its-gem-file/153613 "2008-11-27T13:51:49Z")

</div>

Hello everybody! May some one tell me how can I install a ruby library using it’s “.gem” file I’ve tried to proceed like this: gem install --install-dir PATH library\_name the output was like this Successfully insta…

---

## [How to get RedCloth on Ubuntu Hardy?](https://www.ruby-forum.com/t/how-to-get-redcloth-on-ubuntu-hardy/154276)

<div class="topic-metadata">

**Author:** [@batguano](https://www.ruby-forum.com/u/batguano)\
**Replies:** 1\
**Last updated:** [November 27, 2008, 1:46pm UTC](https://www.ruby-forum.com/t/how-to-get-redcloth-on-ubuntu-hardy/154276 "2008-11-27T13:46:12Z")

</div>

Hello, I try to get RedCloth installed on my Ubuntu Hardy machine. Naturally, I typed sudo gem install RedCloth but this brought the error: ERROR: Error installing RedCloth: echoe requires RubyGems version \>= 1.2 H…

---

## [Tiny comment fix for insns.def](https://www.ruby-forum.com/t/tiny-comment-fix-for-insns-def/154298)

<div class="topic-metadata">

**Author:** [@shinichiro.h](https://www.ruby-forum.com/u/shinichiro.h)\
**Replies:** 0\
**Last updated:** [November 27, 2008, 1:30pm UTC](https://www.ruby-forum.com/t/tiny-comment-fix-for-insns-def/154298 "2008-11-27T13:30:12Z")

</div>

e$BIMCO$G$9!#e(B insns.def e$B$N%3%a%s%H$K$D$$$F!"e(B get/setspecial e$B$NNc$H$7$Fe(B $~, $\_ e$B$ON\>J}4V0c$C$F$$$ke(B expandarray e$B$Ne(B flag&0x04 e$B$O\<B:\]$K$O;H$o$l$F$$$J$$e(B e$B$h$&$K;W$$$^$9!#e(B e$B$b$7@5$7$…

---

## [Showing file position with FasterCSV](https://www.ruby-forum.com/t/showing-file-position-with-fastercsv/154289)

<div class="topic-metadata">

**Author:** [@sa125](https://www.ruby-forum.com/u/sa125)\
**Replies:** 1\
**Last updated:** [November 27, 2008, 1:26pm UTC](https://www.ruby-forum.com/t/showing-file-position-with-fastercsv/154289 "2008-11-27T13:26:10Z")

</div>

Hi - I’m trying to get the file position with FasterCSV to show progress: csv = FasterCSV.open(path\_to\_file, “r”) file\_size = File.size(path\_to\_file) for row in csv position = csv.tell # this only returns 0… do stu…

---

## [JRuby File and Dir cant using non ascii path](https://www.ruby-forum.com/t/jruby-file-and-dir-cant-using-non-ascii-path/154086)

<div class="topic-metadata">

**Author:** [@koji\_Lin](https://www.ruby-forum.com/u/koji_Lin)\
**Replies:** 2\
**Last updated:** [November 27, 2008, 1:07pm UTC](https://www.ruby-forum.com/t/jruby-file-and-dir-cant-using-non-ascii-path/154086 "2008-11-27T13:07:16Z")

</div>

Hi all i have already put a issue on jira http://jira.codehaus.org/browse/JRUBY-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel file = File.open(“D:\\æˆ‘çš„æ–‡ä»¶test.txt”) file.each() do |line| …

---

## [KirbyBase : update method problem](https://www.ruby-forum.com/t/kirbybase-update-method-problem/154202)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 2\
**Last updated:** [November 27, 2008, 10:30am UTC](https://www.ruby-forum.com/t/kirbybase-update-method-problem/154202 "2008-11-27T10:30:55Z")

</div>

the basic code below makes kirby complain that im trying to update a link\_to many field in my table when as can be seen I am not. Here is some code for you to copy into irb to reproduce the error (though the problem l…

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

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