312845-325443

312665-348676 subjects 313039-313842

^ Re: split not returning an array?
312845 [B.Candler po] Because it is defined in the specification for URLs that + means space.

^ syntax error, unexpected kELSE
312853 [christopher.] I've been trying to solve the problem in the following bit of code for
+ 312856 [dblack rubyp] There's no ++ increment operator. Change that to z += 1.
+ 312857 [jgabrielygal] Ruby doesn't support this syntax. Change it to z += 1.
| 312859 [christopher.] Thanks a million guys, I go back and forth with languages and didn't
| 312861 [dblack rubyp] This message is in MIME format.  The first part should be readable text,
| 312883 [davebass mus] As the ++ and -- notations are so common in other languages, and some of
| 313188 [dblack rubyp] I don't think so. I prefer not to have Ruby apologize for not being
+ 312893 [shortcutter ] Apart from the ++ issue you might want to change other things as well.

^ Problemm using ruby classes
312855 [marchese58 l] I'm new on ruby so probably my question is stupid.
+ 312872 [stefano.croc] You need to require the file where you defined the class. For example
| 312884 [shevegen lin] To make it known you need to
+ 312957 [sepp2k googl] .new is not an operator it is nothing more than a simple method call.
  312993 [marchese58 l] Thanks to everyone, i solved the problem!

^ resizing images in rails?
312864 [ravivardhank] how to resize the images in rails app?
+ 312869 [rmagick gmai] the section "Resizing to a maximum (or minimum) size".
+ 313019 [uzimonkey gm] First, resizing 400x300 to 600x800 changes the aspect ratio.  The image

^ wsdl2ruby proxy aware?
312865 [rajmohan mot] charset="us-ascii"

^ Re: assert_raise question
312868 [41mortimer g] This is a somewhat unrelated question, but in playing around with this,
312871 [B.Candler po] irb(main):013:0> puts ArgumentError
312874 [41mortimer g] Well, now that you explained it, it makes perfect sense!  Thanks.

^ Re: ActiveRecord Question -- making arrays or hashs out of database tables
312870 [glenn_ritz y] Thanks for your reply.=A0 This is very helpful.=0AGlenn=0A=0A=0A=0A----- Or=

^ encrypting password on form submit?
312875 [a.etherton h] information from the form is currently submitted to the database as is.
+ 312876 [jcoglan goog] I have a plugin called has_password that abstracts away the SHA1-encryption.
| 312878 [a.etherton h] Thanks for your response, but do you know of a way to just encrypt the
| + 312879 [jcoglan goog] 2008/8/27 Amanda .. <a.etherton@hotmail.com>
| + 312880 [fophillips f] =20
|   + 312881 [a.etherton h] okay well, since I haven't used much javascript, particularly with Ruby,
|   | 312902 [fophillips f] =20
|   + 312882 [jcoglan goog] 2008/8/27 Fred Phillips <fophillips@fophillips.org>
|   + 312889 [Kevin.Brown ] charset="iso-8859-1"
|     312891 [a.etherton h] and I don't even know what ssl is lol, I will go look into it.
|     312897 [davividal si] A-m-a-z-i-n-g.
|     312899 [a.etherton h] okay, so I know that I need to learn about SSL, but I don't think that's
|     312901 [james.britt ] If you are building a Rails app you would do better to ask your
+ 312885 [caduceass gm] I haven't used Rails in a while, but what happens in between the form
  312890 [a.etherton h] Thats what I'm not sure about/don't know how to do...I was hoping for
  + 312894 [a.etherton h] but that I can do in Ruby instead of PHP
  | + 312895 [cdj goh-inc.] SSB3b3VsZG4ndCBhdHRlbXB0IHRvIGV2ZW4gZG8gZW5jcnlwdGlvbiBpbiBKYXZhc2NyaXB0LiBZ
  | + 312939 [Neuman.Vong ] SGkgQW1hbmRhDQoNCklmIHlvdSB3YW50IHRvIHNhdmUgYSBNRDUgaGFzaCBvZiB5b3VyIHBhc3N3
  + 312898 [davividal si] You mean "md5"?

