328711-341040

328531-329688 subjects 328908-334684

simple question re: ruby warning message
328711 [tomcloyd@co ] I just set up my first ternary operator expression, and got a warning
+ 328712 [botp@de mo t] # db_type=3D 'n' ? db =3D @nodes_h : db =3D @links_h
| 328716 [botp@de mo t] #=20
+ 328713 [stefano.croc] Ruby thinks you are likely to have written = instead of == in the condition.
| 328715 [tomcloyd@co ] Geee, I wonder why? Good Lord!
+ 328719 [cool.vimalsm] I guess your representation (db_type=3D 'n')
  328774 [rick.denatal] Which, since any ruby object except nil and false is truthy is effectively

PGconn
328720 [ashikali.m@g] Can anyone tell me what are the 3rd and 4th argument of PGconn#connect
328721 [dbw@ab r. c.] pgoptions and pgtty? I'll give them one thing, they're really useful names.
328726 [ashikali.m@g] I had a look on this URL . I think that pgoptions is psql command line
328728 [dbw@ab r. c.] Well I've just had a horrible flash back of getting the PG driver!

WSDL and ruby
328727 [gadys@ya oo ] 1. how do I generate a WSDL file for the service I created ?

Problem with special characters
328734 [amichelins@g] O.S Windows XP sp3
328740 [micathom@gm ] Your input is in latin-1[1] but the windows console probably uses cp850

Replacing values
328739 [ashikali.m@g] Analyse this code
328742 [andrew@an re] Your question is not clear
+ 328751 [ashikali.m@g] my question is not that converting ' to " . Apart from this ,
| 328753 [shortcutter@] No, it does not do the replacement because you used a single quoted string.
+ 328754 [lasitha.rana] If i might venture a guess, i think Ashikali wants the interpolation
  328759 [lasitha.rana] Oops, sorry - please ignore the bit about using a Proc.  It doesn't
  328761 [shortcutter@] Still I would consider an ordinary method or a lambda superior to
  328780 [lasitha.rana] True, thanks for prodding me to think it through again :)
  328842 [shortcutter@] I would prefer an explicit block parameter though - or a method for that
  328849 [lasitha.rana] Certainly, if that is an option for the OP.  I only suggested the

rubyscript2exe with tk and extlib help
328755 [dandrew_mati] I'm having issues running an exe created with rubyscript2exe.

