# Ruby

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

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

---

## [Need help on How to apply a fix to Ramaze!](https://www.ruby-forum.com/t/need-help-on-how-to-apply-a-fix-to-ramaze/165601)

<div class="topic-metadata">

**Author:** [@rubina](https://www.ruby-forum.com/u/rubina)\
**Replies:** 4\
**Last updated:** [April 15, 2009, 11:54pm UTC](https://www.ruby-forum.com/t/need-help-on-how-to-apply-a-fix-to-ramaze/165601 "2009-04-15T23:54:51Z")

</div>

Hello team, I am having a problem with Ramaze. I submitted a question and a helpful team member gave me the info below. The problem is that I don’t know how to apply the path and so I would like someones help. The…

---

## [Ruby in vim throws an error](https://www.ruby-forum.com/t/ruby-in-vim-throws-an-error/165635)

<div class="topic-metadata">

**Author:** [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Replies:** 0\
**Last updated:** [April 15, 2009, 11:34pm UTC](https://www.ruby-forum.com/t/ruby-in-vim-throws-an-error/165635 "2009-04-15T23:34:42Z")

</div>

Hi, I wasn’t sure where else to post this. I just installed the Ruby configuration files for vim, from http://vim-ruby.rubyforge.org/. When I enable indentation like: filetype plugin indent on When I open a .rb file…

---

## [CR: More .net interop specs](https://www.ruby-forum.com/t/cr-more-net-interop-specs/165523)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [April 15, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/cr-more-net-interop-specs/165523 "2009-04-15T23:04:26Z")

</div>

refactor method specs to use a shared behaviorhttp://github.com/jredville/ironruby/commit/d6312a86dd317060cc27c110b6846a01b32c7e68 namespace mapping and method addition specshttp://github.com/jredvil…

---

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

<div class="topic-metadata">

**Author:** [@M\_C](https://www.ruby-forum.com/u/M_C)\
**Replies:** 0\
**Last updated:** [April 15, 2009, 9:50pm UTC](https://www.ruby-forum.com/t/sv-strange-error-when-calling-into-jruby1-2-from-java-using-javax-scripting/165630 "2009-04-15T21:50:23Z")

</div>

Just found out myself by more testing that the problem is a bug in the javax.script implementation for JRuby 1.2.The javax.script standard specifies that to convert a returned object from ScriptEngine.eval to a java i…

---

## [Ruby with postgresql and jruby jdbcpostgresql](https://www.ruby-forum.com/t/ruby-with-postgresql-and-jruby-jdbcpostgresql/165569)

<div class="topic-metadata">

**Author:** [@msan](https://www.ruby-forum.com/u/msan)\
**Replies:** 3\
**Last updated:** [April 15, 2009, 9:45pm UTC](https://www.ruby-forum.com/t/ruby-with-postgresql-and-jruby-jdbcpostgresql/165569 "2009-04-15T21:45:41Z")

</div>

I have two simple applications: one in ruby and on in jruby. I’ve noticed that the one in ruby that uses postgresql adapter is faster in queries than one in jruby that uses jdbcpostgresql adapter. To unsubscribe from…

---

## [Code Review: OldInterpreter](https://www.ruby-forum.com/t/code-review-oldinterpreter/165620)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [April 15, 2009, 8:30pm UTC](https://www.ruby-forum.com/t/code-review-oldinterpreter/165620 "2009-04-15T20:30:29Z")

</div>

tfpt review “/shelveset:OldInterpreter;REDMOND\\tomat” Moves old interpreter to Ruby. Cleans up scope factories (removes out parameters). A couple of other small tweaks. Tomas

---

## [Xml-fun and how do I make a method shorter](https://www.ruby-forum.com/t/xml-fun-and-how-do-i-make-a-method-shorter/165619)

<div class="topic-metadata">

**Author:** [@kristho](https://www.ruby-forum.com/u/kristho)\
**Replies:** 2\
**Last updated:** [April 15, 2009, 8:28pm UTC](https://www.ruby-forum.com/t/xml-fun-and-how-do-i-make-a-method-shorter/165619 "2009-04-15T20:28:55Z")

</div>

I’ve got a little problem. http://pastie.org/447561 I want the parseFile-method to do what the outcommented-method do - just shorter and prettier. Anyone who can give some tips on how I can do this?

---

## [JRuby namespace error?](https://www.ruby-forum.com/t/jruby-namespace-error/165622)

<div class="topic-metadata">

**Author:** [@pablo](https://www.ruby-forum.com/u/pablo)\
**Replies:** 1\
**Last updated:** [April 15, 2009, 8:17pm UTC](https://www.ruby-forum.com/t/jruby-namespace-error/165622 "2009-04-15T20:17:00Z")

</div>

Hi I am new at playing with JRuby, as part of my initial testing I have attempted to package a program I wrote into a jar file. I have been able to get it to run, but it seems java is resolving a namespace in the wro…

---

## [Parsing Fixed Width File](https://www.ruby-forum.com/t/parsing-fixed-width-file/165537)

<div class="topic-metadata">

**Author:** [@paerez](https://www.ruby-forum.com/u/paerez)\
**Replies:** 4\
**Last updated:** [April 15, 2009, 7:34pm UTC](https://www.ruby-forum.com/t/parsing-fixed-width-file/165537 "2009-04-15T19:34:37Z")

</div>

Hello, all. Does anyone know of a good or any for that matter library (gem) to parse fixed width files? I’ve looked into active-warehouse - but it looks like it’s for rails only and docs are a bit underdeveloped for…

---

## [? true : false returns nil?](https://www.ruby-forum.com/t/true-false-returns-nil/165617)

<div class="topic-metadata">

**Author:** [@rcordner](https://www.ruby-forum.com/u/rcordner)\
**Replies:** 4\
**Last updated:** [April 15, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/true-false-returns-nil/165617 "2009-04-15T19:25:11Z")

</div>

I have the following code fragment: i = 1 j = case i when 1 true else false end I would expect j to equal true after the run, but it equals nil. If I change the return values to anything else but true and false,…

---

## [Background image defined in stylesheet doesn't display](https://www.ruby-forum.com/t/background-image-defined-in-stylesheet-doesnt-display/165610)

<div class="topic-metadata">

**Author:** [@rubio](https://www.ruby-forum.com/u/rubio)\
**Replies:** 3\
**Last updated:** [April 15, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/background-image-defined-in-stylesheet-doesnt-display/165610 "2009-04-15T18:58:28Z")

</div>

application.html.erb is correctly finding the stylesheet for my project via \<%= stylesheet\_link\_tag ‘style1’ %\>. My webpages reflect the styling properly with a few exceptions … the most notable being some .jpg image…

---

## [Grrrrrrrrrr...why It doesn't work under tomcat?](https://www.ruby-forum.com/t/grrrrrrrrrr-why-it-doesnt-work-under-tomcat/165600)

<div class="topic-metadata">

**Author:** [@msan](https://www.ruby-forum.com/u/msan)\
**Replies:** 2\
**Last updated:** [April 15, 2009, 6:47pm UTC](https://www.ruby-forum.com/t/grrrrrrrrrr-why-it-doesnt-work-under-tomcat/165600 "2009-04-15T18:47:21Z")

</div>

I have rails 2.3.2 with jruby 1.2.0. I create my application.war, deploy under tomcat and it is the error: GRAVE: Exception caught /home/u/apache-tomcat-6.0.18/webapps/jAlboFornitori/WEB-INF/gems/gems/actionpack-2.3.2…

---

## [Active record - Oracle DATE/TIMESTAMP issue](https://www.ruby-forum.com/t/active-record-oracle-date-timestamp-issue/165608)

<div class="topic-metadata">

**Author:** [@cvcomp](https://www.ruby-forum.com/u/cvcomp)\
**Replies:** 0\
**Last updated:** [April 15, 2009, 5:40pm UTC](https://www.ruby-forum.com/t/active-record-oracle-date-timestamp-issue/165608 "2009-04-15T17:40:45Z")

</div>

Hi, I am new to active record so apologies for the newbie question, but I am trying to set it up to access an Oracle database. Please note, this not a rails app and never will be. I want to use JRuby to write dashboar…

---

## [Installing rubygame on 1.9](https://www.ruby-forum.com/t/installing-rubygame-on-1-9/165575)

<div class="topic-metadata">

**Author:** [@john\_maclean](https://www.ruby-forum.com/u/john_maclean)\
**Replies:** 1\
**Last updated:** [April 15, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/installing-rubygame-on-1-9/165575 "2009-04-15T17:20:29Z")

</div>

OS = Debian Lenny version = 1.9 objective = install rubygame from gem outcome = barf any clues? Should I point gem to a directory? gem1.9 install rubygame --remote Building native extensions. This could take a whi…

---

## [Small bounties for fixing this text editor (written in ruby)](https://www.ruby-forum.com/t/small-bounties-for-fixing-this-text-editor-written-in-ruby/165548)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 3\
**Last updated:** [April 15, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/small-bounties-for-fixing-this-text-editor-written-in-ruby/165548 "2009-04-15T17:15:12Z")

</div>

They’re not much, but since I’m rather lazy, I’ve offered a few bounties for anyone wanting to improve the arcadia ruby text editor http://wiki.github.com/angal/arcadia/to-do at the bottom. Cheers! -=r

---

## [Pretty format arrays](https://www.ruby-forum.com/t/pretty-format-arrays/165595)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 2\
**Last updated:** [April 15, 2009, 4:59pm UTC](https://www.ruby-forum.com/t/pretty-format-arrays/165595 "2009-04-15T16:59:21Z")

</div>

Hello, I am using OptionParser and one of the nifty things it has is multi line descriptions for each option. I have a particularly long list of valid arguments for a valid option, for instance cities=\[London,Paris,N…

---

## [Error when running Cucumber examples with IronRuby](https://www.ruby-forum.com/t/error-when-running-cucumber-examples-with-ironruby/164350)

<div class="topic-metadata">

**Author:** [@chamini](https://www.ruby-forum.com/u/chamini)\
**Replies:** 10\
**Last updated:** [April 15, 2009, 4:58pm UTC](https://www.ruby-forum.com/t/error-when-running-cucumber-examples-with-ironruby/164350 "2009-04-15T16:58:10Z")

</div>

Hi, I have been putting all my might to get the simple examples working with IronRuby and Cucumber. I followed ironruby-and-net guidlines in the following link. http://wiki.github.com/aslakhellesoy/cucumber/ironruby-…

---

## [Ruby Best Practices interview w/ Gregory Brown](https://www.ruby-forum.com/t/ruby-best-practices-interview-w-gregory-brown/165597)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [April 15, 2009, 4:34pm UTC](https://www.ruby-forum.com/t/ruby-best-practices-interview-w-gregory-brown/165597 "2009-04-15T16:34:05Z")

</div>

I just posted a short interview with Gregory B. about his upcoming book and new blog: On Ruby: Ruby Best Practices: mini-interview 3 Oh, and congrats Gregory. (read the interview to find out why) – thanks, -pate D…

---

## [Short cut for gsub("word","")](https://www.ruby-forum.com/t/short-cut-for-gsub-word/165437)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 2\
**Last updated:** [April 15, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/short-cut-for-gsub-word/165437 "2009-04-15T15:15:18Z")

</div>

is there any shortcut for removing a string of characters from text, like gsub(“word”,""). I looked into String#delete but it will delete all the characters in the entire word. Im guessing something like this already …

---

## [OptionParser and Exceptions](https://www.ruby-forum.com/t/optionparser-and-exceptions/165581)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 5\
**Last updated:** [April 15, 2009, 3:12pm UTC](https://www.ruby-forum.com/t/optionparser-and-exceptions/165581 "2009-04-15T15:12:16Z")

</div>

Hello, The following code: require ‘optparse’ optparser = OptionParser.new do |args| list=\[:foo,:bar,:baz\] begin args.on("–l \[OPTION\]",list,“Blah”) { |o| } rescue puts “Rescuing in the block” end end begin op…

---

## [New to Ruby - Need Help](https://www.ruby-forum.com/t/new-to-ruby-need-help/165567)

<div class="topic-metadata">

**Author:** [@renegade85](https://www.ruby-forum.com/u/renegade85)\
**Replies:** 2\
**Last updated:** [April 15, 2009, 3:01pm UTC](https://www.ruby-forum.com/t/new-to-ruby-need-help/165567 "2009-04-15T15:01:15Z")

</div>

Hi I am currently doing a project that requires me to extract news stories from a website and add them to a mysql database. I downloaded and installed ruby and was thinking on using firebug and hpricot to help me alo…

---

## [Copying files and renaming dupes](https://www.ruby-forum.com/t/copying-files-and-renaming-dupes/165566)

<div class="topic-metadata">

**Author:** [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Replies:** 6\
**Last updated:** [April 15, 2009, 3:01pm UTC](https://www.ruby-forum.com/t/copying-files-and-renaming-dupes/165566 "2009-04-15T15:01:00Z")

</div>

Hi all, I have a quick query. I am copying data from a hard drive into a folder structure, however some of files have the same name and therefore get overwritten by the most recent file with that name. I have been us…

---

## [How to sort my hash](https://www.ruby-forum.com/t/how-to-sort-my-hash/165563)

<div class="topic-metadata">

**Author:** [@prince\_tambar](https://www.ruby-forum.com/u/prince_tambar)\
**Replies:** 6\
**Last updated:** [April 15, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/how-to-sort-my-hash/165563 "2009-04-15T14:52:44Z")

</div>

\[#\<WorkOrder id: 8, initiator\_id: 39, is\_marked: false, work\_order\_type\_id: 1, descript: “\<p class=”\\“MsoNormal\\”" style=""\>\<span s…", current\_owner\_id: 39, created\_by: 39, client\_id: 9, is\_active: nil, subject: “My n…

---

## [Pulling values from strings](https://www.ruby-forum.com/t/pulling-values-from-strings/165524)

<div class="topic-metadata">

**Author:** [@mifi](https://www.ruby-forum.com/u/mifi)\
**Replies:** 4\
**Last updated:** [April 15, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/pulling-values-from-strings/165524 "2009-04-15T14:46:19Z")

</div>

I have a string of data that I am trying to pull values from and have hit a roadblack since I am still getting the hang of Ruby, in Perl this would be easier but it seems that Ruby may be able to do this much simpler. …

---

## [What works for you when you use git on windows?](https://www.ruby-forum.com/t/what-works-for-you-when-you-use-git-on-windows/165574)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 4\
**Last updated:** [April 15, 2009, 2:39pm UTC](https://www.ruby-forum.com/t/what-works-for-you-when-you-use-git-on-windows/165574 "2009-04-15T14:39:44Z")

</div>

Hi, I’m having bad times trying to just pull my fork on Windows. So far I always pulled from the Mac, and used a shared folder inside a Parallels VM to run what I needed. Now that I want to edit the IronRuby code un…

---

## [ActiveRecord without Rails: necessary to close connection?](https://www.ruby-forum.com/t/activerecord-without-rails-necessary-to-close-connection/165555)

<div class="topic-metadata">

**Author:** [@mischa78](https://www.ruby-forum.com/u/mischa78)\
**Replies:** 3\
**Last updated:** [April 15, 2009, 2:22pm UTC](https://www.ruby-forum.com/t/activerecord-without-rails-necessary-to-close-connection/165555 "2009-04-15T14:22:28Z")

</div>

Hello everyone, This is the first time I want to use ActiveRecord outside Rails. This is my (simplified) code: ActiveRecord::Base.establish\_connection( :adapter =\> ‘mysql’, :host =\> ‘localhost’, :username =\> ‘…

---

## [What is the equivalent of \<lang\>'s \<feature\> in ruby?](https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479)

<div class="topic-metadata">

**Author:** [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Replies:** 4\
**Last updated:** [April 15, 2009, 2:10pm UTC](https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479 "2009-04-15T14:10:24Z")

</div>

Is there a website that documents which method in ruby is equivalent to which function in PHP? Or any other programming language? I could swear something like this has been posted to this list before, but I couldn’t f…

---

## [Rubyscript2exe problem with Qt::File](https://www.ruby-forum.com/t/rubyscript2exe-problem-with-qt-file/165579)

<div class="topic-metadata">

**Author:** [@Markus\_Hoffmann](https://www.ruby-forum.com/u/Markus_Hoffmann)\
**Replies:** 0\
**Last updated:** [April 15, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/rubyscript2exe-problem-with-qt-file/165579 "2009-04-15T13:39:18Z")

</div>

Hi ! I have written a small ruby Qt application under Windows XP. For this I used the Ruby Qt Binding ( http://vision.eng.shu.ac.uk/mmvlwiki/index.php/Qt4-QtRuby\_installer\_for\_Microsoft\_Windows ), Qt version 4.3.4 an…

---

## [Which warbler?](https://www.ruby-forum.com/t/which-warbler/165570)

<div class="topic-metadata">

**Author:** [@msan](https://www.ruby-forum.com/u/msan)\
**Replies:** 1\
**Last updated:** [April 15, 2009, 1:23pm UTC](https://www.ruby-forum.com/t/which-warbler/165570 "2009-04-15T13:23:29Z")

</div>

jruby -S gem search -r warbler displays: aslakhellesoy-warbler (0.9.13) bekkopen-warbler (0.9.13.1) fjc-warbler (0.9.12) nicksieger-warbler (0.9.12) warbler (0.9.12) which one I have to install? To unsubscribe fr…

---

## [\[patch\] Fixes for Array#\[\]=](https://www.ruby-forum.com/t/patch-fixes-for-array/165505)

<div class="topic-metadata">

**Author:** [@murena](https://www.ruby-forum.com/u/murena)\
**Replies:** 2\
**Last updated:** [April 15, 2009, 11:15am UTC](https://www.ruby-forum.com/t/patch-fixes-for-array/165505 "2009-04-15T11:15:43Z")

</div>

Hi, I’ve just committed my first patch to IronRuby on my forked repository, this is the URL for the diff: This patch fixes 4 failures in core/array/element\_set\_spec.rb, namely: Array#\[\]= inserts the given elements …

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

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