385626-387494

385415-385935 subjects 385850-400221

Issue downloading an image from a URL (HTTP request)
385626 [mcmillhj@gm ] I am trying to download the image of a chart I created using the
385654 [jgabrielygal] I don't know why one of your attempts works and the other won't, maybe
385655 [jgabrielygal] 8720821661998,25.6022408963585,24.9859943977591,17.9831932773109,2.80112044=

Questions on routing
385627 [tyrelrichey@] I have two questions on routing if any one has some space time.
+ 385628 [cmdjackryan@] One forum over you'll find the Rails guys. You'll find better (and
+ 385636 [steve@st ve ] Don't use :name, use :as.

Are Job Ads OK?
385629 [lee@hu he ys] Is it OK to post Ruby job ads on this forum?
+ 385631 [sophrinix@gm] As long as they are real jobs and for ruby/ using tools in ruby, I am
| 385632 [stu@ru yp og] There really should be a separate sub-forum called ruby-jobs.
| 385633 [marco-oweber] The funny thing is that exactly the same discussion happened 2 days ago
+ 385635 [mcpierce@gm ] -1
  385661 [shortcutter@] usually are locally restricted.
  385662 [richard.conr] I have found that many local/national Ruby User Groups are fine, and even
  385663 [josh.cheek@g] On the other hand, someone like me more than happy to move. The last thing I
  385664 [ml@co va es ] I'd say consider elance.com for job posting. It's way better than this mailing list.

Where to post Ruby job ads?
385630 [lee@hu he ys] Looking for advice on where to post (for free) Ruby job ads, besides
385637 [josh.cheek@g] There's a LinkedIn group for Rails with lots of ads. IDK about Ruby w/o
385638 [josh.cheek@g] Honestly, I don't think there is a job board for Ruby without Rails. Even

attr_accessor for hash keys
385639 [code@ap th o] Is there a way to use attr_accessor, or something like it (without
+ 385641 [sean.ohalpin] module HashAccessor
| 385644 [tim.pease@gm] don't
| 385666 [b.candler@po] In which case, you might as well just use OpenStruct.
| 385669 [ajmahout@gm ] im new to this. i was wondering if the tutorial in try ruby is usefull
+ 385660 [shortcutter@] irb(main):001:0> Foo = Struct.new :one, :two
+ 385665 [josh.cheek@g] require 'forwardable'
+ 385670 [code@ap th o] Judging by the responses, the answer is basically "no".  I appreciate the

[ANN] isolate 3.1.1 Released
385642 [ryand-ruby@z] isolate version 3.1.1 has been released!

create object by reflection
385650 [leandro.rhcp] My doubt is how create objects by reflection, when they need more than
+ 385652 [bbxx789_05ss] class Person
+ 385656 [b.candler@po] def build(instance,clazz,args)
| 385657 [bbxx789_05ss] `initialize': wrong number of arguments (3 for 2) (ArgumentError)
| 385667 [b.candler@po] Show your exact code. I would guess that you are passing an array of 3
+ 385672 [leandro.rhcp] Cool, thanks you all! =D
+ 385684 [leandro.rhcp] It's not working. Suppose I have the builder and RSpec and I tried to
+ 385691 [leandro.rhcp] I solved, stupid typo.

[ANN] myrrha 1.0.0 Released
385671 [blambeau@gm ] myrrha version 1.0.0 has been released!

builder lib-a-like?
385676 [transfire@gm] Wasn't there already a lib like this?
385677 [jgabrielygal] It reminded me of Tagz by Ara Howard, although I haven't used it.
385679 [transfire@gm] On Jul 22, 1:47=A0pm, Jes=FAs Gabriel y Gal=E1n <jgabrielyga...@gmail.com>
385687 [steve@st ve ] This one appeared recently, too: http://krainboltgreene.github.com/dapper-dan/

regex oddity
385680 [rogerpack200] Anybody know why this occurs?
+ 385682 [zettabyte@gm] #scan first matches "a" (whole string), then tries to match on remainder
| 385689 [josh.cheek@g] "a".scan(/.*/) # => ["a", ""]
+ 385717 [shortcutter@] Yes.  Scanning will start at pos 0 of the string and match as long as

Regexp inconsistency
385681 [camargo.cr@g] I observed a inconsistent behavior between ruby (ruby 1.8.6 (2009-06-08
+ 385685 [zettabyte@gm] I just matched "net-snmpd.log-20110629.bz2 stuff blah blah" against that
+ 385686 [luizluca@gm ] Ruby is right. The regexp matches the string.
+ 385692 [camargo.cr@g] Sorry, it was my mistake! I've changed regex putting ^ and $; now, it

open localhost url
385683 [sharnelp@gm ] When I call call the below code I get a timeout.
+ 385693 [sharnelp@gm ] app/controllers/documents/test_controller.rb:123:in `index'
+ 385694 [sharnelp@gm ] app/controllers/secure/documents/irisfli20_controller.rb:123:in
+ 385695 [b.candler@po] Please realise that Ruby and Rails are not the same thing. This is a
+ 385696 [hassan.schro] Not using Webrick  -- that's a single-threaded server, so it can't
| 385699 [drbrain@se m] WEBrick is not a single-threaded server.  It can be configured as a =
| 385700 [hassan.schro] Wouldn't be the first time I was wrong  :-)
| 385710 [b.candler@po] It is - not because of an inherent limitation of webrick, but because
| 385716 [hassan.schro] Ah, right, I'd forgotten all about that. Thanks for the correction!
+ 385697 [drbrain@se m] nil)

What's up with "Dir.glob"?
385688 [pbailey@bn .] I'm having a hard time understanding why a simple Dir.glob sequence
+ 385690 [brabuhr@gm i] $ mkdir /tmp/z
+ 385698 [ryand-ruby@z] This doesn't address your issue, but I thought I'd point out that you =
| 385843 [pbailey@bn .] Thanks. Well, that's a good point. Although, all of the incoming names
+ 385844 [hanmac@gm .d] hm the doc says that File::FNM_CASEFOLD is ignored but on my system it

using "puts" in ternary operator
385701 [jesse.breuer] I find that I get errors if I use "puts" in it's standard form in a
+ 385704 [hassan.schro] I think the lack of parens creates an ambiguous scope for the
+ 385705 [botpena@gm i] imho,
+ 385731 [killavus@gm ] (exp)? <if true> : <if false>
+ 385768 [ryand-ruby@z] puts x == 2 ? "two" : "one"

using net-ssh with interactive program
385702 [bellcolt@ho ] can anybody points me to  examples of using net-ssh with an interactive
385703 [ryand-ruby@z] look at IO#expect

Time and UTC problems
385706 [rubyforum@we] I have a time that is read in to the Time class. The time is UTC but
385707 [bbxx789_05ss] t = Time.now
385708 [johnf@bi sb ] This is the shortest way I've ever seen to solve this problem. Well done, sir.

[ANN] ZenTest 4.6.0 Released
385709 [ryand-ruby@z] ZenTest version 4.6.0 has been released!

Re: Is there any open source game in Ruby?
385711 [jrmair@gm il] why are you only looking at rubygame? rubygame has been dead for a long
385755 [axyd80@gm il] One more interesting (and active!) project, see screenshots on their

[ANN] alf 0.9.3 Released
385712 [blambeau@gm ] I'm pleased to announce that alf 0.9.3 has been released and pushed to

code ok in ruby, but fails in irb
385713 [at.ruby-foru] The following statement, with the newline, is ok with ruby but generates
+ 385714 [bbxx789_05ss] Nope.  And that's why I never use irb (nor similar toys in other
+ 385715 [josh.cheek@g] Works for me on 1.9, but not on 1.8
  385718 [b.candler@po] ... apart from the train wreck of Encodings (IMO - just giving a

Top level function definition gets in Kernel module?
385719 [jp.billaud@g] irb(main):001:0> def test_fun
+ 385720 [adgar@ca bo ] returns the names of all the methods on the Kernel object itself. =
+ 385721 [bbxx789_05ss] Almost everything in ruby is an object.  All objects inherit from
+ 385722 [bbxx789_05ss] Aargh.
| 385723 [adgar@ca bo ] The top-level scope creates private methods by default.
| 385724 [bbxx789_05ss] I know that.
| 385726 [adgar@ca bo ] ...
+ 385725 [jp.billaud@g] Thanks everyone for the explanation, I just got confused and forgot that

Bundler? or RVM issue? can you help?
385728 [codehacker@c] you can see that the trace jumps from the rvm ruby into the system ruby.
385801 [wayneeseguin] There is not enough information provided in your gist to give an answer.

[ANN] Launchy 2.0.4 released
385729 [jeremy@hi eg] launchy version 2.0.4

best style for setting items in a collection
385730 [info@ma sh l] I've only recently started learning Ruby and notice in Thomas'
+ 385732 [steve@st ve ] Upto isn't bad, but id probably use inject: [1,2,3].inject ([]) {|arr, elem|
+ 385734 [list.push@gm] Does this #each give you what you want?
+ 385735 [drbrain@se m] the
+ 385747 [josh.cheek@g] It's hard to know how to answer this because you're overwriting the values
| 385757 [info@ma sh l] Ok, sorry that my example muddled things so much. I did mean the latter.
| 385765 [drbrain@se m] month_lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
+ 385766 [list.push@gm] If you make a new array you could try something like this.
  385767 [info@ma sh l] Tx for all the nice ideas! I agree that with an array this size speed

[Ruby/C++] Say hello to Rarity, C++ wrapper for the libruby !
385736 [sexymimi64@g] Greetings everypony !

Exclusive operator in ruby
385737 [aef1370@gm i] I am C++ programmer and I start ruby programming about 1 month.I have 2
+ 385742 [vderyagin@gm] 'Object#===' method is the same as 'Object#==', but is often overridden
| 385746 [sutniuq@gm .] - ------------------------------------------------------
| 385753 [vderyagin@gm] Yes, you are right, there is no such operator. My mistake.
+ 385754 [adam@ap es o] You can if you're using 1.9. This isn't keyword arguments.
  385761 [shortcutter@] Nice!

[ANN] nanoc 3.2, a DRY static web site generator
385738 [denis.defrey] After a long wait, nanoc 3.2 has been released. Major new points in this
385796 [jon.forums@g] Just installed on Win7 running `ruby 1.9.4dev (2011-07-22 trunk 32630)
385825 [denis.defrey] The documentation for the various filters can be found in the API

Run something on last test case
385740 [tcblues@gm i] I need to run some code always on the last testcase that is run in any
+ 385748 [josh.cheek@g] If this isn't what you're trying to do, then you need to take some time to
| + 385749 [josh.cheek@g] This should be `def test_last` since TestUnit expects the names of test
| + 385787 [tcblues@gm i] this is exactly what I was looking for.
+ 385764 [drbrain@se m] Why do you need to run something after the last test case?
  385792 [code@ap th o] Maybe one would want to collect some kind of aggregate data while testing

why doesn't return ascii code?
385741 [aef1370@gm i] when I type " puts ?a " irb doesn't return ASCII code of a
+ 385743 [bbxx789_05ss] $ multiruby ruby.rb
+ 385744 [aef1370@gm i] Excuse me, I don't understand what do you mean . please explain very
| 385762 [stu@ru yp og] 'a'.ord
+ 385745 [bbxx789_05ss] Things change.

Help with Regex
385750 [g.marcilhacy] I need help with a Regular Expression, I need to split the text on "- "
+ 385751 [cmdjackryan@] =3D> ["I want this", "not that."]
| 385758 [code@ap th o] =2E . . and if you want to split it into only two elements even if there
+ 385759 [code@ap th o] I don't know what code you're actually using with this regex.  As already
+ 385779 [ruby@sl gh l] Try the non-greedy version, /(.*?) -/i
+ 385784 [list.push@gm] str = "part 1 - part 2 - part 3"

[ANN] flickr_airlift 0.2.0 released
385752 [beholdthepan] Once a user authenticates - cache his credentials in ~/.flickr_airliftrc

[ANN] Stickler 2.1.3 is released
385756 [jeremy@hi eg] stickler version 2.1.3

Please give simple example of when to use symbols
385771 [sbstn26@ya o] I'm still a bit confused on whether to use strings or symbols in certain
+ 385772 [bbxx789_05ss] Quotes are a shortcut for writing String.new--but not exactly.  In other
| + 385774 [adam@ap es o] This is really unhelpful. It is certainly possible to understand symbols
| + 385775 [shortcutter@] Why so grumpy?  I can but support what Adam said.  Symbols are useful
| + 385776 [josh.cheek@g] I think when people say they take up more memory, they mean that symbols
+ 385781 [johnf@bi sb ] If the exact sequence of characters is what's important, use a String.
+ 385783 [kd.gunderman] - use a String when handling external data, e.g.
+ 385804 [bbxx789_05ss] lol.
+ 385809 [jeremy@bo p.] The difference is that every string literal in your code, whether it is

Very Very simple problem
385777 [aef1370@gm i] I have a string like "12345678". I want to remove first character.
+ 385778 [cmdjackryan@] See if the documentation for String[0] lists a method to slice Strings.
+ 385780 [mayank.kohal] Have a look at String's slice method..
| 385789 [josh.cheek@g] Sometimes you know it is a simple problem for people familiar with the
| 385794 [Carey.Nation] +1 for s[1..-1]
+ 385788 [w3gat@nw ag ] a = "012345678"
+ 385799 [stu@ru yp og] A string is actually considered an abstract data type. Essentially
+ 385800 [b.candler@po] irb(main):001:0> s="12345678"
+ 385805 [ninja@sl ph ] Since no one else has mentioned it, I thought I'd suggest a method I've found
+ 385808 [josh.cheek@g] I usually use slice!

Fwd: Trouble adding and committing files to git.
385782 [jen.bottom@g] ...

[ANN] sqlite3 1.3.4 Released
385790 [luislavena@g] sqlite3 version 1.3.4 has been released!

Issue installing a gem from local disk. zlib error message received
385795 [ruby.student] I have a server which is not allowed on the web and where I want to install
+ 385797 [josh.cheek@g] If you're using RVM, there is a section about zlib
| 385798 [ruby.student] No, I am not using rvm.
+ 385803 [luislavena@g] RubyGems requires zlib to install a gem.

[ANN] Rails 3.1.0.rc5
385806 [aaron@te de ] I've pushed a new Rails release candidate (3.1.0.rc5).  We've fixed many

[ANN] rubygems-update 1.8.6 Released
385807 [drbrain@se m] rubygems-update version 1.8.6 has been released!

Why aren't string literals treated similarly to symbols?
385810 [jeremy@bo p.] Explaining the difference between symbols and strings got me wondering
+ 385811 [matz@ru y- a] It's because Ruby strings are mutable, just like array expression
| 385818 [jeremy@bo p.] Thank you for your response, matz. :-)
+ 385813 [shortcutter@] Actually this is what happens with COW underneath.  Still you get
  + 385820 [whitequark@w] Just wanted to mention that RXR is a bit more convenient to lookup
  + 385821 [jeremy@bo p.] Thanks for your response, Robert.
    385822 [shortcutter@] It's probably not worth the effort because for a short script you won't

English!
385812 [sbstn26@ya o] I had no idea Yukihiro Matsumoto is fluent in English!!!
+ 385824 [matt@te hn r] It's not what I know that counts.
+ 385828 [ml@co va es ] You can't be seriousí─ :-)

Ruby to C transpiler
385814 [transfire@gm] Are there any?
+ 385815 [hanmac@gm .d] my dictionary does not know the word "transpile"
| 385816 [shortcutter@] I wondered as well.  To me it sounds like "read a Ruby program and
+ 385817 [hanmac@gm .d] translating an ruby program into an c program is not as simple possible
| 385819 [shortcutter@] Performance gains would probably be marginal - unless all the dynamic
| + 385823 [peterhickman] Hmm
| | 385829 [shortcutter@] Well, both Pascal and C are Turing complete - so conversion in either
| + 385830 [ryand-ruby@z] possible
+ 385826 [luislavena@g] Never tried the later.
+ 385827 [ryand-ruby@z] ...

How do I pass a variable to the Chroinc library function?
385831 [tpensel@po o] require 'chronic'
385832 [echristopher] This sends it the exact string 'next inputday', when what you want to
385838 [tpensel@po o] Thanks, Eric

Difference between Ruby Versions
385833 [dataoverflow] Can you tell me please what's the difference between ruby versions..
385834 [steve@st ve ] They're different.
+ 385836 [bbxx789_05ss] Like Coke classic.  If you are a ruby beginner, this is where you start.
| 387494 [headius@he d] I hope this was a joke. :)
+ 385842 [shortcutter@] We should probably make the distinction clear between the Ruby

[ANN] LSRC V: Don't Miss Out On...
385835 [jimfreeze@gm] Lone Star Ruby Conference V, August 11-13 in Austin, TX,

read excel file
385837 [dickyhide@gm] How to read the excel file(.xls)
385839 [rubfor@re it] Use win32ole. Easier than falling off a log.
385841 [mhatakeyama@] parseexcel was merged in spreadsheet some years ago.
+ 385862 [barnes7td@gm] Win32ole is easy to use. The website that Mike linked to is a great
+ 385875 [sophrinix@gm] This. just use it. it works & is dead simple.

strange fault using net ssh
385840 [mr.mikaelsso] I am trying to use net ssh and it works well when I do it on a linux
385907 [mr.mikaelsso] From what little I understand it is this line that shows where it goes

installing qrtools gem
385845 [ruzvay@gm il] I am trying to build an application to decode and encode qr code.

Counting lines of code in a ruby code file while ignoring method code lines
385846 [htruax@st .c] I am writing a Ruby program that reads a ruby code file and counts the

String manuplation example
385847 [kotin76@ya o] I am new to ruby.
+ 385848 [hanmac@gm .d] string.match(/[\/\w]+/)[0]#=> "/dev/sda4"
+ 385849 [chirag.sweng] You have static value '/dev/sda4'? then you can do the following
| 385851 [kotin76@ya o] Thanks for your quick reply.
| + 385853 [chirag.sweng] Then you can go with only regular expression given by Hans
| + 385854 [josh.cheek@g] It's not really clear to me what "extract" means. Are you interested in
|   385855 [kotin76@ya o] Thanks for your quick reply's.
|   385856 [josh.cheek@g] Here, I put your strings into rubular http://rubular.com/r/dbuEen46gb
|   385857 [kotin76@ya o] i did not get the how i get logic for my requirement from rubular.
|   385858 [josh.cheek@g] You will need to write a regular expression to match the data in your
+ 385852 [hanmac@gm .d] if you use match(/[\/\w]+/)[0]
+ 385859 [hanmac@gm .d] hm use /\/dev\/[\w]+/ then the position is not the problem
  + 385863 [Rob@Ag le on] And if you don't want to keep escaping the /'s because you're matching
  + 385864 [kotin76@ya o] Posted via http://www.ruby-forum.com/.
    385920 [shortcutter@] I think nobody suggested String#[] so far.  You can do
threads.html
top