^ Treetop question
312892 [etaern yahoo] grammar Tester

^ Re: ruby wish-list
312896 [rogerpack200] Ahh I get it. Odd

^ Having a difficult time with Case statements.
312906 [christopher.] I am trying to implement a simple frontend for a text adventure that
+ 312907 [paradisaeida] Add the method you created to the end of the program 'definition' you have.
| 312908 [christopher.] Thank you for the feedback but I should have mentioned that it is one of
+ 312909 [_mwryder wor] Looking at your code it looks like you need to remove the first case
  312910 [christopher.] Wrapped a call to startUp() into the main game loop and made startstate
  312913 [_mwryder wor] Glad to see you got it working.  I think what you were trying to do
  + 312914 [christopher.] Yeah I was expecting them to continue until told to quit! Is there a
  | 312916 [shevegen lin] There probably are but my personal habit these days is to use two
  | 312938 [B.Candler po] If you're going to keep state in a local variable, then you need to keep
  + 312956 [sepp2k googl] In C if there is no break it will fall through, yes, but that would hardly
    313055 [_mwryder wor] From the looks of the code that I was tracing selecting '2'  would set
    313056 [sepp2k googl] Yes, but selecting 1, sets the state to 4, so in that case he would not want
    313059 [christopher.] I'm not one hundred percent sure what either of you believe I wanted

^ HTML <form> and redirecting the result
312915 [shevegen lin] since a long time I am using a very simple ruby script that translates
312917 [llleelay gma] if i need to do this function, i'll use javascript.

^ Help with Custom ERB Templates
312922 [eric ericmic] I'm trying to create a custom erb template that allows me to mix MXML
312925 [eric ericmic] Nevermind! http://builder.rubyforge.org/ seems to be a good base for

^ does ruby have an http proxy
312931 [etaern yahoo] Is there an http proxy module that could be used ? For example , I would
+ 312932 [vjoel path.b] Webrick does this nicely. See sample/webrick/httpproxy.rb in the ruby
+ 312935 [tpreal gmail] require 'net/http'
  313021 [vjoel path.b] Isn't that a client?

^ About mime/types
312933 [pal palbergs] Why does this MIME::Types['text/plain'] give 'text/plaintext/plain'?

^ generate uuid
312940 [hema angleri] How Can I  generate uuid ? any references or Ideas could You people
+ 312949 [etaern yahoo] Posted via http://www.ruby-forum.com/.
| 313404 [mo_mail ongh] In Windows, you can use this code.  I'm not sure where I found this
+ 313422 [ara.t.howard] a @ http://codeforpeople.com/
+ 313448 [phasis gmail] require 'open-uri'
| 313586 [ezmobius gma] One thing I;ve found is that all of the UUID generators are painfully
| 313588 [james graypr] uuid = `uuidgen`.strip
| + 313590 [tommy.nordgr] The variation I use is uuid = "x_#{`uuidgen`.strip}"
| + 313592 [ryand-ruby z] that's nice. 10k real uuids in 1 minute is perfectly acceptable for
|   313595 [ara.t.howard] require 'open-uri'
+ 313678 [coder68 yaho] sudo gem install guid

^ Decode/encode Unicode
312941 [jonas.esp go] How to decode  a String type to Unicode?
+ 312955 [tpreal gmail] Unicode is not fully supported in Ruby 1.8.X, it will be in Ruby 1.9.
+ 312977 [james graypr] $ ruby -KU -e 'p "R=E9sum=E9".unpack("U*")'
| 313044 [jonas.esp go] Thanks! It will help until rb 1.9 been more extended.
+ 313030 [stephen.bois] This is a trickier question than you probably realize.

^ Re: DoS vulnerability in REXML
312942 [shugo.maeda ] I admit that my announcement is misleading.  It was based on the
+ 312943 [shugo.maeda ] There are some considerations to apply this fix to the Ruby's standard
| 313008 [gregory.t.br] Okay, I'll look out for that.  Thanks!
+ 313185 [shugo.maeda ] I have fixed the announcement.

