# Ruby

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

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

---

## [Re: Code Review: rails](https://www.ruby-forum.com/t/re-code-review-rails/182130)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [January 23, 2010, 2:11am UTC](https://www.ruby-forum.com/t/re-code-review-rails/182130 "2010-01-23T02:11:19Z")

</div>

ok

---

## [Code Review: rails](https://www.ruby-forum.com/t/code-review-rails/182126)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 3\
**Last updated:** [January 23, 2010, 1:38am UTC](https://www.ruby-forum.com/t/code-review-rails/182126 "2010-01-23T01:38:33Z")

</div>

tfpt review “/shelveset:rails;REDMOND\\sborde” Comment : Flushes out iconv implementation. Added more specs Made String#encoding visible only in 1.9 mode Adds optional paramter to StringScanner.new The above fixes e…

---

## [IronRuby's rake script with MRI versions greater than 1.8.6](https://www.ruby-forum.com/t/ironrubys-rake-script-with-mri-versions-greater-than-1-8-6/182129)

<div class="topic-metadata">

**Author:** [@murena](https://www.ruby-forum.com/u/murena)\
**Replies:** 0\
**Last updated:** [January 23, 2010, 12:11am UTC](https://www.ruby-forum.com/t/ironrubys-rake-script-with-mri-versions-greater-than-1-8-6/182129 "2010-01-23T00:11:21Z")

</div>

Hello, I just uploaded a gist on GitHub with a quick fix that allows IronRuby’s rake script to also run on versions of the MRI greater than 1.8.6 (actually tested with “rake compile” on 1.8.6p383 and 1.9.1p376). Here…

---

## [Ruby Zen: Ruby for Beginners](https://www.ruby-forum.com/t/ruby-zen-ruby-for-beginners/182127)

<div class="topic-metadata">

**Author:** [@Phillip\_G](https://www.ruby-forum.com/u/Phillip_G)\
**Replies:** 0\
**Last updated:** [January 22, 2010, 10:52pm UTC](https://www.ruby-forum.com/t/ruby-zen-ruby-for-beginners/182127 "2010-01-22T22:52:56Z")

</div>

Note: This is also available at http://rubyzen.org/tiki-view\_blog\_post.php?postId=1 in its full, HTML formatted glory. This also announces http://rubyzen.org, Ruby Zen’s home on the interwebs! ======================…

---

## [\[ANN\] ruby-prof v0.7.10](https://www.ruby-forum.com/t/ann-ruby-prof-v0-7-10/182124)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 0\
**Last updated:** [January 22, 2010, 10:38pm UTC](https://www.ruby-forum.com/t/ann-ruby-prof-v0-7-10/182124 "2010-01-22T22:38:15Z")

</div>

Hi all. I released a new version of the “ruby-prof” gem. The ruby-prof is a “fast” profiler for MRI Changes since last public release (biggest one being that 1.9 is now supported): 0.7.10 (2009-01-22) fix SEGFAULT…

---

## [Newbie help](https://www.ruby-forum.com/t/newbie-help/182115)

<div class="topic-metadata">

**Author:** [@ccupstarts](https://www.ruby-forum.com/u/ccupstarts)\
**Replies:** 4\
**Last updated:** [January 22, 2010, 9:59pm UTC](https://www.ruby-forum.com/t/newbie-help/182115 "2010-01-22T21:59:41Z")

</div>

I am having a problem with using the test-unit gem I get a NoMethodError when I simply do require ‘test/unit/assertions’ #I’ve also used just require ‘test/unit’ def test assert\_equal(true, true) end test Sorry f…

---

## [New gem snmpstats](https://www.ruby-forum.com/t/new-gem-snmpstats/182122)

<div class="topic-metadata">

**Author:** [@hgfischer](https://www.ruby-forum.com/u/hgfischer)\
**Replies:** 0\
**Last updated:** [January 22, 2010, 9:34pm UTC](https://www.ruby-forum.com/t/new-gem-snmpstats/182122 "2010-01-22T21:34:48Z")

</div>

Hi, I’ve developed a small gem that simplifies basic status information retrieval from a SNMP service. It’s going to be used in another project in the future. I tested it with NetSNMP in Linux (Debian 5.3 and RedHat …

---

## [Argh?! :) kEND, $end and kELSE in a simple program](https://www.ruby-forum.com/t/argh-kend-end-and-kelse-in-a-simple-program/182097)

<div class="topic-metadata">

**Author:** [@jetkoten](https://www.ruby-forum.com/u/jetkoten)\
**Replies:** 14\
**Last updated:** [January 22, 2010, 9:05pm UTC](https://www.ruby-forum.com/t/argh-kend-end-and-kelse-in-a-simple-program/182097 "2010-01-22T21:05:19Z")

</div>

Hi, I’m completely new to programming and am learning using Ruby. I’m trying to get this program working using only these basic commands that are in my program: puts ‘Say something to the virtual hard-of-hearing Gran…

---

## [Rails ADODB.Connection Error](https://www.ruby-forum.com/t/rails-adodb-connection-error/182020)

<div class="topic-metadata">

**Author:** [@gregarican](https://www.ruby-forum.com/u/gregarican)\
**Replies:** 11\
**Last updated:** [January 22, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/rails-adodb-connection-error/182020 "2010-01-22T18:24:14Z")

</div>

I know this isn’t exclusively a Rails list, so I apologize in advance. Since this is the main list I work with I hope someone might have some insight into a particularly nagging error message I have been getting. The …

---

## [Kramdown 0.4.0 released](https://www.ruby-forum.com/t/kramdown-0-4-0-released/182102)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [January 22, 2010, 5:52pm UTC](https://www.ruby-forum.com/t/kramdown-0-4-0-released/182102 "2010-01-22T17:52:37Z")

</div>

About kramdown kramdown (sic, not Kramdown or KramDown, just kramdown) is a free GPL-licensed Ruby library for parsing a superset of Markdown. It is completely written in Ruby, supports standard Markdown (with some m…

---

## [An elegant way to modify all lines from file by using map() function?](https://www.ruby-forum.com/t/an-elegant-way-to-modify-all-lines-from-file-by-using-map-function/182044)

<div class="topic-metadata">

**Author:** [@RobertGawron](https://www.ruby-forum.com/u/RobertGawron)\
**Replies:** 7\
**Last updated:** [January 22, 2010, 3:55pm UTC](https://www.ruby-forum.com/t/an-elegant-way-to-modify-all-lines-from-file-by-using-map-function/182044 "2010-01-22T15:55:31Z")

</div>

Hi all, I’m new in ruby and I just have a question: in python when I want to read all lines from file, do something with all of them and then use them in my program I use map function + lambda function, sth like that…

---

## [How run JRuby from a Warbler war](https://www.ruby-forum.com/t/how-run-jruby-from-a-warbler-war/181817)

<div class="topic-metadata">

**Author:** [@homerlex](https://www.ruby-forum.com/u/homerlex)\
**Replies:** 5\
**Last updated:** [January 22, 2010, 2:16pm UTC](https://www.ruby-forum.com/t/how-run-jruby-from-a-warbler-war/181817 "2010-01-22T14:16:00Z")

</div>

I have a Rails application bundled up via Warbler. I looks like the lib folder contains the JRuby code in jar files. How can I run jruby commands using these jar files so that I can run rake tasks (like db:migrate) on…

---

## [\[Bug:trunk\] incompatibility of Marshal of Time with nanosecond](https://www.ruby-forum.com/t/bug-trunk-incompatibility-of-marshal-of-time-with-nanosecond/182086)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [January 22, 2010, 1:17pm UTC](https://www.ruby-forum.com/t/bug-trunk-incompatibility-of-marshal-of-time-with-nanosecond/182086 "2010-01-22T13:17:27Z")

</div>

e$B1sF#$G$9!#e(B e$B%J%NIC$N\>pJs$r4^$\`e(B Time e$B$K$D$$$F!“e(B1.9.1-p378 e$B$Ge(B Marshal.dump e$B$7$?$b$N$re(B trunk e$B$Ge(B load e$B$9$k$H!”\>pJs$,Mn$A$k$h$&$G$9!#e(B ruby-1.9.1-p378 e$B$G=q$-$@$9e(B $ ruby-1.9.1-…

---

## [SizedQueue](https://www.ruby-forum.com/t/sizedqueue/95495)

<div class="topic-metadata">

**Author:** [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Replies:** 5\
**Last updated:** [January 22, 2010, 11:17am UTC](https://www.ruby-forum.com/t/sizedqueue/95495 "2010-01-22T11:17:09Z")

</div>

Does anyone know about threads and SizedQueue? I want to limit or control the number of threads created in a script. I am not sure what is the best way to handle this. I wrote a test script using SizedQueue to limit …

---

## [Ruby equivalent of C# "using keword" and IDispose](https://www.ruby-forum.com/t/ruby-equivalent-of-c-using-keword-and-idispose/182004)

<div class="topic-metadata">

**Author:** [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Replies:** 5\
**Last updated:** [January 22, 2010, 10:35am UTC](https://www.ruby-forum.com/t/ruby-equivalent-of-c-using-keword-and-idispose/182004 "2010-01-22T10:35:54Z")

</div>

What is the most expedient way to do this C# construct in Ruby? C#: using (myObj = new MyClass()) { // misc code here } //MyClass.Dispose automatically called here I wish to put stuff in MyClass.Dispose() to release …

---

## [PaperClip: Attach files through script/console](https://www.ruby-forum.com/t/paperclip-attach-files-through-script-console/182050)

<div class="topic-metadata">

**Author:** [@ndorphine](https://www.ruby-forum.com/u/ndorphine)\
**Replies:** 3\
**Last updated:** [January 22, 2010, 10:23am UTC](https://www.ruby-forum.com/t/paperclip-attach-files-through-script-console/182050 "2010-01-22T10:23:28Z")

</div>

I’m wondering is it possible to attach a file through script/console?

---

## [Thread example](https://www.ruby-forum.com/t/thread-example/182058)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 3\
**Last updated:** [January 22, 2010, 9:49am UTC](https://www.ruby-forum.com/t/thread-example/182058 "2010-01-22T09:49:40Z")

</div>

Hello, Just copied the code piece from the ruby cookbook: require ‘thread’ class CounterThread \< Thread def initialize @count = 0 @continue = true super do @count += 1 while @continue puts “I counted up to #{@co…

---

## [Threads or Fibers - which should I use?](https://www.ruby-forum.com/t/threads-or-fibers-which-should-i-use/182047)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 5\
**Last updated:** [January 22, 2010, 9:24am UTC](https://www.ruby-forum.com/t/threads-or-fibers-which-should-i-use/182047 "2010-01-22T09:24:30Z")

</div>

My application will perform a number of tasks. As it is a GUI application, I want the application to remain responsive to other input while it’s performing other tasks. A good example of this might be: A search oper…

---

## [Problem with gem 1.3.2 upgrade](https://www.ruby-forum.com/t/problem-with-gem-1-3-2-upgrade/182069)

<div class="topic-metadata">

**Author:** [@trout](https://www.ruby-forum.com/u/trout)\
**Replies:** 4\
**Last updated:** [January 22, 2010, 9:05am UTC](https://www.ruby-forum.com/t/problem-with-gem-1-3-2-upgrade/182069 "2010-01-22T09:05:49Z")

</div>

trying to update from gem 1.3.1 to 1.3.2. downloaded 1.3.2 to harddrive. then entered “gem install 1.2.3” at the command line. I get the following error ERROR: could not find gem 1.3.2 locally or in a repository whe…

---

## [XML Manipulating](https://www.ruby-forum.com/t/xml-manipulating/181465)

<div class="topic-metadata">

**Author:** [@anandhkumar](https://www.ruby-forum.com/u/anandhkumar)\
**Replies:** 6\
**Last updated:** [January 22, 2010, 7:38am UTC](https://www.ruby-forum.com/t/xml-manipulating/181465 "2010-01-22T07:38:06Z")

</div>

Hi everybody Can anybody there help me in solving the following issue. Consider the XML \<row\> \<column\>Business Strategy\</column\> \<column\>bus1\</column\> \</row\> \<row\> \<column\>Company Description\</…

---

## [Asynchronous Calls](https://www.ruby-forum.com/t/asynchronous-calls/182051)

<div class="topic-metadata">

**Author:** [@Randall\_Sutton](https://www.ruby-forum.com/u/Randall_Sutton)\
**Replies:** 1\
**Last updated:** [January 22, 2010, 6:27am UTC](https://www.ruby-forum.com/t/asynchronous-calls/182051 "2010-01-22T06:27:44Z")

</div>

Is there a way to setup asychronous calls in IronRuby. I’ve used things like WebClient.download\_string\_async, but I’m wondering if I can setup an async using just IronRuby. For example: @data.get\_settings do |settin…

---

## [Using underscores for "private" instance variables?](https://www.ruby-forum.com/t/using-underscores-for-private-instance-variables/181478)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 6\
**Last updated:** [January 22, 2010, 3:21am UTC](https://www.ruby-forum.com/t/using-underscores-for-private-instance-variables/181478 "2010-01-22T03:21:02Z")

</div>

I noticed that Rails core is adopting a style of using an underscore at the start of an ivar name, like @\_env. (see the short thread at http://groups.google.com/group/rubyonrails-core/browse\_thread/thread/a45de7e435c6…

---

## [Why doesn't this work?](https://www.ruby-forum.com/t/why-doesnt-this-work/181988)

<div class="topic-metadata">

**Author:** [@DeNigris\_S](https://www.ruby-forum.com/u/DeNigris_S)\
**Replies:** 2\
**Last updated:** [January 22, 2010, 1:59am UTC](https://www.ruby-forum.com/t/why-doesnt-this-work/181988 "2010-01-22T01:59:42Z")

</div>

Hi list, I can’t figure out why this doesn’t do what I expected… Spec file: context “showing Ruby reference materials” do it “should open the rspec book in preview” do require “sean/preview” class \<\< ApplicationScri…

---

## [Code Review: rails2](https://www.ruby-forum.com/t/code-review-rails2/182042)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 3\
**Last updated:** [January 22, 2010, 1:55am UTC](https://www.ruby-forum.com/t/code-review-rails2/182042 "2010-01-22T01:55:00Z")

</div>

tfpt review “/shelveset:rails2;REDMOND\\sborde” Comment : Added active\_resource and action\_mailer tests to irtests.rb Added a category (disable\_unstable\_tests) of unstable tests to utr.rb so that we can track non-det…

---

## [\[Bug: 1.9\] lazy timer thraed creation](https://www.ruby-forum.com/t/bug-1-9-lazy-timer-thraed-creation/142970)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 3\
**Last updated:** [January 22, 2010, 12:54am UTC](https://www.ruby-forum.com/t/bug-1-9-lazy-timer-thraed-creation/142970 "2010-01-22T00:54:43Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!8=:\_!$e(B1.9 e$B$G$Oe(B timer thread e$B$H$$$&$b$N$r5/F0;~$K:n$C$F!$0J2\<$NMQESe(B e$B$KMxMQ$7$F$$$^$9!%e(B a) e$B%9%l%C%I%9%$%C%A$N7@5!e(B b) signal e$B$N=8Lse(B c) sampling profiling e$B…

---

## [Invloking Ruby Methods From C](https://www.ruby-forum.com/t/invloking-ruby-methods-from-c/182002)

<div class="topic-metadata">

**Author:** [@coldpeace](https://www.ruby-forum.com/u/coldpeace)\
**Replies:** 1\
**Last updated:** [January 22, 2010, 12:02am UTC](https://www.ruby-forum.com/t/invloking-ruby-methods-from-c/182002 "2010-01-22T00:02:50Z")

</div>

Hi , I have a Stupid Question !! I’d like to know how to invoke a Ruby methode from a C code . Ok, you may tell me to use \> rb\_funcall !! exactely that wht I want to do!! but if I have My Ruby Script.rb SomWhere , w…

---

## [Code Review: fxcop](https://www.ruby-forum.com/t/code-review-fxcop/182043)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [January 21, 2010, 11:24pm UTC](https://www.ruby-forum.com/t/code-review-fxcop/182043 "2010-01-21T23:24:33Z")

</div>

tfpt review “/shelveset:fxcop;REDMOND\\jdeville” Comment : Moves APTCA out of an if SIGNED ifdef so we pass FxCop when unsigned.

---

## [Rake db:create can not create new database on MySql](https://www.ruby-forum.com/t/rake-db-create-can-not-create-new-database-on-mysql/181482)

<div class="topic-metadata">

**Author:** [@codecarpenter](https://www.ruby-forum.com/u/codecarpenter)\
**Replies:** 4\
**Last updated:** [January 21, 2010, 9:55pm UTC](https://www.ruby-forum.com/t/rake-db-create-can-not-create-new-database-on-mysql/181482 "2010-01-21T21:55:43Z")

</div>

I am using jruby 1.4.0 with jdbcmysql as adapter, when I try to create a new database on MySQL server by using: rake db:create. The script runs without anything errors, however there is no any new database created on…

---

## [Should Nokogiri replace REXML?](https://www.ruby-forum.com/t/should-nokogiri-replace-rexml/182019)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 4\
**Last updated:** [January 21, 2010, 9:44pm UTC](https://www.ruby-forum.com/t/should-nokogiri-replace-rexml/182019 "2010-01-21T21:44:26Z")

</div>

This is probably more suited to the ruby-core mailing list, but as I am not following that list regularly any longer I’ll bring it up here. REXML is starting to look pretty dated. I find myself no longer using REXML f…

---

## [Testing](https://www.ruby-forum.com/t/testing/182028)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [January 21, 2010, 7:24pm UTC](https://www.ruby-forum.com/t/testing/182028 "2010-01-21T19:24:34Z")

</div>

I’m getting delivery failures from somewhere, and this might be it, so I’m trying it. JD

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

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