# Ruby

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

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

---

## [How to remove leading &nbsp; from string](https://www.ruby-forum.com/t/how-to-remove-leading-nbsp-from-string/192565)

<div class="topic-metadata">

**Author:** [@lucky1234](https://www.ruby-forum.com/u/lucky1234)\
**Replies:** 12\
**Last updated:** [August 3, 2010, 3:13pm UTC](https://www.ruby-forum.com/t/how-to-remove-leading-nbsp-from-string/192565 "2010-08-03T15:13:46Z")

</div>

Hi I Need small help that how to remove leading tags My text is: str = " Welcome to ruby " I want result is str = “Welcome to ruby ” Can anybody help

---

## [Scite](https://www.ruby-forum.com/t/scite/192566)

<div class="topic-metadata">

**Author:** [@pshah](https://www.ruby-forum.com/u/pshah)\
**Replies:** 3\
**Last updated:** [August 3, 2010, 2:30pm UTC](https://www.ruby-forum.com/t/scite/192566 "2010-08-03T14:30:04Z")

</div>

hi, I want seperate use of scite so i taken the source and scite editor run but i cannot able to execute any ruby script. I have not installed it with ruby. I had taken source seperatly and run scite application. P…

---

## [Nokogiri installation problem on Mac 10.6.0](https://www.ruby-forum.com/t/nokogiri-installation-problem-on-mac-10-6-0/192636)

<div class="topic-metadata">

**Author:** [@pshah](https://www.ruby-forum.com/u/pshah)\
**Replies:** 3\
**Last updated:** [August 3, 2010, 2:21pm UTC](https://www.ruby-forum.com/t/nokogiri-installation-problem-on-mac-10-6-0/192636 "2010-08-03T14:21:17Z")

</div>

Hi, I getting problem when install Nokogiri on mac snow leopard. I get following errors : ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Ver…

---

## [How do I configure ruby to mysql by default instead of sqlit](https://www.ruby-forum.com/t/how-do-i-configure-ruby-to-mysql-by-default-instead-of-sqlit/192625)

<div class="topic-metadata">

**Author:** [@reivilo](https://www.ruby-forum.com/u/reivilo)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/how-do-i-configure-ruby-to-mysql-by-default-instead-of-sqlit/192625 "2010-08-03T14:20:42Z")

</div>

Hello, I am running Mac OS X 10.6.4 and have installed the following: ruby-1.9.1-p429 RubyGems 1.3.7 Rails 2.3.8 I am now getting an error because sqlite3 is not installed and I’ve read that there are issues instal…

---

## [Will paginate question](https://www.ruby-forum.com/t/will-paginate-question/192458)

<div class="topic-metadata">

**Author:** [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Replies:** 3\
**Last updated:** [August 3, 2010, 1:39pm UTC](https://www.ruby-forum.com/t/will-paginate-question/192458 "2010-08-03T13:39:28Z")

</div>

I have the following code: @projetos = Array.new for permissao in @permissao # @proj = Projeto.paginate :page =\> params\[:page\], :per\_page =\> 10, :order =\> "data\_de\_termino", :conditions =\> \["responsavel = ? or respo…

---

## [Rainbows! 0.96.0 - range support](https://www.ruby-forum.com/t/rainbows-0-96-0-range-support/192631)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 11:11am UTC](https://www.ruby-forum.com/t/rainbows-0-96-0-range-support/192631 "2010-08-03T11:11:36Z")

</div>

Rainbows! is an HTTP server for sleepy Rack applications. It is based on Unicorn, but designed to handle applications that expect long request/response times and/or slow clients. http://rainbows.rubyforge.org/ remo…

---

## [File.new ("write.txt", "w+") results in error](https://www.ruby-forum.com/t/file-new-write-txt-w-results-in-error/192581)

<div class="topic-metadata">

**Author:** [@VMDD\_TECH](https://www.ruby-forum.com/u/VMDD_TECH)\
**Replies:** 4\
**Last updated:** [August 3, 2010, 8:20am UTC](https://www.ruby-forum.com/t/file-new-write-txt-w-results-in-error/192581 "2010-08-03T08:20:05Z")

</div>

Hello everyone, I am new to Ruby. If there are spaces between new and (, then ruby 1.9.1p376 considers it a syntactical error. For example: File.new (“write.txt”, “w+”) =\> syntax error, unexpected ‘,’, expecting ‘)…

---

## [Newbie Testing: jruby -S rake](https://www.ruby-forum.com/t/newbie-testing-jruby-s-rake/181023)

<div class="topic-metadata">

**Author:** [@locuslo](https://www.ruby-forum.com/u/locuslo)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 8:11am UTC](https://www.ruby-forum.com/t/newbie-testing-jruby-s-rake/181023 "2010-08-03T08:11:36Z")

</div>

Hi, I’m running jruby 1.4.0 and I’m trying to use the unit test feature. I haven’t really added anything I just wanted to see if it works. test\\unit\\product\_user\_test.rb require ‘test\_helper’ class ProductUserTest \< …

---

## [Shoes: Reopening Window if Necessary](https://www.ruby-forum.com/t/shoes-reopening-window-if-necessary/192615)

<div class="topic-metadata">

**Author:** [@callyworld](https://www.ruby-forum.com/u/callyworld)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 7:31am UTC](https://www.ruby-forum.com/t/shoes-reopening-window-if-necessary/192615 "2010-08-03T07:31:42Z")

</div>

In my shoes app, I have a situation like this: There is a separate window that displays special data. Certain buttons call a function which should do the following: Create the window if it has not been created yet Re…

---

## [Shoes: Stacks and Flows](https://www.ruby-forum.com/t/shoes-stacks-and-flows/192563)

<div class="topic-metadata">

**Author:** [@callyworld](https://www.ruby-forum.com/u/callyworld)\
**Replies:** 4\
**Last updated:** [August 3, 2010, 7:22am UTC](https://www.ruby-forum.com/t/shoes-stacks-and-flows/192563 "2010-08-03T07:22:44Z")

</div>

I’m still learning Shoes – working on basic formatting. I’m a little confused, though, with the results of this code: app = Shoes.app do background “#FFFFFF” flow :width =\> 1.0 do stack do para “North America” but…

---

## [CGI Scripts - Islandnet.com KB Article](https://www.ruby-forum.com/t/cgi-scripts-islandnet-com-kb-article/192477)

<div class="topic-metadata">

**Author:** [@Rob\_Turner](https://www.ruby-forum.com/u/Rob_Turner)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 4:38am UTC](https://www.ruby-forum.com/t/cgi-scripts-islandnet-com-kb-article/192477 "2010-08-03T04:38:16Z")

</div>

Article #: 51 • Updated: Mon Apr 12 2010 at 12:41 pm Sooner or later most non-trivial web sites will need one or more custom programs that run on the server (aka “CGI scripts”). In general we recommend that any new …

---

## [Key Signing Party at RubyKaigi 2010](https://www.ruby-forum.com/t/key-signing-party-at-rubykaigi-2010/192609)

<div class="topic-metadata">

**Author:** [@Urabe\_S](https://www.ruby-forum.com/u/Urabe_S)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 4:16am UTC](https://www.ruby-forum.com/t/key-signing-party-at-rubykaigi-2010/192609 "2010-08-03T04:16:02Z")

</div>

Hello RubyKaigi attendees: As the official site has timetable now, I’m announcing this again. We have a PGP/GPG Key Signing Party at the RubyKaigi 2010. Please consider attending it; you need some preparation to d…

---

## [Iteration through File.file? misses entries for which File.file?(entry) == true](https://www.ruby-forum.com/t/iteration-through-file-file-misses-entries-for-which-file-file-entry-true/192576)

<div class="topic-metadata">

**Author:** [@Kyle\_Barbour](https://www.ruby-forum.com/u/Kyle_Barbour)\
**Replies:** 10\
**Last updated:** [August 2, 2010, 10:55pm UTC](https://www.ruby-forum.com/t/iteration-through-file-file-misses-entries-for-which-file-file-entry-true/192576 "2010-08-02T22:55:13Z")

</div>

Hello everyone, I’m new to Ruby, so I’m most likely making an elementary mistake. However, searching Google didn’t help me find my answer, and after mucking around with irb I still haven’t figured it out. I wrote a m…

---

## [Mocking a method with a block](https://www.ruby-forum.com/t/mocking-a-method-with-a-block/192496)

<div class="topic-metadata">

**Author:** [@fearx](https://www.ruby-forum.com/u/fearx)\
**Replies:** 11\
**Last updated:** [August 2, 2010, 7:57pm UTC](https://www.ruby-forum.com/t/mocking-a-method-with-a-block/192496 "2010-08-02T19:57:56Z")

</div>

Hi people, I have an application that download emails from an email account an process them. What I would like to do is to mock the mail download petition and not process the real mails but an array of mails I have f…

---

## [How to check if some object is included in some module?](https://www.ruby-forum.com/t/how-to-check-if-some-object-is-included-in-some-module/192547)

<div class="topic-metadata">

**Author:** [@juuser](https://www.ruby-forum.com/u/juuser)\
**Replies:** 5\
**Last updated:** [August 2, 2010, 7:39pm UTC](https://www.ruby-forum.com/t/how-to-check-if-some-object-is-included-in-some-module/192547 "2010-08-02T19:39:45Z")

</div>

I know that there are methods #kind\_of?/#is\_a? to check if one object is a same type or a subclass of another object. But what if i want to check if one object is in some module? For example: module MyModule class My…

---

## [Pingecho, causing SocketError](https://www.ruby-forum.com/t/pingecho-causing-socketerror/192595)

<div class="topic-metadata">

**Author:** [@walle](https://www.ruby-forum.com/u/walle)\
**Replies:** 3\
**Last updated:** [August 2, 2010, 7:27pm UTC](https://www.ruby-forum.com/t/pingecho-causing-socketerror/192595 "2010-08-02T19:27:42Z")

</div>

I have a strange problem. The script posted at the end off this post is not working properly on one of my computers. If I run it alone, it works just fine, but not inside one of my scripts. The script works fine on al…

---

## [ANN: Sequel 3.14.0 Released](https://www.ruby-forum.com/t/ann-sequel-3-14-0-released/192589)

<div class="topic-metadata">

**Author:** [@nerdmaster](https://www.ruby-forum.com/u/nerdmaster)\
**Replies:** 0\
**Last updated:** [August 2, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-14-0-released/192589 "2010-08-02T18:24:44Z")

</div>

Sequel is a lightweight database access toolkit for Ruby. Sequel provides thread safety, connection pooling and a concise DSL for constructing SQL queries and table schemas. Sequel includes a comprehensive ORM layer f…

---

## [SVG generation gem?](https://www.ruby-forum.com/t/svg-generation-gem/192461)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 6\
**Last updated:** [August 2, 2010, 6:21pm UTC](https://www.ruby-forum.com/t/svg-generation-gem/192461 "2010-08-02T18:21:18Z")

</div>

I’ve recently started playing with an Epilog laser cutter, and I find myself wanting to programmatically generate SVG files. I googled for ruby and svg this morning and although there seem to be a few old stagnant eff…

---

## [24 More Days Until LSRC 2010](https://www.ruby-forum.com/t/24-more-days-until-lsrc-2010/192586)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [August 2, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/24-more-days-until-lsrc-2010/192586 "2010-08-02T18:13:06Z")

</div>

Howdy The Lone Star Ruby Conference, held Aug 26-28 in Austin, TX, is only 24 days way. Don’t miss being a part of this great conference and hanging out with some of the best Rubyist around. I know some of you are h…

---

## [IronRuby & Microsoft.Scripting.Debugging](https://www.ruby-forum.com/t/ironruby-microsoft-scripting-debugging/192554)

<div class="topic-metadata">

**Author:** [@valdar](https://www.ruby-forum.com/u/valdar)\
**Replies:** 2\
**Last updated:** [August 2, 2010, 5:51pm UTC](https://www.ruby-forum.com/t/ironruby-microsoft-scripting-debugging/192554 "2010-08-02T17:51:26Z")

</div>

Hello, What is the current plan for supporting Microsoft.Scripting.Debugging in IronRuby? I’d like to implement ruby-debug-base, so I may eventually get to ruby-debug-ide (IR support in RubyMine, woot!). Could IronR…

---

## [Installing Ruby 1.9.2 on Win7](https://www.ruby-forum.com/t/installing-ruby-1-9-2-on-win7/192574)

<div class="topic-metadata">

**Author:** [@printmkr](https://www.ruby-forum.com/u/printmkr)\
**Replies:** 10\
**Last updated:** [August 2, 2010, 5:45pm UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-2-on-win7/192574 "2010-08-02T17:45:59Z")

</div>

Hi, I’m a total noob to Ruby and am following the pick axe book and installing Ruby for the first time using the OneClick installer. I want to us RoR 3.0 and it gives me errors with Ruby 1.9.1 and compatibility. I wa…

---

## [IO.popen](https://www.ruby-forum.com/t/io-popen/192580)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [August 2, 2010, 4:26pm UTC](https://www.ruby-forum.com/t/io-popen/192580 "2010-08-02T16:26:30Z")

</div>

I assume the doc’s are “just wrong” when they say you can access an IO.popen with any mode you’d like? http://ruby-doc.org/core/classes/IO.html#M002242 IO.popen(“gocr”, “rw”) ArgumentError: invalid access mode rw …

---

## [Running memprof on ree 2010.02, gives a segmentation fault](https://www.ruby-forum.com/t/running-memprof-on-ree-2010-02-gives-a-segmentation-fault/192568)

<div class="topic-metadata">

**Author:** [@luckydeepak](https://www.ruby-forum.com/u/luckydeepak)\
**Replies:** 1\
**Last updated:** [August 2, 2010, 1:21pm UTC](https://www.ruby-forum.com/t/running-memprof-on-ree-2010-02-gives-a-segmentation-fault/192568 "2010-08-02T13:21:15Z")

</div>

---

## [Failed to build ext/tk of ruby-1.9.2-rc2 on Mac OS X](https://www.ruby-forum.com/t/failed-to-build-ext-tk-of-ruby-1-9-2-rc2-on-mac-os-x/192313)

<div class="topic-metadata">

**Author:** [@Yutaka\_H](https://www.ruby-forum.com/u/Yutaka_H)\
**Replies:** 5\
**Last updated:** [August 2, 2010, 11:58am UTC](https://www.ruby-forum.com/t/failed-to-build-ext-tk-of-ruby-1-9-2-rc2-on-mac-os-x/192313 "2010-08-02T11:58:56Z")

</div>

yharae$B$G$9!#e(B e$B\<j85$Ne(BMacBooke$B$Ge(Bruby-1.9.2-rc2e$B$r%3%s%Q%$%k$7$h$&$H$7$?$H$3$m!"e(B ext/tke$B$N$H$3$m$G;\_$^$C$F$7$^$$$^$7$?!#e(B e$BCN?M$Ne(BMacBooke$B$G$O%3%s%Q%$%k$G$-$k$=$&$J$N$G!"KM$N4D6-$,$\*$+$7$$$N…

---

## [Io\_splice 2.2.0 - updates for Linux 2.6.35](https://www.ruby-forum.com/t/io-splice-2-2-0-updates-for-linux-2-6-35/192569)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 0\
**Last updated:** [August 2, 2010, 10:10am UTC](https://www.ruby-forum.com/t/io-splice-2-2-0-updates-for-linux-2-6-35/192569 "2010-08-02T10:10:02Z")

</div>

The splice family of Linux system calls can transfer data between file descriptors without the need to copy data into userspace. Instead of a userspace buffer, they rely on an ordinary Unix pipe as a kernel-level buf…

---

## [S3 2010 Workshop on Self-sustaining Systems (Call for Papers)](https://www.ruby-forum.com/t/s3-2010-workshop-on-self-sustaining-systems-call-for-papers/188724)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 1\
**Last updated:** [August 2, 2010, 9:13am UTC](https://www.ruby-forum.com/t/s3-2010-workshop-on-self-sustaining-systems-call-for-papers/188724 "2010-08-02T09:13:50Z")

</div>

Hi, This is a CFP for Workshop on Self-sustaining Systems (S3) 2010. This workshop is: The Workshop on Self-sustaining Systems (S3) is a forum for discussion of topics relating to computer systems and languages tha…

---

## [Multiple connections with DBI and Mysql](https://www.ruby-forum.com/t/multiple-connections-with-dbi-and-mysql/192488)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 4\
**Last updated:** [August 2, 2010, 8:44am UTC](https://www.ruby-forum.com/t/multiple-connections-with-dbi-and-mysql/192488 "2010-08-02T08:44:35Z")

</div>

Can anyone here advise me the best way to have two classes access mysql via a third Mysql DB statements class? example of what I’m trying to do is below. I am sure I need to use a pool of connections but am unsure as …

---

## [How to use nokogiri For css file parse](https://www.ruby-forum.com/t/how-to-use-nokogiri-for-css-file-parse/192491)

<div class="topic-metadata">

**Author:** [@pshah](https://www.ruby-forum.com/u/pshah)\
**Replies:** 2\
**Last updated:** [August 2, 2010, 8:43am UTC](https://www.ruby-forum.com/t/how-to-use-nokogiri-for-css-file-parse/192491 "2010-08-02T08:43:50Z")

</div>

Hi, Any one have idea about how to use Nokogiri::CSS(“abc.css”) for parse css file or getting the classes and styles from that css file. Thanks, Priyank S.

---

## [\[Bug #2727\] make: \*\*\* \[encdb.h\] Aborted](https://www.ruby-forum.com/t/bug-2727-make-encdb-h-aborted/183176)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 8\
**Last updated:** [August 2, 2010, 8:07am UTC](https://www.ruby-forum.com/t/bug-2727-make-encdb-h-aborted/183176 "2010-08-02T08:07:06Z")

</div>

Bug #2727: make: \*\*\* \[encdb.h\] Aborted http://redmine.ruby-lang.org/issues/show/2727 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: High e$B%+%F%4%je(B: build ruby -v: ruby 1.9.1p420 (2010-02…

---

## [Ruby 1.9](https://www.ruby-forum.com/t/ruby-1-9/192556)

<div class="topic-metadata">

**Author:** [@jcubed](https://www.ruby-forum.com/u/jcubed)\
**Replies:** 4\
**Last updated:** [August 2, 2010, 5:19am UTC](https://www.ruby-forum.com/t/ruby-1-9/192556 "2010-08-02T05:19:44Z")

</div>

I want to install ruby 1.9, but what is the best method of doing this (on Mac OS X), and will all of my old code from 1.8.7 work in 1.9 (assuming I reinstall all the gems)?

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

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