370948-371996

370750-372384 subjects 371117-375751

Newbe - how to add onClick to select option?
370948 [ZalekBloom@h] I am just learning Ruby.
370949 [ryand-ruby@z] Please ask these questions on the ruby on rails mailing list/forum. Thanks.

Pass by reference and copy on write
370952 [ralphs@do 32] ...
+ 370953 [fxn@ha hr f.] A very noisy thread.
+ 370955 [josh.cheek@g] It kind of depends what you're looking for here. As you've shown it, what
  + 370956 [fxn@ha hr f.] ...
  | + 370966 [ralphs@do 32] ...
  | + 370971 [josh.cheek@g] But that is how Ruby does it. I've been playing with it, and think that
  |   + 370978 [rick.denatal] I've always referred to the way languages like Smalltalk, Ruby, and
  |   + 370994 [b.candler@po] I think the difference is whether you are passing a reference to the
  |     + 371002 [fxn@ha hr f.] We can't just let our imagination go and build our own mental model of
  |     + 371008 [ralphs@do 32] ...
  |       371044 [b.candler@po] A bit of code will speak louder than words.
  |       371046 [b.candler@po] And I should add, this is a feature to be used highly sparingly -
  + 370958 [vikkous@gm i] Rather than inventing a new class to do pass-by-reference, I'd
  | + 370959 [fxn@ha hr f.] I disagree (see my post), pass-by-reference means pass-by-aliasing.
  | + 370960 [josh.cheek@g] Interestingly, that would bring it very much in line with the C example,
  |   370961 [vikkous@gm i] Right. I'm just a C hacker at heart.
  |   370963 [josh.cheek@g] How about in this case?
  |   370990 [vikkous@gm i] I would say that passing a fixnum does indeed make a new 'copy' of it,
  |   + 371003 [shortcutter@] While this is technically true (because the reference actually *is* the
  |   | 371073 [vikkous@gm i] The problem I have with this viewpoint is that you are then stuck with
  |   | + 371077 [shortcutter@] Initially you wouldn't notice because transition from Fixnum to Bignum
  |   | + 371266 [rick.denatal] But singleton (or immediate) vs non immediate isn't really the issue here.
  |   + 371014 [rick.denatal] I thing that the value of thinking of this as call by object
  + 370965 [ralphs@do 32] ...

ODBC app in Ruby - I don't believe it.
370964 [joebananas10] I'm trying to figure out what's so cool about Ruby. I need to create a
+ 370968 [markus@fi ch] not much we can do here, since you didn't include any kind of error
+ 370969 [justincollin] Sorry for your frustration. However, you seem to be conflating Ruby (the
+ 370972 [b.candler@po] You don't need Rails to talk to a database, nor to build a web app
+ 370975 [rubfor@re it] Access DB. It took under 5 minutes to build. You could hardly go any
+ 370977 [michael.broo] DBI appears to be a popular way to access to ODBC in Ruby.  DBI provides a
+ 370982 [luislavena@g] Rails 3 (latest release of it) requires either Ruby 1.8.7 or Ruby
| 370996 [joebananas10] WOW! Thanks for all the responses and please accept my apologies for
| 371079 [joebananas10] Okay I've decided to start from scratch,... again. It's the start of a
| 371082 [jeremy@bo p.] gem install dbi
| 371087 [joebananas10] My mistake on the gem commands. I did use the correct ones with dbd
| 371102 [jeremy@bo p.] It's good you made it a little further but too bad your client got sold
| 371195 [joebananas10] The history.txt file for the mysql gem says
| + 371197 [luislavena@g] There has been no updates to mysql "gem" because the extension author
| + 371209 [groups.2009a] is=20
|   + 371248 [reachme@ch r] Rails originally started out as being (very) opinionated (not so much
|   + 371275 [joebananas10] Thanks for the extensive reply Dave. I certainly appreciate it.
|   | 371330 [b.candler@po] That, to me, is the *benefit* of going with the Rails opinionated
|   | 371455 [joebananas10] Come on, you know that wasn't my point. Name me five of the top DBs that
|   | + 371457 [cmdjackryan@] Postgres, Oracle, DB2, MySQL, Informix, SAP ERP.
|   | | 371467 [joebananas10] There's no need to be a smart ass, you knew exactly what I was talking
|   | | 371490 [cmdjackryan@] [snip list o'vendors]
|   | | + 371496 [reachme@ch r] It would be interesting to know how Python fares with these
|   | | + 371513 [stuart@st ar] talking
|   | |   371520 [david@ha kb ] I was going to suggest to the Windows 7 Developer, that using a virtual box
|   | |   371521 [cmdjackryan@] Since the client wants a Rails app running on Windows, that won't quite work. ;)
|   | |   371573 [matt@ha ps a] One thing I've not seen anyone mention as yet is using jruby for the ruby
|   | |   371574 [cremes.devli] I use JRuby almost exclusively under Windows. One of the great benefits is that it supports 64-bit runtimes whereas MRI does not yet have a 64-bit runtime for Windows.
|   | + 371460 [jeremy@bo p.] The development tools provided by the DB vendors *do* work on the
|   |   371468 [joebananas10] It's useless to argue about semantics on this issue in a forum like
|   |   371469 [jeremy@bo p.] I'm seriously not trying to pick a fight.  Honest.  I'm really curious
|   |   371483 [reachme@ch r] Yeah, Ed does have a point in that creating a web app that runs on
|   + 371413 [ninja@sl ph ] What limitations? I'm curious.
|     371690 [groups.2009a] &/or
|     371765 [ninja@sl ph ] Except Haml has looping constructs. There's also a pretty neat idiom where you
|     371772 [groups.2009a] and
|     371891 [ninja@sl ph ] To be honest, that sounds even worse. I push most of the logic back into the
|     371933 [groups.2009a] has a=20
|     + 371934 [fxn@ha hr f.] Reading source code is good. But in order to use something you
|     | 371958 [josh.cheek@g] Though, if you're new to web development, then your background and knowledge
|     + 371970 [ninja@sl ph ] Because in a way, it's admitting that the documentation isn't sufficient, a=
|       + 371992 [groups.2009a] stuff
|       | 371996 [cmdjackryan@] My apologies if quoting is mangled, there's only so much I can do
|       + 371995 [groups.2009a] The other paradigm that I've tripped over is that I want my models to =
+ 371415 [pmckibbin@gm] Have you installed the mysql client software? The gem only provides bindings
| 371454 [joebananas10] I did include the errors in an earlier reply and as I also mentioned
+ 371492 [namekuseijin] ah, nothing like a good warm cup of RTFM up in the morning, huh?
+ 371519 [brabuhr@gm i] ...
+ 371696 [eblumenfeld@] Did you try IronRuby?

Rdoc
370976 [thomasdabuck] I'm trying to write a simple program that when given a a few paragraphs
370980 [dg1ees@op at] Sure can, it's a common exercise ;)

How to imitate a browser?
370979 [dre.share@gm] Hey guys,
+ 370981 [jgabrielygal] It manages cookies and allows you to fill forms, click links and so on.
+ 371005 [adrfer@ya oo] ...
+ 371076 [rogerpack200] especially)

Object.object.method()
370984 [teisto@su fy] statement means?
+ 370986 [rick.denatal] I assume you are talking about that last line.
| 371047 [b.candler@po] tmp = area.window
+ 371045 [jeanjulien.f] To complete Rick's answer, the "window" in the last line has
  371060 [rick.denatal] Alors! GTK ne parle pas fran=E7ais? <G>
  371080 [jeanjulien.f] What a shame, isn't it ? ;o)

sport shoes : Jordan ,Nike, adidas, Puma, Gucci, LV, UGG , etc. including women shoes and kids shoes.
370985 [hwwt135@gm i] have some cheap things ...

[ann] Los Angeles Ruby Conference 2011
370988 [cobyr@in er ] The Los Angeles Ruby Conference 2011 will be held February 3rd-5th,

install ruby on the mac
370991 [basi.lambano] total mac newby here. i'm traying to install ruby via rvm but i'm not
+ 370992 [cremes.devli] You are missing the "git" command which is required for checking out the latest version of rvm. You may want to look at macports.org which lets you easily install UNIX tools like git using the "port" command. After installing macports, install git and try the rvm installation again.
+ 370993 [luislavena@g] How you installed git? It is available in the PATH? (which git)
| 371009 [basi.lambano] Thanks for the reply. So I'm downloading Xcode ... but for some
| + 371011 [rubydevelope] If youre using snow leopard all you need is Xcode. Rubygems is already installed so if you want version 1.8.7 just issue the following command
| | 371012 [basi.lambano] Steve,
| + 371028 [cremes.devli] If you still have the install disks for your computer, Xcode is on disk 2. Install from there and then run software update.
+ 371015 [ryand-ruby@z] You already have ruby. If all you want to do is learn ruby, then do =
  371018 [basi.lambano] Hey, thanks. Yes, indeed, Ruby is installed, rubygems is installed.
  371019 [rubydevelope] sudo gem update --system
  + 371021 [ben@bl yt in] What does gem update ruby do? I've never seen that before.
  + 371025 [ryand-ruby@z] there is no 'ruby' gem. That doesn't do anything that you're suggesting =
    + 371041 [basi.lambano] Thanks all, guys. With all this help, I feel very much welcome. I'm
    + 371048 [rubydevelope] You're right, I messed up. Sometimes writing from the iPhone is not good. Sorry for the confusion.

Puts to stream?
370997 [spare@fr gi ] puts "hi"
+ 371000 [sutniuq@gm .] Maybe use a StringIO?
| 371001 [sutniuq@gm .] Sorry, this was meant to be
+ 371004 [Rob@Ag le on] In addition to Quintus, here's a bit more depending on how far you're

any good tools for reading networking data with optional TLV
371006 [ramana.golla] I am trying to write code that reads data off a socket and processes
371037 [dion@lo tr a] I am the author of BinData.  Yes BinData handles optional TLVs
371116 [ramana.golla] Dion,

Ruby and CoCreateInstance
371007 [thomas@th mt] I am writing plugins for Google SketchUp using their Ruby API. One of
371016 [ryand-ruby@z] Bad idea unless your plugin is supposed to run on only windoze (which =
371036 [thomas@th mt] It hasn't. And we have petitioned this for years - literally.

rspec-1.3.1.rc and rspec-rails-1.3.3.rc are released!
371010 [dchelimsky@g] rspec-1.3.1.rc and rspec-rails-1.3.3.rc are released!

save only first line from string?
371020 [spare@fr gi ] a String except for the first line? (Assume string consist of one line,
+ 371029 [justincollin] irb(main):001:0> "a string\nwith multiple\nlines".gsub!
+ 371030 [john.sikora@] string.sub!(/^(.*\n?)((?im).+)?/, '\1').chomp
| + 371031 [john.sikora@] Oops, already found a problem. The chomp is not chomp! So it does not
| | 371032 [john.sikora@] Justin's looks good. I should have just let someone who knew what they
| | 371033 [john.sikora@] Sorry to blabber on, but I am trying to learn this myself.
| + 371042 [b.candler@po] Why not just this?
+ 371035 [josh.cheek@g] require 'test/unit'
+ 371038 [angel_steel@] => "a string"
| 371051 [mentionuse@g] "a string\nwith multiple\nlines".split(/\r?\n/).first
| 371068 [john.sikora@] I, perhaps erroneously, thought that the OP wanted to modify the string.
| 371072 [mentionuse@g] Oh, yes, I missed that; I should pay more attention.
+ 371039 [jgabrielygal] irb(main):004:0> a = "abcde\nfghwrferf\nqwerim1o34ir1"
+ 371066 [w_a_x_man@ya] "a string\nwith multiple\nlines"[ /.*/ ]
+ 371075 [eregontp@gm ] str = str.lines.first
| 371318 [spare@fr gi ] Definitely the most elegant! (Defining 'elegant' as simple, natural,
| 371331 [jgabrielygal] Did my solution work for you?
| + 371338 [josh.cheek@g] 2010/10/7 Jes=FAs Gabriel y Gal=E1n <jgabrielygalan@gmail.com>
| | 371339 [jgabrielygal] ne,
| + 371343 [x-ruby-lang@] String#lines returns an Enumerator, not an Array. I haven't looked at
+ 371347 [shortcutter@] irb(main):005:0> s = "multiple\nlines\n"

How to suppress display of specific code in irb??
371023 [dnorcott@mt ] I am very new to ruby (but a retired experienced C programmer) and am
+ 371024 [ryand-ruby@z] Hpricot.XML(open(url)); nil
+ 371026 [justincollin] irb(main):001:0> s = "some really, really long string" ; nil
+ 371027 [ryand-ruby@z] def toggle_output
+ 371043 [b.candler@po] In Ruby, every expression has a value, and by default irb displays that
  371056 [ammarabuali@] IRB.conf[:ECHO] = false
  371089 [dnorcott@mt ] Thanks these all did the trick. I especially like the toggle.
  + 371091 [mentionuse@g] It won't be documented anywhere in the way you're expecting. It's
  + 371092 [ryand-ruby@z] any=20
    371103 [dnorcott@mt ] Sorry I seem to hit a sore spot.  I have no problem with the
    + 371106 [paradisaeida] Ruby 1.8.7 is not .quite. an ISO standard yet.
    + 371107 [ryand-ruby@z] are=20
    + 371124 [b.candler@po] and I still highly recommend it.
      371149 [dnorcott@mt ] Thanks all, this is exactly what I was looking for.

gems should *not be case sensitive.. or should they?
371034 [botpena@gm i] why are gem names case sensitive?
+ 371061 [ammarabuali@] Interesting. I does make sense to me that search/list finds either
| + 371070 [botpena@gm i] yes, unfortunately,...
| + 371085 [ryand-ruby@z] downcased :)
+ 371084 [transfire@gm] +1
+ 371090 [ninja@sl ph ] Probably for the same reason that just about every programming language,
  371093 [joelvanderwe] Some project management systems ask you for a "unix name", which must be

how do i delete files in particular directoryin ruby ???
371049 [amittomer25@] i would like to know ,how do i delete all files in particular
+ 371052 [stefano.croc] The ri documentation for FileUtils.rm gives several examples, among which you
| + 371053 [amittomer25@] Thanks for your help Stefano
| | + 371055 [angel_steel@] Try using the full path (without ~)
| | | 371057 [amittomer25@] Thanks steel i tried with full name but still getting problem
| | | 371059 [stefano.croc] Have you tried removing one of those files by hand? If that works, then we now
| | | 371062 [amittomer25@] Stefano what you want to say is if we are not able to delete with hand
| | | + 371063 [amittomer25@] AND the files am looking to delete is ruby's Temp files (Cgi files)...
| | | + 371064 [stefano.croc] What I mean is that if you launch the file manager (clicking on the "My
| | |   371065 [amittomer25@] Thanks Stefano..
| | + 371058 [stefano.croc] Your code seems correct. Since I don't use windows, I can't help you much
| + 371069 [shortcutter@] ticular
|   371128 [amittomer25@] Thanks Robert
|   371134 [jeremy@bo p.] FileUtils.rm emulates the function of the Unix rm program.
|   371137 [amittomer25@] Thanks jeremy ...
|   371139 [jeremy@bo p.] You're bumping into a common limitation of Windows, sadly.  It takes
|   371142 [amittomer25@] Yaa Jeremy i really need do delete those file..
|   + 371143 [jeremy@bo p.] Unfortunately, either Mongrel or your application is still using those
|   | 371144 [amittomer25@] Thansk Jeremy for your suggestion
|   | 371151 [jeremy@bo p.] I don't know of any awesome Mongrel documentation myself.  Sorry.  Maybe
|   + 371145 [cmdjackryan@] Why? Are you running into file system limitations due to size and
|     371206 [amittomer25@] Phillip thanks for your response...
+ 371054 [angel_steel@] Dir["*"].each {|f| File.delete(f) }

howto ruby custom exception using the C-API
371050 [aotto1968@us] I create the following code to create a custom exception

64-bit Ruby? FXRuby
371067 [ralphs@do 32] ...
371071 [cremes.devli] There is *not* a 64-bit version of MRI Ruby 1.8.7 that runs on Windows. You could run 64-bit JRuby. If you use the current master, you get preliminary C extension support which may be far enough along to run FXRuby.
371081 [luislavena@g] ove?

Missing rake/extensiontask
371078 [ggarra13@gm ] I am using ruby with latest kubuntu using ruby-full and trying to
371122 [giovanni.cri] Giovanni

[ANN] unicorn 1.1.4 - small bug fix and doc updates
371083 [normalperson] Unicorn is an HTTP server for Rack applications designed to only serve

[ANN] MacRuby 0.7
371088 [laurent.sans] After 5 months of development since the last release, MacRuby 0.7 is

net:sftp 2.0.5 upload! does not work
371095 [peterpeiguo@] I tried to upload files from a windows box to a linux box, and I used
371098 [astahl@hi .c] In my experience, more often than not the gem isn't broken - it's your
+ 371114 [peterpeiguo@] Figured out...
+ 371115 [peterpeiguo@] Thanks!

Ruby on web without RoR
371101 [jgnmello@gm ] Is possible to use only Ruby without Rails on web?
+ 371104 [jeremy@bo p.] Ruby is a complete programming language with a large selection of
| 371109 [ryand-ruby@z] bad answer. see steve's answer for an example of how to be helpful.
| + 371110 [wishdev@gm i] Wow I can only imagine what my useless top posted message is going to get
| + 371112 [thiagown@gm ] Please ignore that Ryan Davis. I believe that any message besides his
| + 371113 [jeremy@bo p.] Yes, everyone.  I answered poorly.  Please accept my most sincere apologies.
|   371169 [ryand-ruby@z] apologies.
|   371170 [jeremy@bo p.] You continue to create even more noise on this thread while never once
+ 371105 [steve@st ve ] Yes.
| 371108 [ryand-ruby@z] _great_ answer (except for being a top post).
+ 371121 [code@ap th o] Absolutely.
+ 371140 [josh.cheek@g] 2010/10/4 Jo=E3o Mello <jgnmello@gmail.com>
threads.html
top