^ dont def need return
312944 [sijo maxxion] I was learing Ruby and have code like
+ 312945 [codeblogger ] Ruby implicitly returns the last value of a code block unless you explicitly
+ 312946 [jgabrielygal] What happens is that Ruby returns the result of the last expression.
| 312947 [sijo maxxion] Thanks fr the reply
+ 312954 [wieczo.yo go] If you want to return both arrays combine them in another array on the

^ Confused by scope in ruby
312948 [f.mischa gma] I've been writing in ruby for a bit, but ran into something while
+ 312951 [f.mischa gma] Posted via http://www.ruby-forum.com/.
+ 312952 [sepp2k googl] Well, that's exactly what's happening at C level - in both cases. The
| 313088 [f.mischa gma] Yes, that is helpful. Thank you both.
+ 312953 [tpreal gmail] Assigning a value to a parameter simply assigns a new variable to the

^ [ANN] Mysqlplus, a new thread aware MySQL driver for Ruby
312959 [oldmoe gmail] I am pleased to announce the availability of a new MySQL driver.

^ Picture
312960 [hema angleri] How to download picture from the particular url ?
+ 312963 [etaern yahoo] agent = WWW::Mechanize.new
| 312970 [hema angleri] How about implementing using 'open uri'
| 312971 [etaern yahoo] File.open("some_pic.jpg") do |file|
+ 313249 [tucano recip] require 'open-uri'
+ 313251 [tpreal gmail] Posted via http://www.ruby-forum.com/.

^ How to format decimals on the fly (for EOF blocks)?
312964 [tefflox gmai] required per day.  It's scaled in the db to 3 (or more) decimal places,
312973 [tefflox gmai] sprintf !
312975 [B.Candler po] I don't understand how your figures relate to each other in the example you

