# Ruby

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

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

---

## ["gem install mysql" failing horribly on OS X leaopard](https://www.ruby-forum.com/t/gem-install-mysql-failing-horribly-on-os-x-leaopard/147949)

<div class="topic-metadata">

**Author:** [@biot023](https://www.ruby-forum.com/u/biot023)\
**Replies:** 4\
**Last updated:** [April 12, 2009, 9:19pm UTC](https://www.ruby-forum.com/t/gem-install-mysql-failing-horribly-on-os-x-leaopard/147949 "2009-04-12T21:19:57Z")

</div>

Hi – I’m having trouble getting the mysql gem to install on an OS X Leopard machine. Typical output I get from the console is this: esft 523 $ sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-include…

---

## [Constant lookup](https://www.ruby-forum.com/t/constant-lookup/165342)

<div class="topic-metadata">

**Author:** [@addywaddy](https://www.ruby-forum.com/u/addywaddy)\
**Replies:** 0\
**Last updated:** [April 12, 2009, 8:13pm UTC](https://www.ruby-forum.com/t/constant-lookup/165342 "2009-04-12T20:13:43Z")

</div>

I’ve come across an odd issue when using a constant that is defined within more than one module namespace. I’ve searched this forum/ml/newsgroup for some answers, but I didn’t come across anything that quite addressed…

---

## [Problem when removing accents from a String](https://www.ruby-forum.com/t/problem-when-removing-accents-from-a-string/165339)

<div class="topic-metadata">

**Author:** [@cesardiaz](https://www.ruby-forum.com/u/cesardiaz)\
**Replies:** 1\
**Last updated:** [April 12, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/problem-when-removing-accents-from-a-string/165339 "2009-04-12T19:58:39Z")

</div>

Hi, I’ve spend several time trying to replace latin characters in strings. What I want is something like this: Given the word “camiÃ³n”, I would like to get the following string: “camion”. I’ve found several solutio…

---

## [Output UTF-16LE BOM to file - 1.9](https://www.ruby-forum.com/t/output-utf-16le-bom-to-file-1-9/165182)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 1\
**Last updated:** [April 12, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/output-utf-16le-bom-to-file-1-9/165182 "2009-04-12T18:39:04Z")

</div>

ruby 1.9.1p0 (2009-01-30 revision 21907) \[i386-mswin32\] With this code: File.open(‘zz.txt’, ‘w:UTF-16LE’) do |f| f.print “Hello Uni-world” end …I get no BOM guts = File.read(‘zz.txt’) puts guts.bytes.to\_a.inspect …

---

## [Bad file descriptor error](https://www.ruby-forum.com/t/bad-file-descriptor-error/165306)

<div class="topic-metadata">

**Author:** [@diskava](https://www.ruby-forum.com/u/diskava)\
**Replies:** 5\
**Last updated:** [April 12, 2009, 5:55pm UTC](https://www.ruby-forum.com/t/bad-file-descriptor-error/165306 "2009-04-12T17:55:44Z")

</div>

Hello everyone, I’m new to ruby.I’m trying to write an application that would synchronise with google calendar.Below is a script I’m trying to use for authentication with google.When I try to run it I’m getting a bad …

---

## [Logfile rotate](https://www.ruby-forum.com/t/logfile-rotate/165239)

<div class="topic-metadata">

**Author:** [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Replies:** 2\
**Last updated:** [April 12, 2009, 2:42pm UTC](https://www.ruby-forum.com/t/logfile-rotate/165239 "2009-04-12T14:42:17Z")

</div>

Is there a gem that rolls logs for you? if so how and where can I get it? I have started to write my own, but figured I’d ask. thx!

---

## [Shell exit code](https://www.ruby-forum.com/t/shell-exit-code/165325)

<div class="topic-metadata">

**Author:** [@yuguri](https://www.ruby-forum.com/u/yuguri)\
**Replies:** 2\
**Last updated:** [April 12, 2009, 1:32pm UTC](https://www.ruby-forum.com/t/shell-exit-code/165325 "2009-04-12T13:32:55Z")

</div>

Hello Group, Is there any way to retrieve an exit code of shell commands when called from ruby? ruby code : exec(“ls”) if fork.nil? Process.wait shell : ls echo $? \<-- get this value in ruby

---

## [Code Review: Fixes for File.dirname](https://www.ruby-forum.com/t/code-review-fixes-for-file-dirname/165322)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 0\
**Last updated:** [April 12, 2009, 9:56am UTC](https://www.ruby-forum.com/t/code-review-fixes-for-file-dirname/165322 "2009-04-12T09:56:44Z")

</div>

Fixes for File.dirname; makes all core/file/dirname specs pass. For Rails to find log/development.log during startup. Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=499

---

## [RubyNation Launch Event: Apr 15: Dave Thomas and Chad Fowler show some code](https://www.ruby-forum.com/t/rubynation-launch-event-apr-15-dave-thomas-and-chad-fowler-show-some-code/165320)

<div class="topic-metadata">

**Author:** [@grayherter](https://www.ruby-forum.com/u/grayherter)\
**Replies:** 0\
**Last updated:** [April 12, 2009, 6:09am UTC](https://www.ruby-forum.com/t/rubynation-launch-event-apr-15-dave-thomas-and-chad-fowler-show-some-code/165320 "2009-04-12T06:09:26Z")

</div>

The NovaRUG is hosting a meeting with Dave T. and Chad F. presenting this April 15th (CodeSerpas, FGM, and RubyNation are sponsoring it). This is also a launch event for the RubyNation conference, June 12-13 at the H…

---

## [Ruby-exiv2 \\?](https://www.ruby-forum.com/t/ruby-exiv2/165318)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 0\
**Last updated:** [April 12, 2009, 3:57am UTC](https://www.ruby-forum.com/t/ruby-exiv2/165318 "2009-04-12T03:57:23Z")

</div>

I’m trying to use ruby-exiv2, the ruby bindings to the Exiv2 image metadata library. The docs are really sparse, though. In fact, this is it: Basic usage: gem install RubyInline gem install ruby-exiv2 irb -r rubyg…

---

## [Strange error when calling into jruby1.2 from java using javax.scripting?](https://www.ruby-forum.com/t/strange-error-when-calling-into-jruby1-2-from-java-using-javax-scripting/165305)

<div class="topic-metadata">

**Author:** [@M\_C](https://www.ruby-forum.com/u/M_C)\
**Replies:** 0\
**Last updated:** [April 11, 2009, 11:01pm UTC](https://www.ruby-forum.com/t/strange-error-when-calling-into-jruby1-2-from-java-using-javax-scripting/165305 "2009-04-11T23:01:59Z")

</div>

I am trying to get jruby1.2 working with the new scripting api on JDK1.6 (JSR 223) but I have run into a strange error with the returned jruby object not properly implementing a specified java interface. Can anyone on…

---

## [Falcon - powering innovation](https://www.ruby-forum.com/t/falcon-powering-innovation/165287)

<div class="topic-metadata">

**Author:** [@Kless](https://www.ruby-forum.com/u/Kless)\
**Replies:** 4\
**Last updated:** [April 11, 2009, 6:40pm UTC](https://www.ruby-forum.com/t/falcon-powering-innovation/165287 "2009-04-11T18:40:55Z")

</div>

If anybody is interesed in new technologies, you’ll love this new language called Falcon \[1\], which has been open sourced ago little time. Falcon is a scripting engine ready to empower mission-critical multithreaded …

---

## [Scrape data from Javascript inside HTML source](https://www.ruby-forum.com/t/scrape-data-from-javascript-inside-html-source/165277)

<div class="topic-metadata">

**Author:** [@yaxm](https://www.ruby-forum.com/u/yaxm)\
**Replies:** 1\
**Last updated:** [April 11, 2009, 7:20am UTC](https://www.ruby-forum.com/t/scrape-data-from-javascript-inside-html-source/165277 "2009-04-11T07:20:39Z")

</div>

Hi, is there any scraper that interact with Javascript function inside a HTML page? Sometimes, the data is returned from a Javascript function or a javascript variable. so I wonder if there’s a easy way to get data …

---

## [Having trouble using ruby-debug](https://www.ruby-forum.com/t/having-trouble-using-ruby-debug/165123)

<div class="topic-metadata">

**Author:** [@Richard\_Quadling](https://www.ruby-forum.com/u/Richard_Quadling)\
**Replies:** 2\
**Last updated:** [April 11, 2009, 6:39am UTC](https://www.ruby-forum.com/t/having-trouble-using-ruby-debug/165123 "2009-04-11T06:39:43Z")

</div>

Hi. I’m on Windows. I want to debug a rake process. The rake works, but there is a bug in one of the processes involved in the rake. I’m gem install ruby-debug and that all looked OK. I type rake -rdebug to get thi…

---

## [\[Bug #1031\] -U $B%\*%W%7%g%s$N@bL@$,(B --help $B$K$J$$(B](https://www.ruby-forum.com/t/bug-1031-u-b-w-7-g-s-n-bl-b-help-b-k-j-b/165276)

<div class="topic-metadata">

**Author:** [@Sakuro\_OZAWA](https://www.ruby-forum.com/u/Sakuro_OZAWA)\
**Replies:** 0\
**Last updated:** [April 11, 2009, 6:12am UTC](https://www.ruby-forum.com/t/bug-1031-u-b-w-7-g-s-n-bl-b-help-b-k-j-b/165276 "2009-04-11T06:12:15Z")

</div>

e$B%A%1%C%He(B #1031 e$B$,99?7$5$l$^$7$?!#e(B (by Sakuro OZAWA) e$B8"8B$N$“$kJ}!”%9%F!\<%?%9$re(B Assigned e$B$KJQ99$7$F$/$@$5$$!#e(B http://redmine.ruby-lang.org/issues/show/1031

---

## [MacPorts](https://www.ruby-forum.com/t/macports/165210)

<div class="topic-metadata">

**Author:** [@Logan\_B](https://www.ruby-forum.com/u/Logan_B)\
**Replies:** 4\
**Last updated:** [April 11, 2009, 4:41am UTC](https://www.ruby-forum.com/t/macports/165210 "2009-04-11T04:41:40Z")

</div>

I’m trying to help a friend get set up with JRuby. He made a b-line for the MacPorts method of installing (as per the Getting Started wiki page). Some things to note about the experience: The MacPorts version of JRub…

---

## [JRuby-Rack 0.9.4 Released](https://www.ruby-forum.com/t/jruby-rack-0-9-4-released/165273)

<div class="topic-metadata">

**Author:** [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Replies:** 0\
**Last updated:** [April 11, 2009, 4:28am UTC](https://www.ruby-forum.com/t/jruby-rack-0-9-4-released/165273 "2009-04-11T04:28:13Z")

</div>

Hi all, I pushed out JRuby-Rack 0.9.4 this evening. You should be able to use this version with Rails 2.3 without any of the previously mentioned workarounds. This release should also be suitable for use with the new …

---

## [Multiple JRuby-Rack apps in one WAR](https://www.ruby-forum.com/t/multiple-jruby-rack-apps-in-one-war/165255)

<div class="topic-metadata">

**Author:** [@steve\_molitor](https://www.ruby-forum.com/u/steve_molitor)\
**Replies:** 3\
**Last updated:** [April 11, 2009, 3:41am UTC](https://www.ruby-forum.com/t/multiple-jruby-rack-apps-in-one-war/165255 "2009-04-11T03:41:24Z")

</div>

I want to package multiple apps (two sinatra apps and two rails apps) in one WAR, with rack URL mappings to determine which URL maps to which app. How who I go about doing that with Jruby-rack, warble? Thanks! Ste…

---

## [Regex woes with breaklines](https://www.ruby-forum.com/t/regex-woes-with-breaklines/165190)

<div class="topic-metadata">

**Author:** [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Replies:** 3\
**Last updated:** [April 10, 2009, 11:47pm UTC](https://www.ruby-forum.com/t/regex-woes-with-breaklines/165190 "2009-04-10T23:47:53Z")

</div>

Hello, all. I’ve been banging my head against this for a little bit, and I’m no closer to a solution. The issue is that I have a string where I would like to gsub all line ends (’\\n’ or ‘\\r\\n’) into ‘ ’, while prese…

---

## [Grizzly execute Thread start](https://www.ruby-forum.com/t/grizzly-execute-thread-start/165156)

<div class="topic-metadata">

**Author:** [@paulf](https://www.ruby-forum.com/u/paulf)\
**Replies:** 1\
**Last updated:** [April 10, 2009, 11:03pm UTC](https://www.ruby-forum.com/t/grizzly-execute-thread-start/165156 "2009-04-10T23:03:58Z")

</div>

This code in a Grizzly execute method new Thread(controller).start(); starts the thread running and terminates the thread when the controller is stopped later on in the code. (I think) In JRuby, something like… Thre…

---

## [Bluecloth-2.0.0 released](https://www.ruby-forum.com/t/bluecloth-2-0-0-released/165085)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 6\
**Last updated:** [April 10, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/bluecloth-2-0-0-released/165085 "2009-04-10T19:37:10Z")

</div>

I tried to post this announcement twice yesterday, but both seem to have gotten lost. Anyway, I’d like to announce a brand new version of BlueCloth. You can read the announcement here: http://deveiate.org/bluecloth2-a…

---

## [Canvas#top= in Shoes](https://www.ruby-forum.com/t/canvas-top-in-shoes/165247)

<div class="topic-metadata">

**Author:** [@joelagnel](https://www.ruby-forum.com/u/joelagnel)\
**Replies:** 0\
**Last updated:** [April 10, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/canvas-top-in-shoes/165247 "2009-04-10T18:12:58Z")

</div>

In the hunt for a bug in Shoes, which I need to fix for my app, I have been trying to determine where the “top=” instance method for the Canvas class is defined in C (most of shoes is written in C) So far, I’ve looked…

---

## [Date formatting bug?](https://www.ruby-forum.com/t/date-formatting-bug/165240)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 1\
**Last updated:** [April 10, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/date-formatting-bug/165240 "2009-04-10T17:35:50Z")

</div>

Why does the year get changed in this code? require ‘date’ s = ‘2998-12-31’ date = Date.parse(s) f = date.strftime(’%d-%b-%G’) puts f The output is 31-Dec-2999. This doesn’t seem to happen with earlier years. Thi…

---

## [Emit YAML without leading hyphens?](https://www.ruby-forum.com/t/emit-yaml-without-leading-hyphens/164979)

<div class="topic-metadata">

**Author:** [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Replies:** 8\
**Last updated:** [April 10, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/emit-yaml-without-leading-hyphens/164979 "2009-04-10T16:42:27Z")

</div>

How to emit yaml without the leading hyphens? \[1,2,3\].to\_yaml # ==\>"--- \\n- 1\\n- 2\\n- 3\\n" I realize that I can do the following to get the result I’m after, but it seems sort of “after the fact” \[1,2,3\].to\_yaml\[5……

---

## [Join strings](https://www.ruby-forum.com/t/join-strings/165233)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 4\
**Last updated:** [April 10, 2009, 2:40pm UTC](https://www.ruby-forum.com/t/join-strings/165233 "2009-04-10T14:40:37Z")

</div>

What is the simples way to join strings? tmp1 = ‘aa’ tmp2 = ‘bb’ tmp3 = nil tmp4 = nil tmp5 = ‘dd’ result = ‘aabbcc’

---

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

<div class="topic-metadata">

**Author:** [@Amr\_Magdy](https://www.ruby-forum.com/u/Amr_Magdy)\
**Replies:** 0\
**Last updated:** [April 10, 2009, 1:16pm UTC](https://www.ruby-forum.com/t/unsubscribe/165230 "2009-04-10T13:16:49Z")

</div>

unsubscribe

---

## [Why ruby license?](https://www.ruby-forum.com/t/why-ruby-license/165113)

<div class="topic-metadata">

**Author:** [@kallep](https://www.ruby-forum.com/u/kallep)\
**Replies:** 3\
**Last updated:** [April 10, 2009, 1:10pm UTC](https://www.ruby-forum.com/t/why-ruby-license/165113 "2009-04-10T13:10:22Z")

</div>

All these different licenses makes me confused. As I been understand it you may choose a GPL license or Ruby’s own license. The GPL license is not compatible with, for example, the MTT license which Rail is released …

---

## [Strange result from to\_a](https://www.ruby-forum.com/t/strange-result-from-to-a/165208)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 4\
**Last updated:** [April 10, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/strange-result-from-to-a/165208 "2009-04-10T12:57:29Z")

</div>

I had unexpected results and could not figure out why puts (" “…”~").to\_a.inspect returns results of " " thru “9” m = \[\] (" “\[0\]…”~"\[0\]).to\_a.each{|c| m \<\< c.chr} puts m.inspect Is a longwinded way of getting the s…

---

## [MinGW $B$K$\*$1$k3HD%%i%$%V%i%j:n@.$H(B Ruby 1.8/1.9 $B6&B8$K$D$$$F(B](https://www.ruby-forum.com/t/mingw-b-k-1-k3hd-i-v-i-j-n-h-b-ruby-1-8-1-9-b6-b8-k-d-f-b/164450)

<div class="topic-metadata">

**Author:** [@Hajime\_H](https://www.ruby-forum.com/u/Hajime_H)\
**Replies:** 7\
**Last updated:** [April 10, 2009, 8:17am UTC](https://www.ruby-forum.com/t/mingw-b-k-1-k3hd-i-v-i-j-n-h-b-ruby-1-8-1-9-b6-b8-k-d-f-b/164450 "2009-04-10T08:17:37Z")

</div>

e$B@1$H?=$7$^$9!#e(B e$B;d$Oe(B MinGW e$B$Ge(B Ruby e$B3HD%%i%$%V%i%j$r:n@.$7$F$$$^$9!#e(B e$B$=$N:\]$Ke(B Ruby 1.8 e$BMQ$He(B Ruby 1.9 e$BMQ$N3HD%%i%$%V%i%j$rJL!9$K:n$j$?$$$N$G$9$,!"e(B MinGW e$B$K$\*$$$Fe(B Ruby 1…

---

## [DRY up consecutive gsub's - How to](https://www.ruby-forum.com/t/dry-up-consecutive-gsubs-how-to/165198)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 3\
**Last updated:** [April 10, 2009, 4:50am UTC](https://www.ruby-forum.com/t/dry-up-consecutive-gsubs-how-to/165198 "2009-04-10T04:50:44Z")

</div>

Hi, I have a csv file suitable for an Excel display. The file has column- names on certain row. In order to process subsequent rows I want to refer to their columns symbolically using the column-names. That requires…

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

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