# Ruby

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

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

---

## [Uninitialized constant ActionController (NameError)](https://www.ruby-forum.com/t/uninitialized-constant-actioncontroller-nameerror/177155)

<div class="topic-metadata">

**Author:** [@martin-ga](https://www.ruby-forum.com/u/martin-ga)\
**Replies:** 1\
**Last updated:** [October 13, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-actioncontroller-nameerror/177155 "2009-10-13T12:07:47Z")

</div>

Hello, My ruby cannot find a class from the actionpack gem: require ‘rubygems’ require ‘actionpack’ ActionController::Session::AbstractStore =\> uninitialized constant ActionController (NameError) Directly adding th…

---

## [Scope of constants in instance\_eval](https://www.ruby-forum.com/t/scope-of-constants-in-instance-eval/177034)

<div class="topic-metadata">

**Author:** [@peterk](https://www.ruby-forum.com/u/peterk)\
**Replies:** 6\
**Last updated:** [October 13, 2009, 10:52am UTC](https://www.ruby-forum.com/t/scope-of-constants-in-instance-eval/177034 "2009-10-13T10:52:54Z")

</div>

so If I do class MyObj \< Module CONST = ‘xxx’ def initalialize(&block) super(&block) end end MyObj.new do puts(“CONST = #{CONST}”) end this will print unitialized constant CONST So how…

---

## [Making one reg ex out of two](https://www.ruby-forum.com/t/making-one-reg-ex-out-of-two/176996)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 7\
**Last updated:** [October 13, 2009, 9:39am UTC](https://www.ruby-forum.com/t/making-one-reg-ex-out-of-two/176996 "2009-10-13T09:39:39Z")

</div>

I have a string: course\_info = “10.10.09Maths” I want to use a reg ex to extract the title from the string, in this case “Maths” So far I came up with: course\_info.gsub!(/^(.)/, “”) course\_info.gsub!(/\</title\>(.)$…

---

## [How to call an foreign program(compiled) from ruby?](https://www.ruby-forum.com/t/how-to-call-an-foreign-program-compiled-from-ruby/177194)

<div class="topic-metadata">

**Author:** [@harry](https://www.ruby-forum.com/u/harry)\
**Replies:** 3\
**Last updated:** [October 13, 2009, 8:55am UTC](https://www.ruby-forum.com/t/how-to-call-an-foreign-program-compiled-from-ruby/177194 "2009-10-13T08:55:26Z")

</div>

Hi, I am trying to use some bin(like exe files under windows) file under linux , these program is compiled from c++ source, can be executed in command line . I am just wondering what is the simple way to call these pr…

---

## [Need Help with this problem](https://www.ruby-forum.com/t/need-help-with-this-problem/177183)

<div class="topic-metadata">

**Author:** [@ghostalpha](https://www.ruby-forum.com/u/ghostalpha)\
**Replies:** 4\
**Last updated:** [October 13, 2009, 7:16am UTC](https://www.ruby-forum.com/t/need-help-with-this-problem/177183 "2009-10-13T07:16:00Z")

</div>

I am in this programming class and need help on this problem: Defines a Ruby class, Vehicle, with attributes weight, length width and height. The Vehicle class should have a class variable counts the number of vehicl…

---

## [Loofah 0.3.1 Released](https://www.ruby-forum.com/t/loofah-0-3-1-released/177197)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 1\
**Last updated:** [October 13, 2009, 7:10am UTC](https://www.ruby-forum.com/t/loofah-0-3-1-released/177197 "2009-10-13T07:10:39Z")

</div>

loofah version 0.3.1 has been released! http://loofah.rubyforge.org http://rubyforge.org/projects/loofah http://github.com/flavorjones/loofah Loofah is an HTML sanitizer. It will always fix broken markup, but can als…

---

## [Etc.passwd on OS X](https://www.ruby-forum.com/t/etc-passwd-on-os-x/177190)

<div class="topic-metadata">

**Author:** [@rooster](https://www.ruby-forum.com/u/rooster)\
**Replies:** 3\
**Last updated:** [October 13, 2009, 5:59am UTC](https://www.ruby-forum.com/t/etc-passwd-on-os-x/177190 "2009-10-13T05:59:40Z")

</div>

Hi, I’m wondering if anyone knows how the Etc class locates users for OS X. The documentation suggests that it simply parses the /etc/passwd file and returns a list of the users in there. However, I don’t think this …

---

## [Manually sort array of numbers](https://www.ruby-forum.com/t/manually-sort-array-of-numbers/177182)

<div class="topic-metadata">

**Author:** [@leveille](https://www.ruby-forum.com/u/leveille)\
**Replies:** 5\
**Last updated:** [October 13, 2009, 5:24am UTC](https://www.ruby-forum.com/t/manually-sort-array-of-numbers/177182 "2009-10-13T05:24:07Z")

</div>

for the sake of learning, I built a sort method to sort an array of numbers manually rather than with the built-in Array#sort method. below is my code. Would you say this is a “good” way to do it? def sort\_array(array…

---

## [Newbie questions regarding IronRuby in Silverlight](https://www.ruby-forum.com/t/newbie-questions-regarding-ironruby-in-silverlight/176565)

<div class="topic-metadata">

**Author:** [@zoltan](https://www.ruby-forum.com/u/zoltan)\
**Replies:** 12\
**Last updated:** [October 13, 2009, 1:20am UTC](https://www.ruby-forum.com/t/newbie-questions-regarding-ironruby-in-silverlight/176565 "2009-10-13T01:20:37Z")

</div>

Hi Guys, How do we, for example, use BigDecimal in IronRuby within a Silverlight application? When we just require ‘bigdecimal’, we get an error saying that file can’t be found. Do we have to add that and other ruby …

---

## [Ruby trunk](https://www.ruby-forum.com/t/ruby-trunk/177185)

<div class="topic-metadata">

**Author:** [@jonas\_s](https://www.ruby-forum.com/u/jonas_s)\
**Replies:** 4\
**Last updated:** [October 13, 2009, 12:54am UTC](https://www.ruby-forum.com/t/ruby-trunk/177185 "2009-10-13T00:54:49Z")

</div>

Hey guys, I have a question: why is the official ruby repo still on SVN and not on Git? I think git provides much better collaborative options. What about just putting on GitHub so everyone can fork from there etc., …

---

## [Does ruby.h overrides C "enum"?](https://www.ruby-forum.com/t/does-ruby-h-overrides-c-enum/177153)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 18\
**Last updated:** [October 12, 2009, 11:41pm UTC](https://www.ruby-forum.com/t/does-ruby-h-overrides-c-enum/177153 "2009-10-12T23:41:38Z")

</div>

Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when using “enum”: #include “ruby.h” int void(void) { enum kk {ONE, TWO, THREE}; // line 3 } line 3: error: expected identifier before â€˜(â€™ token …

---

## [Remove specific text from line](https://www.ruby-forum.com/t/remove-specific-text-from-line/177176)

<div class="topic-metadata">

**Author:** [@cidol](https://www.ruby-forum.com/u/cidol)\
**Replies:** 6\
**Last updated:** [October 12, 2009, 11:09pm UTC](https://www.ruby-forum.com/t/remove-specific-text-from-line/177176 "2009-10-12T23:09:29Z")

</div>

Hi thanks for all the help on my previous question, but now I am trying to clean up the output of some text output. currently I have: Time@110.075: EVENT: \[LOG\] \*\*\* DEBUG ACTION \*\*\* and I’d like it to have: 110.075…

---

## [Controller](https://www.ruby-forum.com/t/controller/177174)

<div class="topic-metadata">

**Author:** [@player\_man](https://www.ruby-forum.com/u/player_man)\
**Replies:** 2\
**Last updated:** [October 12, 2009, 9:27pm UTC](https://www.ruby-forum.com/t/controller/177174 "2009-10-12T21:27:34Z")

</div>

hello. what does this mean??? NoMethodError in BooksController#index You have a nil object when you didn’t expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating ni…

---

## [Code Review: InitDefMethod](https://www.ruby-forum.com/t/code-review-initdefmethod/177172)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [October 12, 2009, 9:00pm UTC](https://www.ruby-forum.com/t/code-review-initdefmethod/177172 "2009-10-12T21:00:02Z")

</div>

tfpt review “/shelveset:InitDefMethod;REDMOND\\tomat” Comment : Fixes bug in class initializer call - initialize defined via define\_method didn’t work. Tomas

---

## [Code Review: ExplicitIfaces](https://www.ruby-forum.com/t/code-review-explicitifaces/177170)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [October 12, 2009, 9:00pm UTC](https://www.ruby-forum.com/t/code-review-explicitifaces/177170 "2009-10-12T21:00:02Z")

</div>

tfpt review “/shelveset:ExplicitIfaces;REDMOND\\tomat” Comment : Generalizes clr\_member to support calls to an explicit implementation of an interface method as well as a base class method hidden by a “new slot” meth…

---

## [Joda-time in jruby-complete-1.4.0RC1?](https://www.ruby-forum.com/t/joda-time-in-jruby-complete-1-4-0rc1/177011)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [October 12, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/joda-time-in-jruby-complete-1-4-0rc1/177011 "2009-10-12T19:59:09Z")

</div>

hello, when I switched from jruby-complete-1.3.1 to jruby-complete-1.4.0RC1.jar I missed joda-time. or do I have a corrupted jar ? with regards Kristian To unsubscribe from this list, please visit: http://xircles.…

---

## [Find a print out a line](https://www.ruby-forum.com/t/find-a-print-out-a-line/176954)

<div class="topic-metadata">

**Author:** [@cidol](https://www.ruby-forum.com/u/cidol)\
**Replies:** 9\
**Last updated:** [October 12, 2009, 7:50pm UTC](https://www.ruby-forum.com/t/find-a-print-out-a-line/176954 "2009-10-12T19:50:00Z")

</div>

Hi I am slowly learning Ruby and working on a solution. I have huge text files with tons of garbage and I want to extract just specific lines including the word ‘TestPhase’. Looking for simple solutions, just strugg…

---

## [Any "easy" example of using T\_HASH in a C extension?](https://www.ruby-forum.com/t/any-easy-example-of-using-t-hash-in-a-c-extension/177162)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 4\
**Last updated:** [October 12, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/any-easy-example-of-using-t-hash-in-a-c-extension/177162 "2009-10-12T19:39:50Z")

</div>

Hi, I’ve found some tutorials explaining how to create and manipulat a Ruby array from a C extension using T\_ARRAY and its realted functions. However I find nothing about T\_HASH, and trying to extract the functions f…

---

## [Subclassing in module from top module?](https://www.ruby-forum.com/t/subclassing-in-module-from-top-module/177161)

<div class="topic-metadata">

**Author:** [@vo\_x](https://www.ruby-forum.com/u/vo_x)\
**Replies:** 3\
**Last updated:** [October 12, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/subclassing-in-module-from-top-module/177161 "2009-10-12T19:32:19Z")

</div>

Hello everybody, I would like to have locally monkeypatched Hash in my module. I would expect that following example will work, however it doesn’t. How to do it correctly? irb(main):016:0\> module Foo irb(main):017:1\>…

---

## [Passing java classes to methods](https://www.ruby-forum.com/t/passing-java-classes-to-methods/177147)

<div class="topic-metadata">

**Author:** [@Mathijs\_K](https://www.ruby-forum.com/u/Mathijs_K)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 7:11pm UTC](https://www.ruby-forum.com/t/passing-java-classes-to-methods/177147 "2009-10-12T19:11:09Z")

</div>

Hi all, I have a java method that requires one or more classes: public class FlagBinder { public static Module parseFlags(String\[\] args, Class\<?\>… flagSettings) throws ParseException { I tried different kinds of co…

---

## [\[ANN\] New RJack gems released](https://www.ruby-forum.com/t/ann-new-rjack-gems-released/177106)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 7:07pm UTC](https://www.ruby-forum.com/t/ann-new-rjack-gems-released/177106 "2009-10-12T19:07:03Z")

</div>

Hi folks, The RJack project \< http://rjack.rubyforge.org/ \> provides a set of common open source java components as gems for JRuby. I’ve just released a set of updates and an expended set of new gems. Probably the mos…

---

## [Re: public windows build server](https://www.ruby-forum.com/t/re-public-windows-build-server/177122)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/re-public-windows-build-server/177122 "2009-10-12T18:58:16Z")

</div>

That’s kind of odd that we have that shortname issue on a current gen OS. I have seen issues with time being off, I just didn’t realize it was a Redmond-centricity issue. See if MRI 1.8.6p287 or higher fixes the MRI t…

---

## [SGF Parser library released](https://www.ruby-forum.com/t/sgf-parser-library-released/176657)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 3\
**Last updated:** [October 12, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/sgf-parser-library-released/176657 "2009-10-12T18:54:49Z")

</div>

SGF stands for Smart Game Format, it’s best known for storing go games, but also stores chess, backgammon and a whole bunch of other similar games. I’ve got a ‘working’ version of an SGF parser. I have issues with K…

---

## [Java2d and rack](https://www.ruby-forum.com/t/java2d-and-rack/177139)

<div class="topic-metadata">

**Author:** [@dishkuvek](https://www.ruby-forum.com/u/dishkuvek)\
**Replies:** 4\
**Last updated:** [October 12, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/java2d-and-rack/177139 "2009-10-12T18:53:00Z")

</div>

Before I dive too deeply into this myself (having never done java2d before), just thought I’d ask if anyone had any experience in using java2d from jruby? Ideally I’m after a rack middleware that can transform images …

---

## [Threadpool - jruby and threads](https://www.ruby-forum.com/t/threadpool-jruby-and-threads/177078)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 10\
**Last updated:** [October 12, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/threadpool-jruby-and-threads/177078 "2009-10-12T18:52:25Z")

</div>

Hi, New to jruby. I’ve built a little thread pool library which creates a bunch of threads using Thread.new and has them being blocked on a ruby Queue via Queue#pop (or deq). I was hoping someone could verify that I…

---

## [UTF-8 string conversion difficulties in JRuby](https://www.ruby-forum.com/t/utf-8-string-conversion-difficulties-in-jruby/176772)

<div class="topic-metadata">

**Author:** [@serguei\_f](https://www.ruby-forum.com/u/serguei_f)\
**Replies:** 6\
**Last updated:** [October 12, 2009, 6:29pm UTC](https://www.ruby-forum.com/t/utf-8-string-conversion-difficulties-in-jruby/176772 "2009-10-12T18:29:34Z")

</div>

The following code correctly determines that a string is not UTF-8 in ruby 1.8.6, but in JRuby this doesn’t work. require ‘iconv’ require ‘stringio’ non\_utf8 = “\\xa4” utf8 = Iconv.conv(‘UTF-8//IGNORE’, ‘UTF-8’, non\_…

---

## [Overriding static java methods in jruby](https://www.ruby-forum.com/t/overriding-static-java-methods-in-jruby/177144)

<div class="topic-metadata">

**Author:** [@Mathijs\_K](https://www.ruby-forum.com/u/Mathijs_K)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 6:15pm UTC](https://www.ruby-forum.com/t/overriding-static-java-methods-in-jruby/177144 "2009-10-12T18:15:31Z")

</div>

Hi all, I have a java class like this: public class A { public static void method\_a(String name) { // some stuff } public static void method\_b(String name) { method\_a(name); } } I want to override this behaviou…

---

## [\[p 3,4\] is syntax error in trunk](https://www.ruby-forum.com/t/p-3-4-is-syntax-error-in-trunk/177140)

<div class="topic-metadata">

**Author:** [@masayoshi\_takahashi](https://www.ruby-forum.com/u/masayoshi_takahashi)\
**Replies:** 2\
**Last updated:** [October 12, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/p-3-4-is-syntax-error-in-trunk/177140 "2009-10-12T17:48:01Z")

</div>

e$B9b66@,5A$G$9!#e(Bruby-lang.orge$B$Ne(Bwebmastere$B08$KLd$$9g$o$;$,$"$C$?$Ne(B e$B$G$9$,!"$3$A$i$KJs9p$7$^$9!#e(B \[\]e$B$NCf$G!"%+%C%3$J$7$N%a%=%C%I8F$S=P$7$r$7$h$&$H$9$k$H!"e(B1.8e$B$G$Oe(B OKe$B$@$C$?$b$N$,e(B1.9e$…

---

## [Soap4r header without a namespace](https://www.ruby-forum.com/t/soap4r-header-without-a-namespace/177157)

<div class="topic-metadata">

**Author:** [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Replies:** 0\
**Last updated:** [October 12, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/soap4r-header-without-a-namespace/177157 "2009-10-12T16:56:43Z")

</div>

Hello all. I’m trying to create a header using soap4r and the web service I’m calling requires a Username and Password to be sent as individual elements of the header. I’ve overridden SOAP::Header::SimpleHandler as …

---

## [Getaddrinfo: Name or service not known (SocketError) in net/ftp](https://www.ruby-forum.com/t/getaddrinfo-name-or-service-not-known-socketerror-in-net-ftp/176974)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 3\
**Last updated:** [October 12, 2009, 4:20pm UTC](https://www.ruby-forum.com/t/getaddrinfo-name-or-service-not-known-socketerror-in-net-ftp/176974 "2009-10-12T16:20:45Z")

</div>

boron e$B$G5$$,$D$$$?$N$G$9$,!"e(Bnet/ftp e$B$Ge(B login e$B$N$H$-$Ke(B SocketError e$B$K$J$j$^$9!#e(B % ./ruby -rnet/ftp -e ’ ftp = Net::FTP.open(“ftp.ruby-lang.org”) ftp.login ’ /home/akr/chkbuild/tmp/build/ruby-…

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

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