jruby sqlite3 INSERT problem
328760 [kenneth.m.mc] is not resulting in a persistent insert into the database (although it

irb login not reading irbrc file
328763 [philip_mcdon] I am beginning to learn Ruby ( vers. 1.8.6) , and I am using OS X
+ 328764 [perfectly.no] It must be directly in the home directory.
| 328765 [philip_mcdon] The ruby folder IS in the 'home directory'.  But I took it out and
| 328771 [rick.denatal] I think that you might be confusing the current directory with the home
| 328822 [philip_mcdon] Rick,
+ 328766 [shortcutter@] echo 'puts "loaded"' >| ~/.irbrc
  328770 [philip_mcdon] Hey Thanks!  That worked!  And I quit terminal, restarted, and logged
  328779 [ben@bl yt in] For what it's worth, you don't need to quit terminal.  Just close irb
  328781 [philip_mcdon] I''ll keep that 'failing silently' in mind.  BTW, it WAS copy/pasted,

How to do conditional compile for Ruby 1.9 in a C extension?
328775 [jg@ja on ar ] I'm working on updating RedCloth for Ruby 1.9.  Since the output of
+ 328782 [rick.denatal] from version.h in Ruby 1.9
+ 328829 [nobu@ru y- a] The output?  You convert the argument.
  328918 [nobu@ru y- a] Sorry, I misread the parentheses.

Re: How to do conditional compile for Ruby 1.9 in a C extens
328777 [jg@ja on ar ] example is doing the first way for both 1.8 and 1.9.  What's the proper
328787 [jg@ja on ar ] Nice!  I didn't know that, so where I'd seen string comparisons on the
328805 [jg@ja on ar ] It's not working for me.  In my C file I tested the presence of those
328809 [rick.denatal] did you include version.h?
328823 [jg@ja on ar ] version.h couldn't be found.  I've read that version.h is deprecated in
328826 [TimHunter@nc] I'm not saying this is the best way (maybe Nobu can provide a better
328856 [jg@ja on ar ] Sorry, nobu, I didn't follow you.  Try again?
328928 [jg@ja on ar ] I ended up sidestepping the whole issue completely and writing a new
329040 [nobu@ru y- a] Do you have any suggestion for the name?  My candidate is
329062 [jg@ja on ar ] Sounds great to me!  Thanks!

ASCII Menu in Ruby, is it possible?
328789 [ruby.student] Is there a way in Ruby to create primitive ASCII menus?
+ 328790 [jameskilton@] Did you try anything or just jump straight here to ask?
+ 328792 [justincollin] Sure you can.
| 328795 [ruby.student] Dear Jason,
+ 328793 [eleanor@ga e] You can find an example of doing this with the termios library by
| 328794 [ruby.student] Eleanor,
+ 328796 [james@gr yp ] James Edward Gray II
  328818 [gooigpi@gm i] If you are planning to do some data entry checking on Linux platforms
  328869 [ruby.student] I truly appreciate the abundance of suggestions from everyone. I will try

Avoiding code repetition - same code but different hashes
328802 [Aldric Giaco] This is probably a wonderful situation for metaprogramming, aka create
328806 [rick.denatal] Here's a simpler approach than metaprograming

Creating InsensitiveHash in C
328803 [ibc@al ax ne] params = InsensitiveHash.new
328807 [rick.denatal] You won't find it in a runtime installation of Ruby. The file hash.h is in
328810 [ibc@al ax ne] The fact is I already have something as above, but I wonder if using a new

How does one generate a "main page" for rdoc documentation?
328808 [kenneth.m.mc] I tried
+ 328811 [kenneth.m.mc] An additional note: adding a .rb suffix to the filename and command
+ 328814 [rick.denatal] Without any other hint, rdoc only looks at .rb files for input, so although
  328815 [vjoel@pa h. ] I think you're right. Looking at all of my script to generate rdocs, I
  328817 [gooigpi@gm i] +---------------------------------+
  + 328820 [tomcloyd@co ] Igor, this is very nice. Thanks for taking the time to write it up. I'm
  + 328821 [vjoel@pa h. ] That's not the only way to do things. I like a separate README so that
  + 328825 [james.britt@] Without telling rdoc what files to treat as "main", you may be surprised
  | 328833 [micathom@gm ] According to the Pickaxe3, there is a :main: directive that can be
  | 328840 [james.britt@] Thanks.
  | + 328904 [micathom@gm ] Ha ha, I took a look at the code. The directive is actually supported
  | | 328905 [gooigpi@gm i] You must be a rather disorganized computer ... Each project that
  | | + 328932 [james.britt@] @facepalm = true
  | | + 328944 [rick.denatal] Umm, you can include some of this via rdoc markup, e.g. from the rdoc rdoc
  | |   328962 [gooigpi@gm i] Rick than you very much for all the options :)
  | |   + 328963 [micathom@gm ] I think the reason for why Rick included the output of rdoc --help was
  | |   | 328974 [gooigpi@gm i] It is rather ironic and perhaps insulting that you would think the
  | |   + 329009 [rick.denatal] I'm pretty sure that those are there simply through the use of the --diagram
  | |     329018 [gooigpi@gm i] Fantastic, Rick "link:file" does work. I also found it in the
  | + 329469 [drbrain@se m] It is, but it must appear in a Ruby file :(
  + 329467 [drbrain@se m] this is file documentation

Re: Erubis 2.6.4 released - Rails 2.2 and 2.3 support
328812 [robert.worle] You have a nil object when you didn't expect it!
331718 [markdodwell@] I'm also seeing this same issue...
332024 [jdutil21@gm ] Im also receiving this.
334517 [joost@sw .n ] Same issue here..
335633 [dylanstamat@] Same issue here with Rails 2.3.2:  content_tag("h1", content, options,

Ruby RE expression anomaly.
328813 [RichardDummy] I'm trying to use Ruby REs to transform Windows addresses into HTML
+ 328819 [bbxx789_05ss] 1) My tests show that you need 10 backslashes in the substitution to get
| 328827 [botpena@gm i] # backslash.  lol.
| 329011 [RichardDummy] Thanks for your response.  It somehow gets around the problem with my
+ 328881 [shortcutter@] I suggest rewriting this as
+ 329251 [overlord@gm ] Replace these backslashes with slashes. Even Windows accepts this and

[ANN] launchy 0.3.3 Released
328828 [jeremy@hi eg] launchy version 0.3.3 has been released.

[ANN] hitimes 0.4.1 Released
328832 [jeremy@hi eg] gem install hitimes

[ANN] win32-api 1.4.0
328834 [djberg96@gm ] The Win32Utils Team is happy to announce the release of win32-api
328835 [mo_mail@on h] Thanks!  really appreciate your hard work on this.

Generating Microsoft word document using ruby or rails.
328837 [jprabu2010@g] I have some record formatted in table. For that, I need to convert the
328859 [ jupp@gm .d ] The easiest way is to write a CSV and then import it into the target
328861 [shortcutter@] Another easy way I can think of is this: create a document with the

Zed again
328844 [shortcutter@] robert
328851 [robert.dober] Robert did you post this to the wrong group, or is it just me being
328852 [shevegen@li ] Zed is a mammoth!!!
328853 [rimantas@gm ] Who is Zed?
328855 [shortcutter@] LOL
328857 [robert.dober] Ah I see now, also I shaw not before.
328858 [robert.dober] There are some people who begin the Zoo at the beginning, called

load a path (not a file)
328845 [elioncho@gm ] I need to load a path not a file. I am trying this but it is not working
328846 [stefano.croc] What do you mean by "load a path"? A path isn't a ruby file, so you can't load
328847 [tietew@ti te] [Re: load a path (not a file)]
328848 [elioncho@gm ] Thanks guys,

Ignoring Exceptions
328860 [mailbox.lwj@] i am using hpricot to parse xml and place it into an object named 'x'
+ 328862 [larsch@be un] Make a function that does the work for you?
+ 328863 [lasitha.rana] I don't think there's way to rescue an exception, ignore it and then

Jruby yaml load issue with floats?
328864 [pradeep.gatr] Try this with both MRI and Jruby 1.1.6 (with active support 2.2.2)
328888 [charles.nutt] This should be fixed on trunk/1.2. Can you test out a nightly build?
328907 [pradeep.gatr] Charles,
328917 [charles.nutt] Ahh, so it is. It's something specific to running with ActiveSupport
328957 [pradeep.gatr] Thanks Charles :)

