# Ruby

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

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

---

## [Where can I find the 'shebang' line?](https://www.ruby-forum.com/t/where-can-i-find-the-shebang-line/192286)

<div class="topic-metadata">

**Author:** [@ast](https://www.ruby-forum.com/u/ast)\
**Replies:** 5\
**Last updated:** [July 27, 2010, 11:20pm UTC](https://www.ruby-forum.com/t/where-can-i-find-the-shebang-line/192286 "2010-07-27T23:20:47Z")

</div>

I seem to be having trouble with RVM (after an update to Rails 3 RC), where when I do a: rake db:migrate I am given the error: /Users/me/.rvm/gems/ruby-1.9.2-head/gems/sqlite3-ruby-1.3.1/lib/sqlite3/sqlite3\_native.b…

---

## [Ruby books designed especially for beginngers](https://www.ruby-forum.com/t/ruby-books-designed-especially-for-beginngers/192124)

<div class="topic-metadata">

**Author:** [@marlon](https://www.ruby-forum.com/u/marlon)\
**Replies:** 11\
**Last updated:** [July 27, 2010, 10:46pm UTC](https://www.ruby-forum.com/t/ruby-books-designed-especially-for-beginngers/192124 "2010-07-27T22:46:53Z")

</div>

Hey experts, i need your advice. Can anyone tell me if there’s a Ruby ebook that’s designed especially for a beginner like me? When I say beginner, I mean zero knowledge about programming. I’m reading Programming Rub…

---

## [Issue with mongrel and apache](https://www.ruby-forum.com/t/issue-with-mongrel-and-apache/192243)

<div class="topic-metadata">

**Author:** [@internet2cash](https://www.ruby-forum.com/u/internet2cash)\
**Replies:** 3\
**Last updated:** [July 27, 2010, 10:18pm UTC](https://www.ruby-forum.com/t/issue-with-mongrel-and-apache/192243 "2010-07-27T22:18:18Z")

</div>

I just upgraded rails to 2.3.8 on my test server and now the apache is adding an Content-Type: text/plain to the outgoing response. If i just go the the mongrel port it renders the response correctly. this is an wi…

---

## [Soap with ruby 1.9?](https://www.ruby-forum.com/t/soap-with-ruby-1-9/192186)

<div class="topic-metadata">

**Author:** [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Replies:** 6\
**Last updated:** [July 27, 2010, 9:20pm UTC](https://www.ruby-forum.com/t/soap-with-ruby-1-9/192186 "2010-07-27T21:20:55Z")

</div>

Hi all, does anyone know how can I implement soap to access web services with ruby 1.9 ?, there si no support anymore for soap. Thanks in advance. Dani

---

## [Hitimes java extension in the works, some help needed](https://www.ruby-forum.com/t/hitimes-java-extension-in-the-works-some-help-needed/192232)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 5\
**Last updated:** [July 27, 2010, 7:58pm UTC](https://www.ruby-forum.com/t/hitimes-java-extension-in-the-works-some-help-needed/192232 "2010-07-27T19:58:22Z")

</div>

Hi all, I have the Hitimes gem (http://copiousfreetime.rubyforge.org/hitimes/), and I received a request to have it work on JRuby. It has an embedded C extension, and does not link to an external library. I figure…

---

## [RSpec configuration?](https://www.ruby-forum.com/t/rspec-configuration/192283)

<div class="topic-metadata">

**Author:** [@MrZombie](https://www.ruby-forum.com/u/MrZombie)\
**Replies:** 3\
**Last updated:** [July 27, 2010, 7:30pm UTC](https://www.ruby-forum.com/t/rspec-configuration/192283 "2010-07-27T19:30:51Z")

</div>

Is there anyway to make it so that --color be a default option? Like a global ~/.rspecrc file?

---

## [How to get private helpers into class methods?](https://www.ruby-forum.com/t/how-to-get-private-helpers-into-class-methods/192140)

<div class="topic-metadata">

**Author:** [@grar](https://www.ruby-forum.com/u/grar)\
**Replies:** 1\
**Last updated:** [July 27, 2010, 7:05pm UTC](https://www.ruby-forum.com/t/how-to-get-private-helpers-into-class-methods/192140 "2010-07-27T19:05:40Z")

</div>

Hi, How do I use the same private helper method(s) inside different class methods? (In my current case, all the methods can be defined in the same class.) Thanks, Grar

---

## [Typical Ruby (non-rails) project structure](https://www.ruby-forum.com/t/typical-ruby-non-rails-project-structure/192042)

<div class="topic-metadata">

**Author:** [@cjnkns](https://www.ruby-forum.com/u/cjnkns)\
**Replies:** 17\
**Last updated:** [July 27, 2010, 6:54pm UTC](https://www.ruby-forum.com/t/typical-ruby-non-rails-project-structure/192042 "2010-07-27T18:54:33Z")

</div>

What is/are the best-practice(s) for a Ruby project structure? As I am just learning Ruby I put everything in one file but, now I am learning about Modules etc… In Java, classes where in packages which helped with cod…

---

## [How to receive start and stop events for rails application deployed in tomcat?](https://www.ruby-forum.com/t/how-to-receive-start-and-stop-events-for-rails-application-deployed-in-tomcat/192277)

<div class="topic-metadata">

**Author:** [@rakeshahuja](https://www.ruby-forum.com/u/rakeshahuja)\
**Replies:** 2\
**Last updated:** [July 27, 2010, 5:47pm UTC](https://www.ruby-forum.com/t/how-to-receive-start-and-stop-events-for-rails-application-deployed-in-tomcat/192277 "2010-07-27T17:47:12Z")

</div>

I am trying to find the best way to implement ServletContextListener for my rails application deployed in tomcat to receive application start and stop events. Thanks, -Rakesh

---

## [Jruby 1.5.1 issue with jruby-openssl 0.7](https://www.ruby-forum.com/t/jruby-1-5-1-issue-with-jruby-openssl-0-7/192091)

<div class="topic-metadata">

**Author:** [@Sanel\_Z](https://www.ruby-forum.com/u/Sanel_Z)\
**Replies:** 4\
**Last updated:** [July 27, 2010, 5:17pm UTC](https://www.ruby-forum.com/t/jruby-1-5-1-issue-with-jruby-openssl-0-7/192091 "2010-07-27T17:17:56Z")

</div>

Hi guys, We have a larger Rails application happily run on jruby 1.4.0, and after some issues with sessions (session\[\] and flash\[\] get’s nil-ed between requests; any ideas why?), we did upgrade on 1.5.1 and issue is …

---

## [Dolphin Dale high School: N Naveen Chowdary](https://www.ruby-forum.com/t/dolphin-dale-high-school-n-naveen-chowdary/192281)

<div class="topic-metadata">

**Author:** [@HEAVEN](https://www.ruby-forum.com/u/HEAVEN)\
**Replies:** 0\
**Last updated:** [July 27, 2010, 5:12pm UTC](https://www.ruby-forum.com/t/dolphin-dale-high-school-n-naveen-chowdary/192281 "2010-07-27T17:12:05Z")

</div>

N Naveen Chowdary At Dolphin Dale High School. Dolphin Dale High School Leader Of 8th Class. Batch : 2010 Naveen Is Leader , First Ranker Of Dolphin. Meet Naveen At Ranganayukulapeta. Good Bye.

---

## [Stop program with entering a key](https://www.ruby-forum.com/t/stop-program-with-entering-a-key/192213)

<div class="topic-metadata">

**Author:** [@hazal](https://www.ruby-forum.com/u/hazal)\
**Replies:** 8\
**Last updated:** [July 27, 2010, 4:41pm UTC](https://www.ruby-forum.com/t/stop-program-with-entering-a-key/192213 "2010-07-27T16:41:34Z")

</div>

i m a new in Ruby . sorry may be its a silly question. my small game " finding a randon number" in codes i want to put “pls press -1 to stop game” or end of first game i want to ask “do you cont. or stop ( y / n ) …

---

## [Unknown\_ca exception when using client certificate in net::https](https://www.ruby-forum.com/t/unknown-ca-exception-when-using-client-certificate-in-net-https/192182)

<div class="topic-metadata">

**Author:** [@William\_Sthe\_Better](https://www.ruby-forum.com/u/William_Sthe_Better)\
**Replies:** 1\
**Last updated:** [July 27, 2010, 2:07pm UTC](https://www.ruby-forum.com/t/unknown-ca-exception-when-using-client-certificate-in-net-https/192182 "2010-07-27T14:07:25Z")

</div>

Hello All, I have using net::https in an Jruby program to connect an SSL web site required an client certificate. I got the required client certificate and tested it in IE and Firefox. In both IE and Firefox, it works …

---

## [Broken UTF-8 string](https://www.ruby-forum.com/t/broken-utf-8-string/192145)

<div class="topic-metadata">

**Author:** [@Peter\_Eldo](https://www.ruby-forum.com/u/Peter_Eldo)\
**Replies:** 1\
**Last updated:** [July 27, 2010, 2:05pm UTC](https://www.ruby-forum.com/t/broken-utf-8-string/192145 "2010-07-27T14:05:19Z")

</div>

begin File.new(path\_file,“r”).each { |line| puts line } rescue puts “Error read file #{subor}: #{$!}” next end In Ruby 1.9: broken UTF-8 string In Ruby 1.9.1: invalid byte sequence in UTF-8 Read files is mail …

---

## [IO.popen exit the program when it failed](https://www.ruby-forum.com/t/io-popen-exit-the-program-when-it-failed/192255)

<div class="topic-metadata">

**Author:** [@arachnd](https://www.ruby-forum.com/u/arachnd)\
**Replies:** 2\
**Last updated:** [July 27, 2010, 1:59pm UTC](https://www.ruby-forum.com/t/io-popen-exit-the-program-when-it-failed/192255 "2010-07-27T13:59:03Z")

</div>

i have been trying to recieved the output of a command with IO.popen and it works great but if i place a unknown command to the system the ruby program terminates. def comando ( inputcmd ) f = IO.popen(inputcmd) out…

---

## [Sample programm using savon to connect toms-exchange?](https://www.ruby-forum.com/t/sample-programm-using-savon-to-connect-toms-exchange/192268)

<div class="topic-metadata">

**Author:** [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Replies:** 0\
**Last updated:** [July 27, 2010, 1:53pm UTC](https://www.ruby-forum.com/t/sample-programm-using-savon-to-connect-toms-exchange/192268 "2010-07-27T13:53:05Z")

</div>

Hi, does anyone have a sample programm using savon to connect to ms-exchange ? any response is welcome. thank you. Dani

---

## [Help: How to pass a struct as a pointer to Win32API?](https://www.ruby-forum.com/t/help-how-to-pass-a-struct-as-a-pointer-to-win32api/192246)

<div class="topic-metadata">

**Author:** [@thyrlian](https://www.ruby-forum.com/u/thyrlian)\
**Replies:** 4\
**Last updated:** [July 27, 2010, 11:47am UTC](https://www.ruby-forum.com/t/help-how-to-pass-a-struct-as-a-pointer-to-win32api/192246 "2010-07-27T11:47:10Z")

</div>

Hi all, As titled, I want to read text content from a standard syslistview32 control in an application. And the syslistview32 control is not a pop-up but embedded in the application, which means the control has same …

---

## [HttpRequestBase](https://www.ruby-forum.com/t/httprequestbase/192259)

<div class="topic-metadata">

**Author:** [@nieve](https://www.ruby-forum.com/u/nieve)\
**Replies:** 2\
**Last updated:** [July 27, 2010, 10:20am UTC](https://www.ruby-forum.com/t/httprequestbase/192259 "2010-07-27T10:20:04Z")

</div>

Hello all, I’m new to iron ruby so apologies in advance if the question is stupid. I’ve been trying to run an example I found on the net (http://github.com/BenHall/Kona) and it seems that ir doesn’t like the inherita…

---

## [How to proceed?](https://www.ruby-forum.com/t/how-to-proceed/192254)

<div class="topic-metadata">

**Author:** [@djmook](https://www.ruby-forum.com/u/djmook)\
**Replies:** 1\
**Last updated:** [July 27, 2010, 4:58am UTC](https://www.ruby-forum.com/t/how-to-proceed/192254 "2010-07-27T04:58:01Z")

</div>

I am a fairly new member to RoR community and programming for that matter. I want to create a Rails app that pulls info from a file on a computer every time that file changes. -So I’m thinking I need to have some code…

---

## [Problem with Marshal.load in Silverlight](https://www.ruby-forum.com/t/problem-with-marshal-load-in-silverlight/192159)

<div class="topic-metadata">

**Author:** [@valdar](https://www.ruby-forum.com/u/valdar)\
**Replies:** 4\
**Last updated:** [July 27, 2010, 3:59am UTC](https://www.ruby-forum.com/t/problem-with-marshal-load-in-silverlight/192159 "2010-07-27T03:59:30Z")

</div>

I’ve run into a problem when using Marshal.load in Silverlight - the following exception is thrown: NotSupportedException: Class IronRuby.Builtins.RubyObject does not have a valid deserializing constructor I tracked…

---

## [Confused with "include" and require](https://www.ruby-forum.com/t/confused-with-include-and-require/192240)

<div class="topic-metadata">

**Author:** [@studlee2](https://www.ruby-forum.com/u/studlee2)\
**Replies:** 2\
**Last updated:** [July 27, 2010, 2:41am UTC](https://www.ruby-forum.com/t/confused-with-include-and-require/192240 "2010-07-27T02:41:35Z")

</div>

I am getting an error when I include or require a file. My code was getting too long for one file, so I attempted to separate out one section into another file, and then “load” the file into the main file at the appro…

---

## [Need help using Savon gem! (SOAP)](https://www.ruby-forum.com/t/need-help-using-savon-gem-soap/188389)

<div class="topic-metadata">

**Author:** [@ghettoiam](https://www.ruby-forum.com/u/ghettoiam)\
**Replies:** 8\
**Last updated:** [July 27, 2010, 1:48am UTC](https://www.ruby-forum.com/t/need-help-using-savon-gem-soap/188389 "2010-07-27T01:48:29Z")

</div>

I’m trying to use this “Sendfax” method defined here: https://ws.interfax.net/dfs.asmx?WSDL. I can’t seem to a set a properly format the request however. Previously I was using SOAP::WSDLDriverFactory and was succes…

---

## [Re: stop program with entering a key](https://www.ruby-forum.com/t/re-stop-program-with-entering-a-key/192251)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [July 27, 2010, 1:30am UTC](https://www.ruby-forum.com/t/re-stop-program-with-entering-a-key/192251 "2010-07-27T01:30:16Z")

</div>

Use puts to print the screen and gets to get the user’s input. I’m guessing you want to add something like puts “pls press -1 to stop game” answer = gets if answer.to\_i == -1 or answer == randomnumber puts “Continue…

---

## [\[ANN\] RubyConf Uruguay 2010, October 29th and 30th](https://www.ruby-forum.com/t/ann-rubyconf-uruguay-2010-october-29th-and-30th/192253)

<div class="topic-metadata">

**Author:** [@foca](https://www.ruby-forum.com/u/foca)\
**Replies:** 0\
**Last updated:** [July 27, 2010, 1:23am UTC](https://www.ruby-forum.com/t/ann-rubyconf-uruguay-2010-october-29th-and-30th/192253 "2010-07-27T01:23:16Z")

</div>

Hey there! We’d like to invite you to RubyConf Uruguay, which will take place this October on Friday 29th and Saturday 30th, in Montevideo. This will be a single-track conference aimed at developers who want to lear…

---

## [Regex ^ beginning not strong?](https://www.ruby-forum.com/t/regex-beginning-not-strong/192224)

<div class="topic-metadata">

**Author:** [@tensaiji](https://www.ruby-forum.com/u/tensaiji)\
**Replies:** 2\
**Last updated:** [July 26, 2010, 10:41pm UTC](https://www.ruby-forum.com/t/regex-beginning-not-strong/192224 "2010-07-26T22:41:05Z")

</div>

Hi, I’ve some more regex questions. I wrote a pattern to check for valid regexes and inspect the parts (we all have our reasons for the things we do:) It wasn’t working so I went down to simpler and simpler patterns, …

---

## [Directory structure best practice?](https://www.ruby-forum.com/t/directory-structure-best-practice/192242)

<div class="topic-metadata">

**Author:** [@MrZombie](https://www.ruby-forum.com/u/MrZombie)\
**Replies:** 2\
**Last updated:** [July 26, 2010, 9:59pm UTC](https://www.ruby-forum.com/t/directory-structure-best-practice/192242 "2010-07-26T21:59:31Z")

</div>

Hi all! What are the best practices concerning directory structures for Ruby programs? I want to run tests using Cucumber and RSpec, so referring to the RSpec book I created a features/ and spec/ folders for the test…

---

## [Erroneous output from ri File](https://www.ruby-forum.com/t/erroneous-output-from-ri-file/192241)

<div class="topic-metadata">

**Author:** [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Replies:** 0\
**Last updated:** [July 26, 2010, 8:48pm UTC](https://www.ruby-forum.com/t/erroneous-output-from-ri-file/192241 "2010-07-26T20:48:42Z")

</div>

I mentioned this in another thread, but didn’t get an answer. For me, under 1.9.1p429 (RubyInstaller) under Windows, ri File says only this: (begin) ------------------------------------------------------- Class: File…

---

## [General delimiters](https://www.ruby-forum.com/t/general-delimiters/192178)

<div class="topic-metadata">

**Author:** [@industrial\_ghetto](https://www.ruby-forum.com/u/industrial_ghetto)\
**Replies:** 4\
**Last updated:** [July 26, 2010, 8:11pm UTC](https://www.ruby-forum.com/t/general-delimiters/192178 "2010-07-26T20:11:49Z")

</div>

I would like to create a new general delimiter. ---------- Background Suppose you have created a specific data type which is a combination of various other native data types, such as strings and numbers. Suppose tha…

---

## [Unable to access the elements in an array with array\[1\]\[0\]](https://www.ruby-forum.com/t/unable-to-access-the-elements-in-an-array-with-array-1-0/192228)

<div class="topic-metadata">

**Author:** [@arti\_singh](https://www.ruby-forum.com/u/arti_singh)\
**Replies:** 2\
**Last updated:** [July 26, 2010, 6:42pm UTC](https://www.ruby-forum.com/t/unable-to-access-the-elements-in-an-array-with-array-1-0/192228 "2010-07-26T18:42:35Z")

</div>

I feel quite silly asking this question, but here I am. I have what I believe to be a 2 dimensional array, but I can not access the elements in the array with the array syntax array\[1\]\[0\] when I select the first eleme…

---

## [Setting and initializing instance variables on RubyClasses](https://www.ruby-forum.com/t/setting-and-initializing-instance-variables-on-rubyclasses/191128)

<div class="topic-metadata">

**Author:** [@valdar](https://www.ruby-forum.com/u/valdar)\
**Replies:** 7\
**Last updated:** [July 26, 2010, 6:01pm UTC](https://www.ruby-forum.com/t/setting-and-initializing-instance-variables-on-rubyclasses/191128 "2010-07-26T18:01:48Z")

</div>

Hello, How can I go about setting an instance variable on a RubyClass? Here’s some code for context: \[RubyClass("Graphics")\] public class Graphics { \[RubyMethod("frame\_rate", RubyMethodAttributes.PublicSingleton)\]…

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

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