407820-408178 subjects 408207-409316

Playing with method_missing -- argument list
408021 [tamouse.list] In https://gist.github.com/tamouse/5719507 , I've been playing around
+ 408023 [matma.rex@gm] You probably want ....send(method, *args)  with a splat before 'args'.
| 408036 [tamouse.list] Indeed. But the major problem turns out to be line 84 -- the super call
+ 408024 [jgabrielygal] 2.0.0p195 :001 > h = {}

Setting UserAgent for Ruby/RubyGems/Bundler
408031 [lists@ru y- ] I'd like to set the useragent to something else when calling bundler, or
408033 [lists@ru y- ] Regarding Bundler, it looks like it's using Net::HTTP and there may be a

sftp.read! accepts neither 3 nor 1 arguments
408035 [lists@ru y- ] I am using Ruby 1.9.3p392, with net/ssh 2.6.7 and net-sftp 2.1.1.
408039 [lists@ru y- ] The parser does not know or care how many parameters a method expects,

feedzirra with xpath
408037 [lists@ru y- ] I have general questions about feedzirra.
408038 [tamouse.list] You *could*, but from a cursory read, I'd say feedzirra is primarily

What do I need to write a web-based application invoked from a browser
408043 [ruby.student] I am looking for suggestion/guidance and best approaches to learn Web
+ 408044 [lists@ru y- ] If I were you I'd start with a basic Ruby on Rails tutorial. That sounds
| 408047 [ruby.student] Joel, thank you for your suggestion.
+ 408087 [sto.mar@we .] You should have a look at Sinatra.
  408089 [ruby.student] I certainly will.

test unit - result output written to database?
408045 [lists@ru y- ] I have some code I inherited which is using Test Unit on Ruby 1.8.7.

Use of capybara outside of any application
408046 [tamouse.list] I'm trying to set up a cucumber/capybara test suite that I can use
408066 [lists@ru y- ] Well, including module in module is a bit tricky. I think what you want
408069 [tamouse.list] Oh, yes, indeed! Dumb move, thinking include worked with module; I

[ANN] nokogiri 1.5.10 Released
408049 [mike.dalessi] nokogiri version 1.5.10 has been released!

[ANN] minitest 5.0.4 Released
408050 [ryand-ruby@z] minitest version 5.0.4 has been released!

How do I write a method, which returns whether the letters in a word occur in alphabetical order
408055 [lists@ru y- ] How do I write a method, which returns whether the letters in a word
+ 408064 [shortcutter@] You start by thinking of a good name for the method and the argument.  Once
+ 408077 [lists@ru y- ] Is there a reference directory of algorithms? How do I know the
| 408082 [tigre7t@gm i] good question and similar to a previous one posed here
+ 408083 [lists@ru y- ] string, then ask your function to check the rest.
  408084 [lists@ru y- ] Well, let me "correct" myself, just for the record: even if splicing a
  408086 [shortcutter@] How do you know?  That's just an assumption.

Write a method which takes in a string and returns an array of pairs
408056 [lists@ru y- ] How do I write a method which takes in a string and returns an array of
408065 [lists@ru y- ] Sounds like fun, I'll have a go since I've never done something like

Write a method which takes in a string and an array of valid word
408057 [lists@ru y- ] How do I write a method which takes in a string and an array of valid

Write a method intersection that takes two ranges
408058 [lists@ru y- ] How do I write a method intersection(range1, range2) that takes two
+ 408059 [dave@lo ke s] These all sound like homework assignments and as a teacher I think you shoul=
+ 408061 [atma@co va e] Do it on paper first, write every step. Then it would be easy to create a 1st version that works :-)
+ 408063 [tamouse.list] These all sound like homework problems...
+ 408078 [lists@ru y- ] Is there a good reference website of message functionalities?
  408098 [shortcutter@] How about thinking of an algorithm _yourself_?

[ANN] Tork 19.3.1 - test with fork
408060 [sunaku@gm il] 1. Absorbs test execution overhead into a master process.

A brand new ruby-lang.org has been released!
408070 [jd@va gu t. ] ...
408072 [tamouse.list] Yay!! Well done!

[ANN] nokogiri 1.6.0 Released
408073 [mike.dalessi] nokogiri version 1.6.0, "GORUCO 2013 edition," has been released!