^ Per suite unit test setup and teardown
312967 [peter semant] I am putting some tests together that need to access an external service
+ 313246 [fox nscl.msu] Prior to all test executions.. you could put the setup at the outer
| 313250 [peter semant] Putting the global setup code outside the class does work but there is
| 314314 [pit.capitain] END {
| 314421 [r.grosmann g] Why is a single END not enough? What is happening here?
+ 314338 [djberg96 gma] gem install test-unit
  + 314356 [pit.capitain] Thank you for the hint, Daniel. I missed the new release.
  + 314423 [peter semant] Oh thanks for that. Will get downloading asap.

^ Sort an array based on an attribute of its objects
312968 [forum josh.c] The title of this topic is not very good, but I didn't really know how
+ 312972 [dblack rubyp] array.group_by {|obj| obj.status }
| 312976 [robert.dober] David beat me to the line, but as somebody will post an inject based
+ 312978 [fxn hashref.] If working with a Set is fine (there's #to_set) that's provided by Set#classify.

^ How would this Perl script look in Ruby?
312979 [avinash.maga] Can somebody please me tell the way to write this script in Ruby?
+ 312980 [nathan natha] Why don't you show us what you have, and where you are stuck, rather
| + 312981 [B.Candler po] Certainly.
| + 312982 [avinash.maga] sorry about that.
|   312988 [shortcutter ] You can do
|   313077 [emmanuel.sur] adm has _QTY_ _CAR_ cars
+ 313087 [monojohnny g] <joke>
+ 313719 [w_a_x_man ya] message_templates =
  313826 [w_a_x_man ya] message_templates =

^ Small Doubt in Ruby
312983 [karoljouis g] in C or C++. Please also give some links for that if possible. Thank you
+ 312984 [etaern yahoo] Ruby supports inline C , and I guess you could call __asm__ from C ,
| 312985 [karoljouis g] Thank you for you reply. But won't that reduce execution time of the
| 312986 [etaern yahoo] I don't think it would be noticeable . Inline C is used in ruby ( among
| 312987 [karoljouis g] Thank you.
+ 312997 [uzimonkey gm] Assembly and Ruby are kind of an odd couple.  Compared to the cost of
  313150 [john.carter ] Usually inline asm is about doing Rich and Strange things to hardware.

^ specifying a network interface, with a http get request
312989 [ajp97 cam.ac] and am enjoying the diverse features it includes.
313071 [monojohnny g] If you are using 'Mongrel' as your webserver (possibly this also works
313182 [ajp97 cam.ac] Hey John,
+ 313183 [etaern yahoo] I'm no ruby expert , but I don't think that could be done from ruby .
| 313184 [ajp97 cam.ac] I'm about to dig into the ruby source code and see how much socket
| 313194 [antonin.aman] As your on the client side you do not bind you connect.
+ 313197 [monojohnny g] Thanks for the clarification, but I still don't quite understand what
  313200 [ajp97 cam.ac] Antonin,
  + 313208 [monojohnny g] If you use IP addresses (rather than a host), and those IP-addresses are
  | 313209 [ajp97 cam.ac] Its not running as a web request, the code for this is executed via the
  | 313217 [monojohnny g] Sorry Andy , I'm lost to what you are asking here, I thought you were
  | 313219 [ajp97 cam.ac] Hey John, Yeah i've worked out the solution now using wget.
  + 313552 [jeremy hineg] If this is something that you are going to need to do for an extended

^ Beginner help: Problem installing sqlite3 on Windows XP
312990 [kasper slash] I am new to Ruby, and i keep getting stuck in the same place getting
+ 312991 [etaern yahoo] You could try installing nmake , and run it again . You can find nmake
| 312998 [kasper slash] I tried to download nmake and placed NMAKE.EXE & NMAKE.ERR in the
+ 312994 [damnbigman g] try the sqlite3-ruby gem
| 312999 [kasper slash] Sorry i am new to this. What do you mean by this? thanks for your help
| 313000 [damnbigman g] gem install sqlite3-ruby rather than sqlite.  sqlite3-ruby works great for
| 313034 [stephen.bois] This thread explains what is going on for you.  I use the mswin32
+ 313099 [jcarter frig] From what I can tell sqlite3-ruby VERSION 1.2.4 does not have an mswin32
  + 313103 [damnbigman g] Good to know, I guess I haven't installed it in a while.
  + 313181 [kasper slash] Using version 1.2.3 fixed the problem. Thanks to all of your for trying
  + 313764 [johnts chart] Anyone know when and/or if 1.2.4 will have a mswin32 gem built? Not

^ How can I require other module?
312992 [youhaodeyi g] My ruby script and module script are in the same directory. I print the
+ 312995 [jcoglan goog] 2008/8/28 Zhao Yi <youhaodeyi@gmail.com>
+ 312996 [roberto REMO] Are you executing the script from the same directory?  Having "." in RUBY_PATH only means that your "current" directory will be checked, not the one actually hosting the script.
  313002 [youhaodeyi g] Both of your code can solve my problem, thanks.

^ Hpricot query
313003 [markjturner ] I'm trying to parse an XML document (a google calendar feed), but I
+ 313005 [ant serialta] hpricot isn't quite friendly with namespaces from what I have tried
| 313007 [markjturner ] familiar with xpath and I don't know how to find the tag I need with
| 313016 [ant serialta] Actually google calander has a ruby plugin/api located here
| 313020 [markjturner ] alendar.rubyforge.org/plugins/doc/
+ 313045 [why ruby-lan] Your query is good.  I think it must be something else.
  + 313191 [markjturner ] le.com/public/full"
  + 325443 [yarnosh gmai] Old thread brought to life...

^ Gems disapeared after port install of a package
313004 [t.bak selleo] I am new to Mac, tried to set up MSSQL connection
313015 [frederick.ch] Have you ended up with two different installs of ruby (I imagine port
313053 [t.bak selleo] Yes, indeed. gem is in /user/bin while irb is in /opt/local/bin/irb
313288 [t.bak selleo] sudo port -uf uninstall ruby

^ to create MyDate class
313010 [citra_1235 h] im newly with this so i really need a help from u guys to slove my
313125 [citra_1235 h] Heres my question in this attachment
313129 [adam.shelly ] wow that doesnt look like homeworx at all.
313130 [citra_1235 h] Can you just give me a bit clue for this one, im so desperately

^ Request for feedback, suggestions, contributions.
313014 [kenneth.m.mc] I'm attempting to write a module whose classes will make it easier to

^ Order some files by time before display
313018 [dendicus gma] require 'find'
313023 [reitinge in.] files = Dir[File.join('public/2008/', '**', @pattern)]
313024 [dendicus gma] Many thanks, Matthias! Your answer was perfectly resolve my problem and

^ Newb question: Printing a class.
313025 [ruby-forum g] programmed before.  Im reading through this tutorial as my first venture
+ 313028 [shashank_hi ] This is because you are asking it to find the return value of method
| 313032 [ruby-forum g] Thank you both that did work, but opened a new issue for me.
| 313040 [adam.shelly ] You are right, the Address class does have its own #to_s.  The issue
| 313043 [ruby-forum g] Thank you, that worked great!
+ 313029 [reitinge in.] There is no method called `person` in your Person class.  If you want to

^ Writing a method to handle a code block?
313027 [p.brian.ross] def each_vowel(&code_block)
+ 313036 [adam.shelly ] Yes the & is necessary, otherwise when you try to call this method
| 313058 [p.brian.ross] each_vowel {|vowel| puts vowel}
| + 313104 [p.brian.ross] Alternatively, if I just run
| + 313126 [adam.shelly ] I'm probably not the best explainer... but you are on the right track.
+ 313037 [uzimonkey gm] Code (in the form of Proc objects and similar) can be stored in a variable.
+ 313161 [ninja slapha] def each_vowel
  313293 [p.brian.ross] &foo just means that whatever is passed to it (& requires a code block) will
  313294 [buddhamagnet] As far as I understand it, passing a parameter to a method prefixed with &,

^ A general doubt
313031 [karoljouis g] If I am developing a Windows application in Ruby using FxRuby or WxRuby,
+ 313038 [uzimonkey gm] It's not silly, it's a genuine concern.  Having users install Ruby and a
| 313041 [adam.shelly ] I have used rubyscript2exe with FxRuby, and it works fine.  (Startup
| 313042 [etaern yahoo] but,what if I don't want the end-user to be able to see the source code
| + 313046 [wieczo.yo go] You might try to obscure the code, but it will be still available in
| | 313090 [james.britt ] I've a fork of rawr while I work on adding .rb-to-.class -> jar behavior
| + 313047 [karoljouis g] Ya. I too have doubt in the expose of .rb files to the end user.
| | 313050 [alex deletem] Weft QDA's an open-source product aimed at end-users so the fact that
| + 313048 [alex deletem] Rubyscript2exe is an easy and pretty effective solution for both wxRuby
| + 313051 [uzimonkey gm] You can't really do that, the best you can do is obfuscation.  Even
|   313052 [karoljouis g] Thank you. But when a hacker who knows the internals of the software
|   + 313193 [uzimonkey gm] If a "hacker" has write access to your end user's files (including the
|   | 313222 [rhkramer gma] Another approach to the problem is to strictly separate code from data (and
|   | 313230 [uzimonkey gm] Even that's not effective.  ROM dumps are not difficult to obtain, ROM
|   | 313244 [rhkramer gma] (and
|   | 313260 [rhkramer gma] right---------------^
|   + 313198 [joost zeekat] Are you seriously suggesting that generic application software should
|     313206 [karoljouis g] Thank you for your reply. What i am telling is if if a hacker accesses
|     313212 [joost zeekat] You're not wrong. You're just approaching the problem the wrong
|     313232 [gregory.t.br] Can we stop using Hacker to describe computer criminals?  The two
|     + 313236 [uzimonkey gm] Like it or not, that's what it means now.  In fact, using its true
|     | 313240 [gregory.t.br] Sure, if you're going on the daily news.  I'm suggesting you do
|     + 313243 [dblack rubyp] It really sucks that the word got hijacked, and I never use it that
+ 313123 [joost zeekat] [ some question regarding ruby ]
+ 313211 [davebass mus] If you don't want people to see your source code, and you want your app
  313215 [karoljouis g] 100% I agree with you. It is true. But my points are
  313220 [joost zeekat] It's a nonsensical scenario. WHY would some intruder do this, when he
  313231 [uzimonkey gm] Even if the Ruby program could be encrypted or obfuscated, they could
threads.html
top