# Ruby

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

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

---

## [Checking if input == Integer/String?](https://www.ruby-forum.com/t/checking-if-input-integer-string/157467)

<div class="topic-metadata">

**Author:** [@uholtz](https://www.ruby-forum.com/u/uholtz)\
**Replies:** 3\
**Last updated:** [January 11, 2009, 11:53pm UTC](https://www.ruby-forum.com/t/checking-if-input-integer-string/157467 "2009-01-11T23:53:32Z")

</div>

Hi, I’m all new to programming and all new to Ruby - hope I haven’t made a mistake by choosing this language. I’m trying to teach myself by creating tiny (mostly useless) little applications and then extend on them a…

---

## [Eventmachine questions?](https://www.ruby-forum.com/t/eventmachine-questions/157425)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 1\
**Last updated:** [January 11, 2009, 11:43pm UTC](https://www.ruby-forum.com/t/eventmachine-questions/157425 "2009-01-11T23:43:02Z")

</div>

I am starting to write a pretty simple UDP server using eventmachine. So far my code consists of a server which sleeps for a period of time and then echoes back what it got sent and a threaded client which sends a t…

---

## [Constant lookup when using namespaces](https://www.ruby-forum.com/t/constant-lookup-when-using-namespaces/157464)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [January 11, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/constant-lookup-when-using-namespaces/157464 "2009-01-11T21:44:05Z")

</div>

Here is an example. #!/usr/bin/ruby class A end class A::B def method\_one x = C.new puts x.blah end end class A::C def blah puts “I want this one” end end class C def blah puts “this is the wrong one” e…

---

## [Ruby Command Line One Liner](https://www.ruby-forum.com/t/ruby-command-line-one-liner/156715)

<div class="topic-metadata">

**Author:** [@helpy](https://www.ruby-forum.com/u/helpy)\
**Replies:** 6\
**Last updated:** [January 11, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/ruby-command-line-one-liner/156715 "2009-01-11T20:25:49Z")

</div>

Hi, I try to write a Ruby one-liner that replaces the header information of some \*.java files. My first try worked perfect for a single file. But I have no idea on how to change my one-liner to work with multiple fil…

---

## [Ruby 1.9 not finding gems](https://www.ruby-forum.com/t/ruby-1-9-not-finding-gems/157437)

<div class="topic-metadata">

**Author:** [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Replies:** 2\
**Last updated:** [January 11, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/ruby-1-9-not-finding-gems/157437 "2009-01-11T19:47:42Z")

</div>

Hello, I installed Ruby 1.9.1 on OSX Tiger using MacPorts. Then I installed Rubygems into the new installation (by running the setup.rb after changing my path to point to the new ruby executable). Any gems that I ins…

---

## [Active Record Or LINQ with IronRuby...?](https://www.ruby-forum.com/t/active-record-or-linq-with-ironruby/131903)

<div class="topic-metadata">

**Author:** [@rahil](https://www.ruby-forum.com/u/rahil)\
**Replies:** 14\
**Last updated:** [January 11, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/active-record-or-linq-with-ironruby/131903 "2009-01-11T17:11:50Z")

</div>

Hi, In my learning process, i am confused with the Advantages of ORM like " ActiveRecord" and “Linq to SQL” I would like to know… what majority developers think on this point. Is it worth to go with LINQ to take full…

---

## [Ruby Daemons on Windows](https://www.ruby-forum.com/t/ruby-daemons-on-windows/157447)

<div class="topic-metadata">

**Author:** [@sa125](https://www.ruby-forum.com/u/sa125)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 1:07pm UTC](https://www.ruby-forum.com/t/ruby-daemons-on-windows/157447 "2009-01-11T13:07:30Z")

</div>

Hello - I’m trying to use the daemons library to get a background process running, and all this is on a windows (xp) machine. I get an error saying the fork() function isn’t implemented on this machine(NotImplemented…

---

## [Namespaces a la C#](https://www.ruby-forum.com/t/namespaces-a-la-c/157443)

<div class="topic-metadata">

**Author:** [@joeytempest](https://www.ruby-forum.com/u/joeytempest)\
**Replies:** 2\
**Last updated:** [January 11, 2009, 12:19pm UTC](https://www.ruby-forum.com/t/namespaces-a-la-c/157443 "2009-01-11T12:19:13Z")

</div>

Hei everybody, I'm kind of new to ruby and, since i come from C#, one of the main things i’m missing is the .NET “project” way of organizing the codebase. As you probably know: in .NET you can arrange your code into …

---

## [Re: Git changes](https://www.ruby-forum.com/t/re-git-changes/157442)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 11:33am UTC](https://www.ruby-forum.com/t/re-git-changes/157442 "2009-01-11T11:33:30Z")

</div>

No prob JD

---

## [Advanced Technology](https://www.ruby-forum.com/t/advanced-technology/157436)

<div class="topic-metadata">

**Author:** [@rtlxgroups](https://www.ruby-forum.com/u/rtlxgroups)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 9:45am UTC](https://www.ruby-forum.com/t/advanced-technology/157436 "2009-01-11T09:45:46Z")

</div>

Technology is a concept that deals with knowledge of tools and crafts The word “technology” can also be used to refer to a collection of techniques Technology is the application of maths, science and the arts for the …

---

## [Dynamic adom-like text interface](https://www.ruby-forum.com/t/dynamic-adom-like-text-interface/157413)

<div class="topic-metadata">

**Author:** [@andrugator](https://www.ruby-forum.com/u/andrugator)\
**Replies:** 1\
**Last updated:** [January 11, 2009, 9:22am UTC](https://www.ruby-forum.com/t/dynamic-adom-like-text-interface/157413 "2009-01-11T09:22:38Z")

</div>

Hello. I would like to build an ADOM-like (http://www.adom.de/) interface. In few words it means, that application is controlled with keyboard and text output is redrawed like windows are redrawed in GUI. Is there so…

---

## [The power of JRuby](https://www.ruby-forum.com/t/the-power-of-jruby/157433)

<div class="topic-metadata">

**Author:** [@khelll](https://www.ruby-forum.com/u/khelll)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 9:14am UTC](https://www.ruby-forum.com/t/the-power-of-jruby/157433 "2009-01-11T09:14:46Z")

</div>

A blog post by me http://www.khelll.com/blog/ruby/the-power-of-jruby/

---

## [\[Bug #997\] % after %\> in erb](https://www.ruby-forum.com/t/bug-997-after-in-erb/157387)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 2\
**Last updated:** [January 11, 2009, 9:07am UTC](https://www.ruby-forum.com/t/bug-997-after-in-erb/157387 "2009-01-11T09:07:45Z")

</div>

Bug #997: % after %\> in erb http://redmine.ruby-lang.org/issues/show/997 e$B5/I\<\<Te(B: Yusuke E. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Masatoshi Seki, e$B%+%F%4%je(B: lib, Target version: 1.9.1 …

---

## [Trying to use RTranscoder to playback video on Win32 - sample code?](https://www.ruby-forum.com/t/trying-to-use-rtranscoder-to-playback-video-on-win32-sample-code/157431)

<div class="topic-metadata">

**Author:** [@Rua\_HM](https://www.ruby-forum.com/u/Rua_HM)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 8:26am UTC](https://www.ruby-forum.com/t/trying-to-use-rtranscoder-to-playback-video-on-win32-sample-code/157431 "2009-01-11T08:26:51Z")

</div>

I’m trying to use RTranscoder (http://rtranscoder.rubyforge.org/) to play back video files full screen on windows. I have installed RTranscoder and its dependencies (in particular RProgram) via gem and also installed …

---

## [Ruby "better" unhandled exception output](https://www.ruby-forum.com/t/ruby-better-unhandled-exception-output/157429)

<div class="topic-metadata">

**Author:** [@Rooger\_Pack](https://www.ruby-forum.com/u/Rooger_Pack)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 6:34am UTC](https://www.ruby-forum.com/t/ruby-better-unhandled-exception-output/157429 "2009-01-11T06:34:37Z")

</div>

Inspired by some blog post, unroller, Tracer, and Python, I bring you. backtracer why: the default unhandled exception screen output is somewhat sparse: ex: ruby crash.rb crash.rb:6:in go2': unhandled exception …

---

## [Libraries that need a new home](https://www.ruby-forum.com/t/libraries-that-need-a-new-home/157159)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 6\
**Last updated:** [January 11, 2009, 4:27am UTC](https://www.ruby-forum.com/t/libraries-that-need-a-new-home/157159 "2009-01-11T04:27:44Z")

</div>

Hi, As many of you know, Guy Decoux passed away last year. Consequently, there are 5 libraries on the RAA that will need new homes: http://raa.ruby-lang.org/search.rhtml?search=decoux I talked to Erik H. about having…

---

## [Encoding.locale\_charmap](https://www.ruby-forum.com/t/encoding-locale-charmap/157189)

<div class="topic-metadata">

**Author:** [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Replies:** 12\
**Last updated:** [January 11, 2009, 3:34am UTC](https://www.ruby-forum.com/t/encoding-locale-charmap/157189 "2009-01-11T03:34:21Z")

</div>

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B e$B$9$\_$^$;$s!%e(BEncoding.locale\_charmap e$B$K$D$$$F$\*?R$M$5$;$F$/$@$5$$!%e(B Ruby/Tk e$B$G!$e(Blocale e$B$Ne(B encoding e$B$rF@$k$?$a$Ke(B Encoding.find(Encoding.locale\_charmap) e$B$…

---

## [Count Coulmns in Excel file](https://www.ruby-forum.com/t/count-coulmns-in-excel-file/154831)

<div class="topic-metadata">

**Author:** [@ganeshguna](https://www.ruby-forum.com/u/ganeshguna)\
**Replies:** 3\
**Last updated:** [January 11, 2009, 2:00am UTC](https://www.ruby-forum.com/t/count-coulmns-in-excel-file/154831 "2009-01-11T02:00:48Z")

</div>

Hi, How to count the number of columns in an excel file… and i am using “Spreadsheet::ParseExcel” gem to parse the excel file if anybody knows plz reply me advanced thanks Ganesh

---

## [What is meant by \<\< operator?](https://www.ruby-forum.com/t/what-is-meant-by-operator/157404)

<div class="topic-metadata">

**Author:** [@Muhammad\_mohsin\_ali](https://www.ruby-forum.com/u/Muhammad_mohsin_ali)\
**Replies:** 7\
**Last updated:** [January 11, 2009, 1:42am UTC](https://www.ruby-forum.com/t/what-is-meant-by-operator/157404 "2009-01-11T01:42:40Z")

</div>

What is meant by \<\< operator? For example this operator is used in following code, // def add\_product(product) current\_item = @items.find {|item| item.product == product} if current\_item current\_item.increment\_quan…

---

## [Q: most efficient way to remove duplicate spaces in a string?](https://www.ruby-forum.com/t/q-most-efficient-way-to-remove-duplicate-spaces-in-a-string/157352)

<div class="topic-metadata">

**Author:** [@marksbrain](https://www.ruby-forum.com/u/marksbrain)\
**Replies:** 13\
**Last updated:** [January 11, 2009, 1:21am UTC](https://www.ruby-forum.com/t/q-most-efficient-way-to-remove-duplicate-spaces-in-a-string/157352 "2009-01-11T01:21:00Z")

</div>

I don’t usually worry too much about efficiency unless runtime performance becomes an issue so I use a\_string.split.join(’ ') to remove extra spaces because the code is short and readable. This is certainly inefficien…

---

## [I can't uninstall a few gems](https://www.ruby-forum.com/t/i-cant-uninstall-a-few-gems/156905)

<div class="topic-metadata">

**Author:** [@oreng](https://www.ruby-forum.com/u/oreng)\
**Replies:** 7\
**Last updated:** [January 10, 2009, 11:53pm UTC](https://www.ruby-forum.com/t/i-cant-uninstall-a-few-gems/156905 "2009-01-10T23:53:53Z")

</div>

some info about my system: ubuntu 8.10, ruby 1.8.3, rubygems 1.3.1 (installed from source) Here are the gems I have and can’t uninstall: addressable (2.0.1) cgi\_multipart\_eof\_fix (2.5.0) cheat (1.2.1) daemons (1.0.…

---

## [Ruby Rake 'advanced' rule arguments](https://www.ruby-forum.com/t/ruby-rake-advanced-rule-arguments/157367)

<div class="topic-metadata">

**Author:** [@peterk](https://www.ruby-forum.com/u/peterk)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 10:08pm UTC](https://www.ruby-forum.com/t/ruby-rake-advanced-rule-arguments/157367 "2009-01-10T22:08:41Z")

</div>

Just starting out with Rake and Ruby, and made a little rakefile (below). It does a simple dependency based file copy of source files to a “dist” directory. I works fine, but I was wondering if there is a way to retr…

---

## [Value of an expression?](https://www.ruby-forum.com/t/value-of-an-expression/157363)

<div class="topic-metadata">

**Author:** [@kedarmhaswade](https://www.ruby-forum.com/u/kedarmhaswade)\
**Replies:** 19\
**Last updated:** [January 10, 2009, 9:24pm UTC](https://www.ruby-forum.com/t/value-of-an-expression/157363 "2009-01-10T21:24:58Z")

</div>

Sorry if this is asked before and I could not find its answer. Take a look at the following: 1 #!/usr/bin/ruby 2 s=“test” 3 puts s 4 s=“surprising” if (1+1 != 2) 5 puts s which produces the output: test test but …

---

## [Ruby Best Practices twitter feed](https://www.ruby-forum.com/t/ruby-best-practices-twitter-feed/157401)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/ruby-best-practices-twitter-feed/157401 "2009-01-10T19:36:21Z")

</div>

Hi folks, Sorry to spam, but I wanted to let those interested in my book “Ruby Best Practices”\[0\] know that I’ve started up a twitter feed\[1\] to keep folks informed of the book progress. Because this book will become…

---

## [Issues with Method#to\_proc](https://www.ruby-forum.com/t/issues-with-method-to-proc/157391)

<div class="topic-metadata">

**Author:** [@murena](https://www.ruby-forum.com/u/murena)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/issues-with-method-to-proc/157391 "2009-01-10T18:49:26Z")

</div>

Hello, Today I was writing some code which uses Method#to\_proc but I’ve encountered a few issues. The following line throws a NotImplementedException: proc = 0.method(:to\_s).to\_proc I took a look at the source code …

---

## [Writing erb rhtml output to an external file](https://www.ruby-forum.com/t/writing-erb-rhtml-output-to-an-external-file/157393)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/writing-erb-rhtml-output-to-an-external-file/157393 "2009-01-10T16:15:44Z")

</div>

Hi, I am trying to write the output of an erb run to an external output file. I have an object with some instance variables in it, and a string of html and the instance variables (in the erb style with \<% and \<%=). I…

---

## [Default values of hashes](https://www.ruby-forum.com/t/default-values-of-hashes/156801)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 15\
**Last updated:** [January 10, 2009, 3:56pm UTC](https://www.ruby-forum.com/t/default-values-of-hashes/156801 "2009-01-10T15:56:19Z")

</div>

Hi, Suppose I want to create a hash, which has a couple of elements with strings as the keys and the values of each of the elements were hashes themselves, and they each had a few elements, like this: trt\_hash = Hash…

---

## [Bug in DBI::ODBC: DateTime treated as Date](https://www.ruby-forum.com/t/bug-in-dbi-datetime-treated-as-date/157389)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/bug-in-dbi-datetime-treated-as-date/157389 "2009-01-10T13:35:18Z")

</div>

Using DBI::ODBC and it works nicely thank you. Inserting a value into a column of type SQL datetime. If the value is ruby type DateTime, it gets truncated to a Date on insert. The time portion is lost. eg 2009-10-01T…

---

## [IronRuby hosting: self becomes nil](https://www.ruby-forum.com/t/ironruby-hosting-self-becomes-nil/157277)

<div class="topic-metadata">

**Author:** [@alex\_2k8](https://www.ruby-forum.com/u/alex_2k8)\
**Replies:** 3\
**Last updated:** [January 10, 2009, 10:24am UTC](https://www.ruby-forum.com/t/ironruby-hosting-self-becomes-nil/157277 "2009-01-10T10:24:59Z")

</div>

Hello, I get very odd results with attached code: #System::Windows::Forms::Form:0x000005c nil #System::Windows::Forms::Form:0x000005e While was expected #System::Windows::Forms::Form:0x000005c #System::Windows:…

---

## [Turn off warnings in ruby](https://www.ruby-forum.com/t/turn-off-warnings-in-ruby/157258)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 6\
**Last updated:** [January 10, 2009, 10:01am UTC](https://www.ruby-forum.com/t/turn-off-warnings-in-ruby/157258 "2009-01-10T10:01:09Z")

</div>

Hi, I am writing a ruby application with FXRuby, which also uses the ruby gem ‘spreadsheet’ to create an Excel file. Everything was working fine until this morning when, for some reason, when I ran my application, it …

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

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