408074 [lists@ru y- ] Well, this is a tad embarassing. Somehow (?) I've been unsubscribed from
408088 [sto.mar@we .] The problem is known and about to be solved soon, hopefully.

Gem - modify CFLAGS for a wrong-behaving gem?
408075 [marcin.rzezn] I am trying to build a really badly written gem that has an ungodly

Issue in using Grok gem
408079 [lists@ru y- ] I wanted to parse a log file, so came across Grok. Installed the gem and
408492 [lists@ru y- ] Any thoughts on above issue?
408501 [justincollin] If you look at the source code

Nokogiri::XML::AttributeDecl methods output understanding
408081 [lists@ru y- ] Today morning my target is going through the `

"Unable to require openssl" is driving me crazy gem 2.0.3 might be broken
408090 [ruby.student] I was having lost of problems when Ruby *gem *stop working. So I upgraded
+ 408091 [ruby.student] *rpm -qa | grep -i openssl*
+ 408092 [justincollin] You probably need to install the openssl development package and then
  408093 [ruby.student] I already have the openssl development package. I recompiled and got the
  408094 [justincollin] <http://www.ruby-lang.org/en/__news/2013/02/22/ruby-1-9-3-__p392-is-released/
  408095 [ruby.student] As suggested by Justin, I installed and used *rvm* and it worked like a

[JOBS] Front end RoR Developer-Can work remotely
408096 [lists@ru y- ] 3+ years ROR ( Ruby on Rails ) experience or Good front end development

How to generate TAP output for Selenium-WebDriver TC written in Ruby
408097 [lists@ru y- ] We need to integrate Jenkins with TestLink. For now Iam able to run

extract from output (regular expressions)
408099 [lists@ru y- ] As a beginner, I'm looking for a way about how to extract selected
+ 408100 [lists@ru y- ] This outputs it into a 2D Array and displays the results to the console,
+ 408104 [lists@ru y- ] Oops, I don't know why I had "to_a" in there, works fine without it.
+ 408105 [lists@ru y- ] Thank you, it works for me but have one more question. Is there a way to
+ 408107 [lists@ru y- ] Look up Array#flatten
+ 408109 [lists@ru y- ] If you want it to just be an array of space-delimited strings, you could
+ 408160 [lists@ru y- ] FYI the reason I'd use a 2D array for that kind of thing is because you
  408165 [shortcutter@] I'd give even more structure to the data: I use a Hash as element type in

buffer overflow detected while doing gem install savon in Ruby 1.8.6 on Fedora11
408101 [lists@ru y- ] I have a Linux Fedora 11 system. I have installed ruby 1.8.6 (ruby -v),
408106 [atma@co va e] Many linux systems use a specific ruby version (old usually) because it's in some way tight to the system. Ruby 1.8.x is way too old and should not be used.
408111 [marlonglopes] Install rvm and then install ruby
408128 [lists@ru y- ] Yes. Thanks, that did work.

Class or method to convert hash keys to enable either string or symbol access?
408102 [tamouse.list] I think I've seen this somewhere, but I can not recall where. Is there
+ 408103 [marcin.rzezn] I usually use 'hashie' gem for this kind of stuff eg.
| 408115 [tamouse.list] On Jun 10, 2013 6:57 AM, "Marcin Rzenicki" <marcin.rzeznicki@gmail.com>
+ 408114 [hassan.schro] Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

I am trying to do an autocomplete with jquery and ruby
408108 [lists@ru y- ] I'm not sure what is wrong with this code. I am trying to do an
+ 408113 [matma.rex@gm] This doesn't output what you think it does. The output is not valid JavaScript.
+ 408133 [lists@ru y- ] I want to output a list that is kinda list ['option1','option2']

Ruby Binding and send concepts
408110 [lists@ru y- ] i am struggling to understand binding concepts, i am not able to find

Inconsistent IO character reading when converting encoding
408116 [lists@ru y- ] In Ruby 1.9.3-429, I am trying to parse plain text files with various

Issues compiling Ruby 1.9.33-p429 under AIX version 7
408117 [ruby.student] While trying to build Ruby 1.9.33-p429 under AIX version 7, the *./configure
+ 408118 [matt@te hn r] Good luck!  Please let me know what sort of fixes you wind up with.  I
+ 408130 [lists@ru y- ] I just tried to compile it on our AIX 7.1 system...
  408134 [lists@ru y- ] ... but, building ruby-2.0.0-p195 worked!
  408135 [ruby.student] Really? 2.0.0-p195 worked!

Issue installing Watir (and other Gems) on Windows
408119 [lists@ru y- ] be having issues installing Watir (and other Gems in general). Got as

[ANN] formula1.db - Free public domain F1 / Formula One database n models in Ruby
408120 [gerald.bauer] I've added new tables n models to the sportdb gem to cover racing
408123 [atma@co va e] Nice :-) thanks for that!

How to install a gem without using gem command online
408121 [ruby.student] Team,
+ 408122 [wbrisett@at ] I have a server behind a firewall that won't allow me to access the web to =
| 408136 [ruby.student] This will work for me even if I need to go crazy with dependencies.
+ 408144 [josh.cheek@g] -Josh

`rescue in rbuf_fill': Timeout: :Error (Timeout::Error) - selenium-webdriver
408124 [lists@ru y- ] Documents\userdata\Ruby\Scripts>So.rb
+ 408125 [tamouse.list] Can't really say for sure there....
+ 408985 [lists@ru y- ] I am getting the exact same error randomly in my test. I am using
+ 408986 [lists@ru y- ] It's supposed to stop after a certain amount of time. Otherwise you'll
+ 408987 [lists@ru y- ] Thank you! I will try and look up what other timeouts there are and
+ 408988 [lists@ru y- ] I also added
+ 408989 [lists@ru y- ] This is also in combination with Joels answer.