module include class/instance methods confusion!!
328865 [adam@co eg r] I have been having trouble today with a module include in a Rails app.
328868 [dblack@ru yp] If you have a spare six months, you can look through the previous
328872 [transfire@gm] I think that's a fallacious argument.

Net::POP3
328866 [poornima_dgl] I am troubling wit fetching my .xls attachments from my mail.i did

RSA cross platform
328867 [ashikali.m@g] I am using Debian OS and ruby 1.8 version .
341038 [ashikali.m@g] I have wrongly used the key .
341039 [ashikali.m@g] Yeah, It is working fine
341040 [ashikali.m@g] Now RSA is possible in cross platform .

"permission denied"
328870 [pbailey@bn .] I'm frustrated with one of my Ruby scripts. It's an image processing
+ 328874 [jg@sa do r. ] This may sound silly, but do you really have write permissions to
| 328876 [pbailey@bn .] Thanks for your reply. Yes, I do have permission. I'm a full
+ 328875 [larsch@be un] Are you running on Windows and using a virus scanner? We've seen very
| 328877 [pbailey@bn .] Thanks for your replay. Yes, unfortunately, our IT staff uses Norton
+ 328879 [hassan.schro] Why "obviously"? Can't you just rescue that exception, log the error,
| 328890 [pbailey@bn .] Well, I've already spent a week or so putting in exception handling for
+ 328919 [gooigpi@gm i] Why not implementing something like the following to salvage your
| 328922 [pbailey@bn .] Guess what? That's exactly what I did. Thanks a lot for your suggestion.
+ 329004 [rogerpack200] that usually means that some process still has the file open.  You could
  329033 [pbailey@bn .] Thanks, Roger. I'll google around to see what "unlocker" is. Never heard

Re: Problem with special characters
328871 [jdmuys@kl eg] I am facing a similar issue on Mac OS X where the TextMate console can only

showing a picture
328878 [siggesg@ho m] Can anyone tell me the code for showing a picture in the "my pictures"
+ 328880 [pjb@in or at] Gandalf! Where are you when we need you?
| + 328886 [siggesg@ho m] I meant in a ruby program!!!!!
| | + 328901 [philip_mcdon] ...
| | + 328903 [phlip2005@gm] Pascal is being an anus. The group apologizes for him.
| + 328906 [jeff@sc wa c] Speak friend, and enter.
|   328909 [shevegen@li ] No, go away. We dont want any Gandalf here.
+ 328897 [Aldric Giaco] Take a look at fxruby - www.fxruby.org . The tutorial will help you.
+ 328920 [w3gat@nw ag ] For someone recently into programming, the internet does indeed supply
+ 328945 [justincollin] RMagick is probably a good place to start for displaying messages.
  328946 [TimHunter@nc] Thanks for the recommendation, Justin, but while RMagick can do many
  328950 [_mwryder@wo ] system("start /wait " + my_image)
  328960 [cool.vimalsm] So far i've seen this group as very helpful and energetic than any

