408622-408931

408427-410359 subjects 408815-410122

Error with JSON#parse
408622 [lists@ru y- ] require 'json'
+ 408623 [lists@ru y- ] The same with `YAML#load`
| 408625 [tony.arcieri] Your example string "s" is neither valid JSON or YAML. For starters, the
| 408628 [lists@ru y- ] Sorry I couldn't catch you. :(
| 408629 [wishdev@gm i] Ok, so you wanted to parse a Hash and it did not work. How about dumping a
+ 408631 [josh.cheek@g] require 'json'
  408645 [lists@ru y- ] Actually I wanted the output `{:value => [ {"a" => nil, "b" => nil, "c"
  408653 [sto.mar@we .] Please reread the previous answers....
  408658 [lists@ru y- ] Ok.. Sorry I missed that actually. Apologies :(

Why the use of a pound (#) sign with Enumerable
408624 [ruby.student] Team,
+ 408626 [rubytalk2dav] It's not just Enumerable, it's all Ruby classes.  The # denotes an
| 408627 [robert.w.jac] On Jul 1, 2013, at 4:18 PM, Dave Aronson <rubytalk2dave@davearonson.com> =
+ 408630 [robert.w.jac] These sorts of things are somewhat difficult to google for (I tried to =
  408651 [ruby.student] These are excellent replies. I tried *google* before I tried the forum and

Socket probleme
408632 [lists@ru y- ] Hey guys !
+ 408633 [joelvanderwe] It looks like you pasted the server code twice.
+ 408648 [lists@ru y- ] Thanks dude , yes i pasted server code twice ^^

How do I make lots of classes aware of each other?
408634 [lists@ru y- ] I'm apparently missing something fundamental in my knowledge of classes
+ 408635 [stu@ru yp og] You can use send which as you would expect sends messages to an object. You
| 408637 [lists@ru y- ] Thanks.
| 408638 [jeremy@bo p.] Why do you have so many apparently rather tightly coupled classes? Maybe
| 408640 [lists@ru y- ] This is a fair comment.  I think I need to step back and look at my
| 408642 [stu@ru yp og] Andrew look at Josh's example. That's an observer. A great example. The Baz
+ 408639 [josh.cheek@g] class Foo
+ 408643 [shortcutter@] You have received excellent replies already.  I'd just like to point out
+ 408646 [lists@ru y- ] Perhaps an example would help. I struggled for a while with the links
+ 408652 [sto.mar@we .] I think your question and example is just too general to give

Backtick probleme
408654 [lists@ru y- ] out = `ls`
+ 408655 [sto.mar@we .] out = `dir`
+ 408656 [josh.cheek@g] If your computer doesn't have an ls command, you can do the same thing from
| 408659 [shortcutter@] I guess you rather mean Dir.entries('.') or Dir["*"].
| 408661 [josh.cheek@g] Yes, thank you!
+ 408657 [hassan.schro] 1) cargo-culting example code for a different platform without

How can I add minutes,seconds and hours to a DateTime object?
408662 [lists@ru y- ] require 'date'
+ 408663 [justincollin] No, you cannot modify Date/DateTime objects. You must create a new one
| 408665 [lists@ru y- ] require 'date'
+ 408666 [lists@ru y- ] require 'date'
  408667 [mike@st k. a] add 30 hours - looking a the code there is a lot of "noise".
  408670 [me@wa to ho ] Both approaches make me nervous.  The first because your parsing a date

[ANN] kramdown 1.0.2 released
408664 [t_leitner@gm] ## About kramdown

Implementing sort/sort!
408668 [lists@ru y- ] I was wondering about implementing sort/sort!. Basically, I have a Point
408672 [shortcutter@] Usually a bad idea because it allows someone to mess with the internal
+ 408673 [lists@ru y- ] I very much appreciate the thorough review and subsequent suggestions
+ 408733 [sto.mar@we .] I'm probably missing something obvious, but why not simply use
  408743 [shortcutter@] Duh.  No, you're not missing anything here.  The only defense I have for
  408744 [sto.mar@we .] A very good point. The `self` in the bang method is probably not
  408751 [shortcutter@] Or it is used to signal something (like with String#gsub!).  For those

[ANN] ruby_parser 3.2.0 Released
408669 [ryand-ruby@z] ruby_parser version 3.2.0 has been released!
408671 [justincollin] I really appreciate your continued work on ruby_parser!
408677 [ryand-ruby@z] Thanks!

Update only date in datetime.
408674 [lists@ru y- ] I have a datetime. I want to change only date in that so that result
408676 [lists@ru y- ] Got it.
408678 [shortcutter@] Kind regards

how to nest queries in ruby??
408675 [lists@ru y- ] I don't know how to nest subqueries into a big one. I know the query in

gem specific_install
408679 [lists@ru y- ] I want to install gem from git repo.

Difference between Kernel#__callee__ and Kernel#__method__
408680 [lists@ru y- ] Is there any Difference between Kernel#__callee__
408691 [lists@ru y- ] __method__ returns defined name, and __callee__ returns called name.
408693 [lists@ru y- ] Excellent answer !! :)

rake drake or ?
408684 [marco-oweber] Is there yet another alternative to drake vs rake?
408754 [marco-oweber] It already works - some niceness such as "DSL" and "namespaces" are
408764 [sto.mar@we .] I just wanted to mention that there also is 'thor'.

Win32::Registry - delete_value - system cannot find file specified
408685 [lists@ru y- ] I'm trying to delete an existing value in my registry (verified

Re: RubyDNS - asynchronous DNS client and server for Ruby.
408686 [lists@ru y- ] I'm wondering if it's possible to use rubydns to diagnose an issue on my
408726 [lists@ru y- ] I answered my own question.  The example on the github README and the

[ANN] vlad 2.6.0 Released
408688 [ryand-ruby@z] vlad version 2.6.0 has been released!

[ANN] ruby_parser 3.2.1 Released
408689 [ryand-ruby@z] ruby_parser version 3.2.1 has been released!

delay a request via webrick
408694 [lists@ru y- ] require 'webrick/httpproxy'

Split string
408695 [lists@ru y- ] hey Guys i need to split this query to string array how contains three
+ 408696 [mike@st k. a] What have you tried so far, and what are you trying to do?  It *looks =
+ 408697 [josh.cheek@g] First reaction is to tell you to quit being lazy and go read the docs. Your
+ 408699 [shortcutter@] I am pretty sure you'll find that functionality in Webrick.
+ 408710 [lists@ru y- ] so your query is like,
+ 408717 [lists@ru y- ] thanks guys for responding .

Loading csv giving error
408701 [lists@ru y- ] called "Price_lookup" in notepad then saved in plugin folder
+ 408702 [r.crawfordwi] Why do you use the File class if you want to use the CSV class?
+ 408708 [tamouse.list] What line number is appearing with that message?
| + 408709 [lists@ru y- ] This code works fine....
| | 408730 [lists@ru y- ] doesnot work
| + 408731 [lists@ru y- ] Line 2
+ 408740 [lists@ru y- ] I try your code doesnot work please see my attachment I am using ruby
  + 408741 [sto.mar@we .] Unless the code and error message is dozens of lines long, please
  + 408759 [tamouse.list] Your problem is exactly this: you gave irb the name of the file of your =

RUBYOPT -S RuntimeError
408703 [lists@ru y- ] I'm confused.
+ 408704 [lists@ru y- ] Same behaviour on 1.8.6 on HPUX.
+ 408707 [tamouse.list] RUBYOPT         Additional Ruby options.
+ 408723 [lists@ru y- ] Thanks for that.

URL "id" element not part of the params objects after submitting a form via form_tag
408705 [lists@ru y- ] Why is the URL "id" element not part of the params objects after
+ 408727 [sto.mar@we .] You did not provide any context, which makes helping difficult.
+ 408728 [lists@ru y- ] Thanks. I will move it to rails list.

Unable to activate sinatra-contrib-1.4.0
408711 [lists@ru y- ] I am new to Ruby and currently trying to develop an existing Ruby
408771 [lists@ru y- ] This problem is fixed.
408783 [tamouse.list] It would be very helpful if you told the sinatra folks, if you haven't =

Ruby web service with REST support
408712 [lists@ru y- ] I want to develop the webservice in Ruby that will support the REST API
+ 408714 [matthew@ke w] I would suggest you install the Sinatra gem, and read the
| 408721 [shortcutter@] Alternatively Webrick which is part of the standard library can be used to
| 408772 [lists@ru y- ] Are there any limitations with Webrick? or we can use it for any kind of
| 408773 [shortcutter@] robert
| 408775 [lists@ru y- ] Webrick is build in easy to use application server.
| 408811 [lists@ru y- ] Basically we want to make our application to be supported with REST
| 408816 [shortcutter@] If you use Sinatra or Webrick there really seems to be no point in having
| 408818 [lists@ru y- ] Thanks Robert.
+ 408820 [tony.arcieri] I'm going to go out on a limb and make a crazy suggestion: Rails
| 408821 [lists@ru y- ] Do u mean tomcat Apache+ rails+ ruby?
| 408824 [Carey.Nation] +1 for Rails.
+ 408835 [lists@ru y- ] I am still confused when to use phusion passenger and when to use rails?
  408880 [tony.arcieri] They're orthogonal. Phusion Passenger is an Apache/nginx module which
  + 408885 [sleetdrop@gm] Yuan Jiang
  + 408930 [lists@ru y- ] Thanks all for your inputs.
    408931 [shortcutter@] Please start a new thread for that.  See also

Ruby link grabber
408713 [lists@ru y- ] Hey guys i wanted to write a ruby code to grab all links from html code
+ 408715 [lists@ru y- ] Do you want to just grab the links, or do you specifically want to write
| 408716 [shortcutter@] Otherwise use Mechanize. ;-)  Writing a HTTP client from scratch is
+ 408718 [lists@ru y- ] i want to practice the language so i created for myself a challenge
  408719 [robert.w.jac] I personally try to go through the Ruby Koans =
  408720 [shortcutter@] There's also http://rubyquiz.strd6.com/

How do I rescue a program exception in an at_exit block?
408724 [josh.cheek@g] I was thinking about how bad I am at reading error messages, and realized
+ 408725 [matthew@ke w] It's a pure, unadulterated hack, but you can "exec" something at the
+ 408729 [lists@ru y- ] This won't help you, but I once ran into a problem with multiple at_exit
| 408742 [quixoten@gm ] If you call exit! in your at_exit block it will exit immediately and
+ 408752 [shortcutter@] But why go through those hoops and do it in at_exit?  You could simply put
  408755 [josh.cheek@g] I like the idea that I could just require a gem and have my error output
  408756 [josh.cheek@g] Also, some cases it's not clear how to do this. Say I wanted to put it in a

what is Vector#map2 ?
408734 [lists@ru y- ] Can anyone give me one example to understand the functionality of
408735 [sto.mar@we .] Shouldn't be too difficult to find out by looking at the source,
+ 408736 [mike@st k. a] Vector#map2(http://yard.ruby-doc.org/stdlib-2.0/Vector.html#collect2-insta=
| + 408737 [lists@ru y- ] I am using `sublimeREPL`.
| + 408739 [sto.mar@we .] The source is even included in the docs linked to by the OP...
+ 408738 [lists@ru y- ] Thank you very much for giving an example.

How can I make ruby read a string of characters per three characters?
408745 [lists@ru y- ] I want to input a string of characters, and have it be read by every
+ 408747 [lists@ru y- ] from the keyboard and acts after every third character, you'll have to
+ 408749 [lists@ru y- ] "a testy string of testyness".split('').each_slice(3) do |s|
| 408769 [stu@ru yp og] need to loop it as well and do the test on input keeping count if I'm
+ 408779 [lists@ru y- ] Here's an example which will let you put in sets of 3 characters and

Can't manage to install do_squlite3 with gem
408746 [lists@ru y- ] First, I'm a big newbie on ruby and that stuff so maybe my question is
408750 [sto.mar@we .] Is sqlite installed on your system?

TracePoint class study
408748 [lists@ru y- ] I was going through the class -
408869 [lists@ru y- ] May I have some help on the above ?

rubygems packetfu error
408753 [lists@ru y- ] hey guys i wanted to do some packet crafting with packet fu but when i

Parslet: subtrees merged without warning?
408757 [lists@ru y- ] I miss subtrees which I wanted to be generated by certain ".as"'s and I
+ 408760 [lists@ru y- ] There was an error in my previous post. I corrected the message text
+ 408776 [kaspar.schie] Only in one case: When merging a subtree containing .as(...) with
  408777 [lists@ru y- ] thank you for your answer and thank you for Parslet!
  408838 [kaspar.schie] Probably
  408839 [lists@ru y- ] Thank you for pointing to this.
  408862 [kaspar.schie] The parslet mailing list has a bunch of friendly people that don't mind
  408863 [lists@ru y- ] I ask, because I see only 2 messages there for 2013.
  408870 [kaspar.schie] ...
  408879 [lists@ru y- ] Ah, that's the problem (gmane). On

Ruby Net::Http GET&POST on RPG Maker
408758 [lists@ru y- ] I'm using RPG Maker VX Ace to make RPG games. It has script database

Sentencias SQL en Ruby
408761 [lists@ru y- ] Hola, como podra hacer las sentencias Guardar, Editar, Eliminar y
408762 [cliff.rosson] Have you tried any of the many sql gems avail? There is a lot out there

[ANN] slideshow (S9) Gem Update - Adds Light-Weight Plugins (e.g. slideshow install analytics)
408763 [gerald.bauer] I've updated the Slide Show (S9) gem [1]. What's new?

[ANN] RubyInstaller 1.8.7-p374
408765 [luislavena@g] **DEPRECATION NOTICE:** As June 2013, Ruby 1.8.7 has been retired and no

[ANN] RubyInstaller 1.9.3-p448 released
408766 [luislavena@g] In combination with the rest of the RubyInstaller team, I'm very

[ANN] RubyInstaller 2.0.0-p247
408767 [luislavena@g] In combination with the rest of the RubyInstaller team, I'm very

TechEmpower's Framework Benchmark
408768 [kiswono@gm i] Ruby is not doing well on TehcEmpower's Framework Benchmark

[ANN] useful_duration 0.0.2
408770 [beholdthepan] Finally - a useful way of measuring time in your applications.

do_postgres compilation failed
408774 [lists@ru y- ] I am having a rough road again and I hope you guys can help me out.

Price lookup from sketchup to csv
408778 [lists@ru y- ] I need to perform a lookup on a CSV file.
+ 408780 [lists@ru y- ] I don't have a Ruby CSV library to play with at the moment, but this
| 408825 [lists@ru y- ] Thanks for the reply its works on ruby 2.0 command prompt.but I need use
+ 408785 [sto.mar@we .] $ cat csvtest.csv
+ 408817 [lists@ru y- ] thank you for the reply. where did you save 'csvtest.csv' file or how do
+ 408827 [lists@ru y- ] It depends what version of Ruby sketchup is using. Have you tried
  408837 [sto.mar@we .] Not sure how that should help,

[ANN] Lita: A multi-service chat bot with extendable behavior
408782 [lists@ru y- ] Greetings all,
408784 [tamouse.list] Very nice use of GH Pages :)

UTF-8 and MySQL
408786 [atma@co va e] I'm having a hard time extracting UTF-8 chars from Ruby in FreeBSD 9.1. =
408791 [atma@co va e] an additional thing that might be worthy noting, if I use =

execute_script - selenium-webdriver
408787 [lists@ru y- ] <div class="ui-dialog-buttonset">
408790 [lists@ru y- ] I think in JavaScript you'd have to use "var element = arguments[0];"
408793 [lists@ru y- ] But still I am getting error as 'element is not visible' error.
408794 [sduncan@we a] Is element a reserved word in Javascript?

A very half-baked idea: setting local variables
408788 [rubyhacker@g] I'm sure this nonexistent feature is not in great demand, but there have
+ 408789 [shortcutter@] At the moment there is no other way I am aware of to introduce local
+ 408792 [lists@ru y- ] Yeah, I agree with Robert, there's no need to dynamically create local
| + 408797 [shortcutter@] That situation frequently occurs when reading data e.g. from CSV files.  If
| + 408822 [joelvanderwe] foo, bar, baz, alpha, beta,
+ 408800 [lists@ru y- ] Once you get to that many local variables I'm sure you could define a
  408810 [rubyhacker@g] I agree with 95% of the comments people made in this thread.

Well-Grounded Rubyist -- Person class implementation in chapter 4 question
408795 [lists@ru y- ] I am new to programming and new to Ruby.
+ 408796 [sduncan@we a] ...
| 408798 [lists@ru y- ] Thank you Sam!
+ 408799 [posobin@gm i] Firstly, the error you are receiving has been explained by Sam. Now, to the

Help me to understand a Ruby file
408801 [lists@ru y- ] Ruby! The professor gave us the files to study but I need your help to
+ 408802 [lists@ru y- ] Looks like a fragment of a simple HTML builder to me.
+ 408803 [lists@ru y- ] I don't understand the last 2 methods.Can u help me?
| 408804 [tamouse.list] Install a ruby, run irb, load the file with these methods, and try them =
+ 408805 [lists@ru y- ] Joel Pearson can u help me?
+ 408806 [lists@ru y- ] If you understand the first two, the last two should give you no
+ 408807 [lists@ru y- ] Thank u!!!
  408809 [sto.mar@we .] A nice tutorial starting from the very basics.

how to compile .so on windows
408808 [lists@ru y- ] Plese help me!

create variables depending on counter
408812 [lists@ru y- ] First of all sorry for my english and I hope you get what I want to say.
+ 408813 [sto.mar@we .] I do not understand completely.
+ 408814 [sto.mar@we .] as I already said, it's not completely clear to me what you want to do.
+ 408823 [lists@ru y- ] Yes as you mentioned it should look like
| + 408826 [wbrisett@at ] ...
| + 408830 [sto.mar@we .] You should use a hash with the headers as keys.
+ 408831 [lists@ru y- ] can u say how I have to use the Hash with the headers. I have tried
| + 408834 [mike@st k. a] One way you can build up an structure which mimics
| + 408836 [sto.mar@we .] That's not a very useful information...
|   408840 [shortcutter@] irb(main):008:0> data.group_by {|s,i| s}
+ 408850 [lists@ru y- ] thanks for your help. Both methods are working very fine :D.
| 408852 [shortcutter@] Why are the elements in the arrays not numbers?  It looks like you rather
| 408864 [lists@ru y- ] It's not only numbers. In some cases there are strings.
| + 408868 [shortcutter@] You can make your life a tad easier by not creating all those one element
| + 408874 [sto.mar@we .] Yes indeed, as mentioned several times in the previous posts, we are
+ 408865 [lists@ru y- ] Well done :D...
+ 408881 [lists@ru y- ] Ok i got it. Thank you so much.
  408888 [shortcutter@] It depends.  Where do you get the data from?  Is it a fixed set of values?
  408890 [lists@ru y- ] ok, give me a try to explain. Lets take a look in the Hash
  + 408892 [shortcutter@] I would prefer to look at the input data and see the larger picture.
  + 408893 [sto.mar@we .] I think the decision "symbol or string" is not what you
threads.html
top