408126 [Alexandre.TR] ***********************************************************************************

post request of digest auth
408127 [lists@ru y- ] m fighting with post request of digest auth a few days and still can't
408197 [bradleydsmit] I am unsure what `www_auth_response` is suppose to do.

Getting Started With Development
408129 [cdwijayarath] I'm new to Ruby Development. I downloaded source from Github, but couldn't
+ 408131 [lists@ru y- ] Ruby is often installed on linux, or can be easily installed with the
| 408146 [lists@ru y- ] I'm okay up to this point. But When I tried to run make, I'm getting
| + 408149 [fluido@fl id] Compilation of Ruby in the normal way requires a pre-existing ruby
| | + 408150 [lists@ru y- ] Thank you for helping.
| | | 408152 [fluido@fl id] Once you have a running ruby, compilation works OK. Just do a
| | + 408173 [lists@ru y- ] apt-get install ruby installs Ruby 1.8.7, but I need to compile Ruby
| | | 408174 [fluido@fl id] Yes. For what needs to be done while compiling, 1.8 is enough.
| | | 408175 [lists@ru y- ] But it gives errors for new features in Ruby 2.0 that was not in early
| | | 408176 [fluido@fl id] Do not worry. The interpreter is not asked to do anything like "p
| | | 408177 [lists@ru y- ] What do you mean by new interpreter is ready? I want to check some new
| | | 408180 [fluido@fl id] I mean that the interpreter in /usr/bin (the one installed by
| | | 408181 [lists@ru y- ] I saved project I downloaded at /home/chamila/ruby/rr/ruby and compiled
| | + 408411 [lists@ru y- ] This works for me in Ubuntu? It works fine. Do I have to follow same
| |   + 408413 [fluido@fl id] I have no idea - I have no macintosh.
| |   + 408414 [mike@st k. a] load
| |     408415 [lists@ru y- ] How can I compile and run downloaded source code using these tools?
| |     408419 [mike@st k. a] My preferred solution on a Mac is to use Homebrew =
| + 408166 [lists@ru y- ] Make sure that you are using the right source tar ball. The ones you
|   408172 [lists@ru y- ] I tried this also, it gives the same error "Executable host Ruby is
+ 408132 [josh.cheek@g] It helps if you explain how you tried to build it and why it didn't work
+ 408137 [atma@co va e] ...
| 408147 [lists@ru y- ] I'm using Ubuntu 11.10.
+ 408186 [lists@ru y- ] This is what I'm getting when running ruby and irb, same statements get

Loop with range question
408138 [lists@ru y- ] I cannot use °»next if i=3..6°… or °»next if i=(3..6)°…  in code below.
+ 408139 [lists@ru y- ] (3..6).include? 4
| 408157 [lists@ru y- ] How would I incorporate the above into the loop? I tried...
| 408163 [sto.mar@we .] That's not possible, the error message does not match your input
+ 408140 [sto.mar@we .] 2.0.0-p195 :018 > (3..6).include? 5
| + 408141 [sto.mar@we .] PS. In fact, it would also be possible to use the === operator
| + 408156 [lists@ru y- ] You state a range can never be equal to an integer. Does that mean
|   408164 [shortcutter@] irb(main):002:0> (3..6) =3D=3D=3D 5
|   408185 [lists@ru y- ] Robert, thanks for the link to equivalence.
+ 408158 [lists@ru y- ] 3..6 is a Range, and Integers like 1 are class Fixnum. You can see more
+ 408162 [tamouse.list] Clippy sez: "It appears you are trying to use the flip-flop operator."
  408184 [lists@ru y- ] Helpful! Appreciate the additional examples tamouse.

Building Ruby
408142 [cdwijayarath] How can I install Ruby at http://www.ruby-lang.org/en/download on Ubuntu?
408143 [josh.cheek@g] How far do you get? What is the error?
408145 [lists@ru y- ] When I try to make, it says "executable host Ruby is required"
408182 [codepoint92@] Building ruby requires a working ruby installation. Either you get a
408196 [aleiphoenix@] I've got no ruby on my gentoo box. When I install *first* ruby via rvm inst=
408200 [stu@ru yp og] What do you mean my minimal? I installed Ruby 2.1 on my Funtoo laptop the
408222 [aleiphoenix@] me
408231 [codepoint92@] Wow. I didn't know that. Thanks.

How would I refactor these four `unless` statements?
408148 [lists@ru y- ] Let's say I have the following four `unless` statements in a row. At
+ 408153 [justincollin] missing_keys = [:compilation_level, :output_format, :output_info] -
| 408155 [lists@ru y- ] Thanks Justin.
+ 408159 [lists@ru y- ] If you're using Ruby 2.0 then you have the option of methods with
+ 408167 [lists@ru y- ] I think they're fine. When it comes to logical statements for error
+ 408171 [shortcutter@] As one can see there are many options.  Here's another one

RestClient/openssl.so w/Cygwin
408151 [lists@ru y- ] Trying to use rest-client with a small Ruby script under Cygwin, .. it

[ANN] ErlPort (library to connect Erlang to Ruby) 1.0.0alpha released
408154 [lists@ru y- ] I've just released ErlPort version 1.0.0alpha. ErlPort is a library for
408168 [botpena@gm i] +1. thanks for erlport.

create ruby file with ruby GUI
408169 [lists@ru y- ] let us say i have a ruby script. This ruby script is a GUI with input
+ 408170 [lists@ru y- ] You could use a Template if you're going to be writing the same basic
+ 408194 [tamouse.list] Instead of generating a script, generate a configuration file that a
+ 408204 [lists@ru y- ] ==================================

Replot in ruby gnuplot
408183 [lists@ru y- ] I need to plot data in real time, reading a file over and over and
+ 408187 [lists@ru y- ] Are you on Windows? Or, which OS?
+ 408188 [lists@ru y- ] Thanks, I'll give it a try tomorrow when I'm on a Windows box
+ 408199 [lists@ru y- ] The suggestion works perfect for me. I used a separate thread and a

Error trying to download Ruby Gems on Windows
408189 [lists@ru y- ] I have been messing with it for two days now trying to find a solution
+ 408190 [josh.cheek@g] Probably remote sources (your ruby and rubygems are both old), does it work
| 408191 [lists@ru y- ] This is what I get when I run that line.
| 408193 [josh.cheek@g] Googling your error turns up
+ 408462 [lists@ru y- ] I have tried it multiple times on multiple days and it still doesn't

Timsort in Ruby
408192 [lists@ru y- ] why timsort isn't implemented in Ruby, or is it just not a priority of
+ 408195 [matma.rex@gm] Probably simply because nobody ever did that. If you implemented it and submitted a patch (with benchmarks proving that it is in fact an improvement), it would probably be happily accepted. (But do note, the sorting funciton Ruby uses seems already heavily magically optimized: http://rxr.whitequark.org/mri/source/util.c#286 )
| 408215 [stu@ru yp og] Probably simply because nobody ever did that. If you implemented it and
+ 408208 [lists@ru y- ] So that's Ruby's sorting function... It doesn't even look like it's
| + 408212 [lists@ru y- ] So you're saying More SLOC = More Optimised?  That's quite an arbitrary
| + 408213 [hmaddocks@me] For sure, because the main criteria I use for choosing a language is how =
| + 408221 [lists@ru y- ] Out of interested, I yanked that C source file from Python, modified
|   408318 [lists@ru y- ] (as a note, it would be interesting to benchmark both running time,
+ 408223 [lists@ru y- ] I'm impressed you got that working. Interesting that the only benchmark

NokoGiri XML Parser
408198 [lists@ru y- ] I am trying to build a hash table from the xml file attached. I am
+ 408217 [lists@ru y- ] If you insist on having a hash returned I'd recommend taking a look at
+ 408225 [shortcutter@] Nokogiri is quite capable so this is a good choice.
+ 408229 [lists@ru y- ] I am trying to parse the tags and build a Record or Hash like Structure.
| 408230 [shortcutter@] Well, you can get that from the DOM - probably even with a single XPath
+ 408232 [lists@ru y- ] The problem with xpath or maybe i am not sure how to use it but if i say
| 408256 [shortcutter@] This is not valid XML.  Where are the closing tags for <CELLNAME> and
| 408257 [shortcutter@] Correction
+ 408254 [lists@ru y- ] It would be great,if you provide sample output,you are looking for.Which
+ 408290 [lists@ru y- ] Thanks Robert. This is what i am wanting to do. Is there a book or link
  408300 [shortcutter@] You can read the specs at W3C, there are plenty of XPath tutorials out

trying to load a .rb file in irb
408201 [lists@ru y- ] I am trying to load a ruby program into irb and it will not load.
+ 408202 [sto.mar@we .] why do you put whitespace in the path?
+ 408203 [lists@ru y- ] I put the white space in because one of the other forums said that some
+ 408210 [lists@ru y- ] Try Dir.pwd to see where irb is looking for the file. You might need the
+ 408211 [lists@ru y- ] I did that it says C:/Users/Eric.
+ 408220 [sto.mar@we .] Make sure you start irb from the directory where the file is located.
+ 408224 [lists@ru y- ] Dir.chdir should change the path to whatever you specify. If you want to
+ 408324 [lists@ru y- ] The directory change worked! Thank you both for your help. One question
| 408331 [sto.mar@we .] File.open("text.txt").each {|line| puts line }
+ 408325 [lists@ru y- ] Never mind i figured it out. Thank you guys! Great forum!
+ 408333 [lists@ru y- ] I'd use
+ 408343 [lists@ru y- ] Apologies. On the loading issue that I eluded to early it was the

Can I use Sinatra to render dynamic pages?
408205 [ruby.student] Hell Team,
+ 408206 [dummey@gm il] Dynamicly updating content on a page falls under Ajax (
| 408209 [ruby.student] Rick,
| 408216 [me@wa to ho ] The unfortunate truth is that when doing anything in the browser other
| 408218 [lists@ru y- ] A webserver can push content to the browser without JavaScript being
+ 408219 [vanweerd@gm ] You should be able to do this without JavaScript by using streaming.
  408228 [ruby.student] Well, I got some good suggestions from everyone here. I thank you all for
  + 408233 [hassan.schro] Uh, do you mean "Tomcat", the Java servlet container? That would
  + 408243 [vanweerd@gm ] Sinatra is as lightweight and simple a framework you can choose for doing a
    408247 [ruby.student] Nick and everyone else,
    + 408248 [hassan.schro] "If Sinatra is overkill for what I want, perhaps I should look into
    + 408249 [atma@co va e] ...
    | 408250 [ruby.student] Hey Panagiotis,
    + 408259 [vanweerd@gm ] First off, I was only writing enthusiastically out of my love of Sinatra,
      408265 [ruby.student] Nick,
      408266 [lists@ru y- ] in thin project, there a a async exemple which
      408271 [ruby.student] Thanks everyone for your posts. I have received myriads of suggestions
      408293 [lists@ru y- ] push data to any browser is difficult.