Chicken Recipes - The Web's Largest Chicken Recipes Collection
328882 [dartioposit@] ___________________________________________________________________
328883 [charles.john] Sure you do.
328884 [dbw@ab r. c.] What about the veggie Rubists?=20
328885 [jeff@sc wa c] Eggs are clearly Python-specific.  You find me a chicken that lays gems,

Un-escaping hexadecimal code
328887 [ibc@al ax ne] %61lice => alice   ( %61 == a )
328891 [jeff@sc wa c] s.gsub! /%(\d+)/ do |match|
+ 328894 [ibc@al ax ne] s.gsub! /%(\d\d)/ do |match|
+ 328895 [ibc@al ax ne] Also, it should consider not just number but A-F
  + 328899 [jeff@sc wa c] Right you are.
  + 328912 [gooigpi@gm i] s = "%4Flice"
    328915 [jeff@sc wa c] (irb):2: syntax error, unexpected '{', expecting $end
    328924 [gooigpi@gm i] Sorry, in Ruby 1.9 this is no longer a Syntax Error

Re: Un-escaping hexadecimal code [SOLVED using CGI]
328889 [ibc@al ax ne] require 'cgi'

difference between {} and do/end
328892 [jeff@sc wa c] I'm coming back to Ruby after a couple years away, and finding I've
+ 328896 [doodpants@ma] It has to do with operator precedence. {...} has high precedence,
| 328900 [jeff@sc wa c] Thank you!
+ 328940 [ninja@sl ph ] Another difference is that {} can be confused with a hash literal. I
  328941 [vjoel@pa h. ] Isn't

array
328893 [vetrivel.bks] In array I have content like this
328910 [lasitha.rana] While the ruby to do that is trivial, i feel its more important that i

[QUIZ] Game of Life (#193)
328898 [yahivin@gm i] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 329104 [jgabrielygal] Thanks for this very interesting quiz. I have to admit that I already
| 329169 [james@gr yp ] ...
+ 329160 [sangamon@ne ] Nice. :) I have given it a quick'n'dirty try and hope to get some hints
+ 329349 [andrea.fazzi] here below there is my solution.
+ 329876 [yahivin@gm i] It's about time I solve one of my own quizzes! My solutions only goal

what Ruby version to use on Windows for a 1.2.x RoR app?
328902 [neongrau@gm ] this might sound like a rant, but i'm just desperate :(
328947 [rogerpack200] There almost is :)
+ 328948 [rogerpack200] jruby is also stable there.  Note that the 1.9.1p0 binaries compiled
+ 329156 [neongrau@gm ] thanks alot for pointing that out!
  329172 [rogerpack200] Also I...think 1.8.7 works with rails 1.2.x
  329275 [neongrau@gm ] that sounds pretty interesting, it's just that i tried 1.8.7 2 weeks ago
  329530 [rogerpack200] There's a branch that has 1.8.6 with the patches.  I believe it's stable
  329592 [neongrau@gm ] cool, guess i have to get git after all. (i'm still a SVN user)
  329685 [rogerpack200] Thanksfully with the oneclick mingw installer you download it and run
  329801 [neongrau@gm ] git clone git://github.com/oneclick/rubyinstaller.git
  329821 [rogerpack200] yeah the main git repo has some bugs currently.
  + 329823 [neongrau@gm ] ok, cool
  + 329828 [neongrau@gm ] yay! rake just finished :)
    329835 [rogerpack200] Wow way to go.  I started mine building yesterday and the internet is so
    329836 [neongrau@gm ] ruby 1.8.6 (2009-2-26 mbari 8A/0x8770 on patchlevel 287) [i386-mingw32]
    + 329839 [rogerpack200] Yeah I'd probably download their .zip install file then ruby "ruby
    + 329923 [rogerpack200] Mine finally finished building :)
      330075 [neongrau@gm ] hey!
      330088 [rogerpack200] k fixed those and uploaded a copy that has the devkit with it :)
      330090 [rogerpack200] Also note that I "nuked and rebuilt" my github/rubyinstaller
threads.html
top