# Ruby

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

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

---

## [Can't run tests on new rails project](https://www.ruby-forum.com/t/cant-run-tests-on-new-rails-project/187868)

<div class="topic-metadata">

**Author:** [@Chris\_Ortman](https://www.ruby-forum.com/u/Chris_Ortman)\
**Replies:** 1\
**Last updated:** [May 19, 2010, 6:20pm UTC](https://www.ruby-forum.com/t/cant-run-tests-on-new-rails-project/187868 "2010-05-19T18:20:05Z")

</div>

Are you guys running unit tests in rails? I can’t figure out what I am doing wrong… ir -S rails newapp ir -S script\\generate controller customer ir -S script\\generate model user email:string ir -S rake db:migrate …

---

## [Asynchronous HTTP request](https://www.ruby-forum.com/t/asynchronous-http-request/188521)

<div class="topic-metadata">

**Author:** [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Replies:** 27\
**Last updated:** [May 19, 2010, 5:36pm UTC](https://www.ruby-forum.com/t/asynchronous-http-request/188521 "2010-05-19T17:36:14Z")

</div>

Does anyone know how to do the following, but without threads, purely with asynchronous IO? website = Thread.new{ Net::HTTP.get(URI.parse(url)) } template = compute\_lots\_of\_stuff() puts template.sub("", website.value…

---

## [MonitorMixin::ConditionVariable#wait timeout](https://www.ruby-forum.com/t/monitormixin-conditionvariable-wait-timeout/182590)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 37\
**Last updated:** [May 19, 2010, 5:13pm UTC](https://www.ruby-forum.com/t/monitormixin-conditionvariable-wait-timeout/182590 "2010-05-19T17:13:18Z")

</div>

e$B\<j85$Ne(B Ubuntu 9.10 e$B$N4D6-$Ge(B Ruby 1.9.2 e$B$re(B make test-all e$B$9$k$He(B IMAPTest#test\_exception\_during\_idle e$B$G%O%s%0$7$F=$o$j$^$;$s!#e(B (net/imap e$B$@$1%F%9%H$9$k$H=$o$C$?$j$b$7$^$9!#HyL/$J$H$3$m$G…

---

## [\[Bug #3307\](Closed) ext/tk $B$,(Bheader file$B$NM-L5$r8mH=Dj$9$k(B](https://www.ruby-forum.com/t/bug-3307-closed-ext-tk-b-bheader-file-b-nm-l5-r8mh-dj-9-k-b/188868)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 19, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/bug-3307-closed-ext-tk-b-bheader-file-b-nm-l5-r8mh-dj-9-k-b/188868 "2010-05-19T16:57:29Z")

</div>

e$B%A%1%C%He(B #3307 e$B$,99?7$5$l$^$7$?!#e(B (by Hidetoshi Nagai) e$B%9%F!\<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B This issue was solved with changeset r27904. Masaya, thank …

---

## [Puts and method\_missing](https://www.ruby-forum.com/t/puts-and-method-missing/188863)

<div class="topic-metadata">

**Author:** [@Masaki\_S](https://www.ruby-forum.com/u/Masaki_S)\
**Replies:** 1\
**Last updated:** [May 19, 2010, 4:29pm UTC](https://www.ruby-forum.com/t/puts-and-method-missing/188863 "2010-05-19T16:29:58Z")

</div>

e$B=uED$G$9!#e(B \[ruby-core:30160\] e$B$N7o$rD4$Y$F$$$F5$$E$$$?$N$G$9$,!"e(B e$B\<!$N%9%/%j%W%H$,e(B RuntimeError e$B$K$J$k$N$O!"0U?^$7$?F0:n$J$N$G$7$g$&$+!)e(B class Bar end class Foo def method\_missing(method, \*ar…

---

## [Regexp help](https://www.ruby-forum.com/t/regexp-help/188780)

<div class="topic-metadata">

**Author:** [@qwerty73](https://www.ruby-forum.com/u/qwerty73)\
**Replies:** 4\
**Last updated:** [May 19, 2010, 4:24pm UTC](https://www.ruby-forum.com/t/regexp-help/188780 "2010-05-19T16:24:06Z")

</div>

Hi, I’m newbie to ruby, but I try searching a lot for my problem… I need to extract from an enormous text file, in natural language, for two separated element in the same line and put them in a new file. Example: IIS…

---

## [Passing values from partial to controller](https://www.ruby-forum.com/t/passing-values-from-partial-to-controller/188854)

<div class="topic-metadata">

**Author:** [@drk](https://www.ruby-forum.com/u/drk)\
**Replies:** 8\
**Last updated:** [May 19, 2010, 3:34pm UTC](https://www.ruby-forum.com/t/passing-values-from-partial-to-controller/188854 "2010-05-19T15:34:08Z")

</div>

I am trying to pass login and group\_name from partial to controller, but I dont get the values. I see the following error: RuntimeError in UsersController#addfriendtogroups Called id for nil, which would mistakenly b…

---

## [How to pass data from one textbox to another one?](https://www.ruby-forum.com/t/how-to-pass-data-from-one-textbox-to-another-one/188864)

<div class="topic-metadata">

**Author:** [@iroupa](https://www.ruby-forum.com/u/iroupa)\
**Replies:** 0\
**Last updated:** [May 19, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/how-to-pass-data-from-one-textbox-to-another-one/188864 "2010-05-19T15:32:25Z")

</div>

Hi all, I’m trying to create an simple application with two text boxes. One for writing and the other to show what I’m typing in textbox number one. How can I use events to do that? My code is this one: require ‘wx’ …

---

## [Ironruby and ActiveRecord](https://www.ruby-forum.com/t/ironruby-and-activerecord/188785)

<div class="topic-metadata">

**Author:** [@Kevin\_Pratt](https://www.ruby-forum.com/u/Kevin_Pratt)\
**Replies:** 1\
**Last updated:** [May 19, 2010, 3:16pm UTC](https://www.ruby-forum.com/t/ironruby-and-activerecord/188785 "2010-05-19T15:16:45Z")

</div>

I wanted to try out IronRuby running rails. I was following the http://ironruby.net/Documentation/Real\_Ruby\_Applications/Rails tutorial using the sqlite instructions. I began writing my tests and found that I was not…

---

## [Wcswidth, ruby 1.9, and string encodings](https://www.ruby-forum.com/t/wcswidth-ruby-1-9-and-string-encodings/188309)

<div class="topic-metadata">

**Author:** [@trucker](https://www.ruby-forum.com/u/trucker)\
**Replies:** 3\
**Last updated:** [May 19, 2010, 3:07pm UTC](https://www.ruby-forum.com/t/wcswidth-ruby-1-9-and-string-encodings/188309 "2010-05-19T15:07:58Z")

</div>

Hello all, I need some advice about how to use wcswidth on Ruby 1.9 strings. Wcswidth returns the column width of a string, i.e. how much of the horizontal space on the screen a string takes up when printed to a term…

---

## [Warbler war is not working in weblogic instance](https://www.ruby-forum.com/t/warbler-war-is-not-working-in-weblogic-instance/184890)

<div class="topic-metadata">

**Author:** [@nayan](https://www.ruby-forum.com/u/nayan)\
**Replies:** 17\
**Last updated:** [May 19, 2010, 1:38pm UTC](https://www.ruby-forum.com/t/warbler-war-is-not-working-in-weblogic-instance/184890 "2010-05-19T13:38:57Z")

</div>

Hi All, When I am trying to deploy warabler war file in weblogic server it is not loading the rails. avax.servlet.ServletException: Could not load Rails. See the logs for more details. at org.jruby.webapp.RailsFacto…

---

## [Check if a file is already required?](https://www.ruby-forum.com/t/check-if-a-file-is-already-required/188848)

<div class="topic-metadata">

**Author:** [@mszatanik](https://www.ruby-forum.com/u/mszatanik)\
**Replies:** 1\
**Last updated:** [May 19, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/check-if-a-file-is-already-required/188848 "2010-05-19T13:20:49Z")

</div>

hi, I made a GUI in wxruby to run ruby/watir test cases/test sets. Framework has numerous of modules and global variables, which i can’t require on the start of the application. i figured out that i can just ‘load’ f…

---

## [Read text file and set the values in the Variables](https://www.ruby-forum.com/t/read-text-file-and-set-the-values-in-the-variables/188845)

<div class="topic-metadata">

**Author:** [@sweetzubair](https://www.ruby-forum.com/u/sweetzubair)\
**Replies:** 1\
**Last updated:** [May 19, 2010, 12:43pm UTC](https://www.ruby-forum.com/t/read-text-file-and-set-the-values-in-the-variables/188845 "2010-05-19T12:43:31Z")

</div>

Text file: firstName=abcd lastName=xyz legalName=test vendorRepWorkPhone=121212 email=removed\_email\_address@domain.invalid confirmEmail=removed\_email\_address@domain.invalid First i read the file and get all values…

---

## [Calling Ruby from Java?](https://www.ruby-forum.com/t/calling-ruby-from-java/188839)

<div class="topic-metadata">

**Author:** [@consiliens](https://www.ruby-forum.com/u/consiliens)\
**Replies:** 3\
**Last updated:** [May 19, 2010, 9:35am UTC](https://www.ruby-forum.com/t/calling-ruby-from-java/188839 "2010-05-19T09:35:29Z")

</div>

I have a loop in Java that should pass a string to Ruby methods. What options exist for calling Ruby from Java? Should I be using RedBridge? Thanks. To unsubscribe from this list, please visit: http://xircles.code…

---

## [Undefined method \`xml\_in' for XmlSimple:Class (NoMethodError](https://www.ruby-forum.com/t/undefined-method-xml-in-for-xmlsimple-class-nomethoderror/188842)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 0\
**Last updated:** [May 19, 2010, 8:00am UTC](https://www.ruby-forum.com/t/undefined-method-xml-in-for-xmlsimple-class-nomethoderror/188842 "2010-05-19T08:00:19Z")

</div>

Dear Friends, I would like to upload my files to AWS:S3. I have created a application like, require ‘rubygems’ require ‘ftools’ require ‘aws/s3’ require ‘activerecord’ class Upload \< ActiveRecord::Base #---------…

---

## [String#each\_index $B$NDs0F(B](https://www.ruby-forum.com/t/string-each-index-b-nds0f-b/188828)

<div class="topic-metadata">

**Author:** [@KISHIMOTOS\_Makoto](https://www.ruby-forum.com/u/KISHIMOTOS_Makoto)\
**Replies:** 3\
**Last updated:** [May 19, 2010, 6:24am UTC](https://www.ruby-forum.com/t/string-each-index-b-nds0f-b/188828 "2010-05-19T06:24:41Z")

</div>

e$B$-$7$b$H$G$9e(B String#each\_indexe$B!J$He(B String#each\_byteindexe$B!K$H$$$&%a%=%C%I$rDs0F$7$^$9!#e(B Ruby e$B$G\<BAu$9$k$H0J2\<$N$h$&$J%a%=%C%I$G$9!#e(B def each\_index unless block\_given? then Enumerator.new self…

---

## [Jruby webservers for Rails](https://www.ruby-forum.com/t/jruby-webservers-for-rails/188302)

<div class="topic-metadata">

**Author:** [@steux](https://www.ruby-forum.com/u/steux)\
**Replies:** 10\
**Last updated:** [May 19, 2010, 4:44am UTC](https://www.ruby-forum.com/t/jruby-webservers-for-rails/188302 "2010-05-19T04:44:19Z")

</div>

Hi, I am new to Jruby. Until now, I couldn’t get jruby to work with any web server besides WEBrick. thin, apache/nginx (with passenger), litespeed (ruby-lsapi), lighttpd (with fcgi), webroar… all of them do not work…

---

## [Write whitespace to a file](https://www.ruby-forum.com/t/write-whitespace-to-a-file/188837)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 1\
**Last updated:** [May 19, 2010, 4:32am UTC](https://www.ruby-forum.com/t/write-whitespace-to-a-file/188837 "2010-05-19T04:32:16Z")

</div>

Hi, I need to write many whitespaces to a file, what is the best way to do that. For example, I have f.puts " abc" and there are 5 whitespaces before abc, what is the best way to do this instead of typing 5 whits…

---

## [Rake versus Ruby?](https://www.ruby-forum.com/t/rake-versus-ruby/188607)

<div class="topic-metadata">

**Author:** [@mohits](https://www.ruby-forum.com/u/mohits)\
**Replies:** 4\
**Last updated:** [May 19, 2010, 3:54am UTC](https://www.ruby-forum.com/t/rake-versus-ruby/188607 "2010-05-19T03:54:14Z")

</div>

I was thinking of this on my way home, but could not come up with a good answer… what is the extra bit that Rake gives me, which I don’t get from a Ruby script? I’m sorry it’s a bit of a naive question, but I was wond…

---

## [How to change ri1.8 to ri in shell command?](https://www.ruby-forum.com/t/how-to-change-ri1-8-to-ri-in-shell-command/188829)

<div class="topic-metadata">

**Author:** [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Replies:** 1\
**Last updated:** [May 19, 2010, 2:56am UTC](https://www.ruby-forum.com/t/how-to-change-ri1-8-to-ri-in-shell-command/188829 "2010-05-19T02:56:17Z")

</div>

ruby1.8 and ri1.8 were installed in my computer ,there is strange thing : pt@pt-laptop:~$ ri array The program ‘ri’ is currently not installed. You can install it by typing: sudo apt-get install ri when i input p…

---

## [\[Backport #3310\] Rational#+ sometimes returns a wrong result](https://www.ruby-forum.com/t/backport-3310-rational-sometimes-returns-a-wrong-result/188759)

<div class="topic-metadata">

**Author:** [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Replies:** 2\
**Last updated:** [May 19, 2010, 2:21am UTC](https://www.ruby-forum.com/t/backport-3310-rational-sometimes-returns-a-wrong-result/188759 "2010-05-19T02:21:45Z")

</div>

Backport #3310: Rational#+ sometimes returns a wrong result http://redmine.ruby-lang.org/issues/show/3310 e$B5/I\<\<Te(B: Yuki S. e$B%9%F!\<%?%9e(B: Assigned, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Yuki S., e$B%+%F%4%je(B: …

---

## [Jruby 1.5 current state of ruby 1.9 compatibility/performanc](https://www.ruby-forum.com/t/jruby-1-5-current-state-of-ruby-1-9-compatibility-performanc/188812)

<div class="topic-metadata">

**Author:** [@christoforever](https://www.ruby-forum.com/u/christoforever)\
**Replies:** 3\
**Last updated:** [May 19, 2010, 1:23am UTC](https://www.ruby-forum.com/t/jruby-1-5-current-state-of-ruby-1-9-compatibility-performanc/188812 "2010-05-19T01:23:47Z")

</div>

I was wondering if any jruby dev’s could give a run-down of the current state of jruby 1.5 compatibility with ruby 1.9? And if you guys/gals have done any performance tests recently, are there any gains from using –1.…

---

## [About proc and binding](https://www.ruby-forum.com/t/about-proc-and-binding/188824)

<div class="topic-metadata">

**Author:** [@LAMBEAU\_Bernard](https://www.ruby-forum.com/u/LAMBEAU_Bernard)\
**Replies:** 0\
**Last updated:** [May 19, 2010, 12:56am UTC](https://www.ruby-forum.com/t/about-proc-and-binding/188824 "2010-05-19T00:56:14Z")

</div>

Hi, I’m currently working on a dsl method that allows writing expressions given though a proc: dsl{ x \> y } I would like to be ensure that x and y are free variables in that proc, meaning that: x = 5 lambda{ puts …

---

## [(Net::SSH::HostKeyMismatch](https://www.ruby-forum.com/t/net-hostkeymismatch/188782)

<div class="topic-metadata">

**Author:** [@kamal2222ahmed](https://www.ruby-forum.com/u/kamal2222ahmed)\
**Replies:** 4\
**Last updated:** [May 18, 2010, 11:59pm UTC](https://www.ruby-forum.com/t/net-hostkeymismatch/188782 "2010-05-18T23:59:26Z")

</div>

Hi, When trying to ssh login, to a host which has been reinstalled, using: Net::SSH.start( value\_hosts, USER, :password =\> PASS , :paranoid =\> false, :forward\_agent =\> true ) do|ssh, err | I am getting an error: /s…

---

## [Opening urls](https://www.ruby-forum.com/t/opening-urls/188813)

<div class="topic-metadata">

**Author:** [@site-master](https://www.ruby-forum.com/u/site-master)\
**Replies:** 6\
**Last updated:** [May 18, 2010, 11:02pm UTC](https://www.ruby-forum.com/t/opening-urls/188813 "2010-05-18T23:02:51Z")

</div>

hi could any one tell me how to open a web page in ruby i can open files on my pc IO.popen(wmp){file location} but cant seem to do web pages also my browser is chrome do i need i.e instead thanks

---

## [Bones 3.4.2](https://www.ruby-forum.com/t/bones-3-4-2/188820)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 10:32pm UTC](https://www.ruby-forum.com/t/bones-3-4-2/188820 "2010-05-18T22:32:13Z")

</div>

bones version 3.4.2 by Tim P. RubyGems.org | your community gem host == DESCRIPTION Mr Bones is a handy tool that creates new Ruby projects from a code skeleton. The skeleton contains some starter code and a collect…

---

## [Windows oddity](https://www.ruby-forum.com/t/windows-oddity/188814)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 8:49pm UTC](https://www.ruby-forum.com/t/windows-oddity/188814 "2010-05-18T20:49:31Z")

</div>

C:\\dev\\ruby\\old\\os\>ruby -v go.rb \*.gemspec ruby 1.9.1p378 (2010-01-10 revision 26273) \[i386-mingw32\] \[“os.gemspec”\] C:\\dev\\ruby\\old\\os\>jruby2 -v go.rb \*.gemspec C:\\dev\\ruby\\old\\os\>C:\\dev\\ruby\\downloads\\jruby\\bin\\jrub…

---

## [\[Rake v 0.8.7\] rake gem : rake aborted! No Rakefile found](https://www.ruby-forum.com/t/rake-v-0-8-7-rake-gem-rake-aborted-no-rakefile-found/188783)

<div class="topic-metadata">

**Author:** [@draggy](https://www.ruby-forum.com/u/draggy)\
**Replies:** 3\
**Last updated:** [May 18, 2010, 8:47pm UTC](https://www.ruby-forum.com/t/rake-v-0-8-7-rake-gem-rake-aborted-no-rakefile-found/188783 "2010-05-18T20:47:59Z")

</div>

Hello People, When I execute “rake gems:refresh\_specs” it give me: $ rake gems:refresh\_specs --trace rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) /usr/local/ruby/lib/r…

---

## [Fix for Inability to \`gem update --system\`](https://www.ruby-forum.com/t/fix-for-inability-to-gem-update-system/188807)

<div class="topic-metadata">

**Author:** [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Replies:** 2\
**Last updated:** [May 18, 2010, 8:37pm UTC](https://www.ruby-forum.com/t/fix-for-inability-to-gem-update-system/188807 "2010-05-18T20:37:26Z")

</div>

I’ve got a fix that will allow IronRuby to update RubyGems. It’s a refinement of the technique here: http://marcinobel.com/index.php/bug-invalid-exec\_format-ir/comment-page-1/#comment-428 Judging by the source of Ruby…

---

## [Bundler Groups](https://www.ruby-forum.com/t/bundler-groups/188745)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 5\
**Last updated:** [May 18, 2010, 7:57pm UTC](https://www.ruby-forum.com/t/bundler-groups/188745 "2010-05-18T19:57:02Z")

</div>

I’d like to ask a more specific question about Bundler, pertaining to it’s concept of groups. Do others see this as being truly useful? Or do you agree with me that it will prove to be mostly a YAGNI, and in come case…

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

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