366638-369696 subjects 367058-367426

^ Netbeans and rackup
366840 [xf27 arcor.d] I'm currently dabbling with Rack. For that I have created a Ruby project

^ Accessing local variables dynamically
366842 [ralphs dos32] I have a collection of variables named
366845 [xeno badenou] instance_variable_get("@#{one_char}_something")

^ What is the syntax for passing a File to a Class?
366843 [frank.guerin] logFile = File.new("../LOGS/IF4IT.log", "w")
366846 [xeno badenou] logFile is a just a regular variable like everything else, there's no

^ How do I run a text.txt or a analyzer.rb
366844 [mlr54 msn.co] How do I run a .rb file in command prompt? I was in the command prompt,
366847 [sutniuq gmx.] Type

^ Argument Error
366849 [human.dictio] I'm learning Ruby and I want to know how to make a script have an
+ 366853 [jgabrielygal] You have the program arguments in the ARGV array, as you probably
+ 366859 [oscartheduck] The arguments on the command line are stored in the ARGV array. That's =

^ Problem in 2 code
366850 [amiref ymail] I dont understand results of these 2 code ?
366858 [cppcodeguy a] /(\w+)(\w+)/ is a Regexp. If you want to know about it, you should
366860 [amiref ymail] what does first code do?
366862 [markus fisch] The first (x[0]) is always the complete match the whole regular

^ each method
366851 [amiref ymail] What can I do to can apply some change to an array for always ? ( I want
366856 [desantis.mau] array.collect! {|item| block } вк array
366867 [b.candler po] Another option, if you know the contents are all Strings or Arrays, is

^ what is the correct way to extend native methods?
366855 [desantis.mau] suppose I want to modify Array.slice() (and consequentially, Array[]) in
+ 366857 [oscartheduck] Try Regexp, not RegExp
| 366864 [desantis.mau] LOL that's what I obtain when I'm still not asleep at 3.00 am :P
| 366866 [b.candler po] What ruby are you using? With ruby 1.8.7 (2010-01-10 patchlevel 249)
| 366870 [dblack rubyp] rb_define_method(rb_cArray, "[]", rb_ary_aref, -1);
| + 366872 [desantis.mau] I'm using ruby 1.9.2dev (2010-07-11 revision 28613) [x86_64-linux] ,
| | 366873 [dblack rubyp] It's one underlying method (C function) with two Ruby names. If you
| | 366874 [desantis.mau] uhhh I think I've understood: In order to do what I want to do, I should
| | 366876 [dblack rubyp] I should add that my full advice is to avoid overriding slice and/or []
| | 366881 [desantis.mau] Ok, I've learned more from these posts than in two months of
| | + 366884 [rick.denatal] It's because included modules are inserted after the class in the
| | + 366885 [jeanjulien.f] I think it has to do with inheritance when looking for methods.
| |   366895 [desantis.mau] Clear as spring wat - better do not mention Spring! - bright as a
| + 366904 [djberg96 gma] Though, technically they're synonyms, not aliases. :)
+ 366875 [transfire gm] On Jul 31, 9:19=A0pm, Maurizio De Santis <desantis.mauri...@gmail.com>

^ Could I build a video chat site with ruby on rails?
366861 [mlr54 msn.co] Take ustreamtv.com, for instance, would I be able to make a website like
366887 [  jbw jbw.cc] Short answer yes, and from what I've heard Hulu.com is actually built

^ REXML - controlling whitespaces and inserting CR
366879 [charlemagne ] I have an XML file containing this
366892 [shortcutter ] I think, you will have to create your own formatter - or use a
366894 [charlemagne ] Thank you Robert for your reply.
367630 [shortcutter ] I hope you found it by now.  If not, please see
367636 [charlemagne ] I saw it before but I'll give it a look again.
367637 [wishdev gmai] Afternoon,
367638 [charlemagne ] Yes John.

^ Standard IO streams in Ruby
366891 [jatinkumar.n] @output = `g++ j.cpp -o "prog" && ./prog`
366993 [ninja slapha] Why are you compiling it every time?
367034 [jatinkumar.n] I am not compiling it every time, only when the user clicks on the
367078 [ninja slapha] #include <unistd.h>

^ how to check if some object is included in some module?
366893 [jarmo.p gmai] I know that there are methods #kind_of?/#is_a? to check if one object
+ 366896 [dblack rubyp] The nesting of classes and modules is completely different from the
+ 366900 [jacius gmail] 646
  366928 [jarmo.p gmai] But the examples provided by you won't work since #constants return
  366930 [b.candler po] => nil
  366971 [jarmo.p gmai] Yup, regexp would be another possible way to do it.

^ [ANN] RubyConf registration and Call For Proposals now open!
366898 [dblack rubyp] You can now register for RubyConf, and the Call For Proposals for

^ Lazy array
366899 [wagner.andre] How can I get a lazy array in Ruby? E.g., in Haskell, I can talk about
+ 366905 [skim.la gmai] Ruby Arrays dynamically expand as needed.  You can apply blocks to them to
| 366908 [jeremy.ruten] Ruby 1.9 has the Enumerator class, which can act like a lazy list I
| 366913 [eregontp gma] m to
| 366924 [b.candler po] In any case, that Enumerator block form is only syntactic sugar. You can
| 368499 [shortcutter ] irb(main):014:0> even =3D (2..1.0/0).step(2)
+ 366996 [ninja slapha] list = (1..(1.0/0))
+ 368527 [cmdicely gma] The Ruby equivalent of a lazy array is an enumerator. In Ruby 1.9.2,

^ Ruby 1.9
366901 [e.j.jurman g] I want to install ruby 1.9, but what is the best method of doing this
366902 [douglasfdrum] Sorry, I'm on my phone, so it's hard to search for complete instructions rig=
366903 [skim.la gmai] Like Douglas, I also recommend rvm.  For the sake of convenience, you can
366906 [e.j.jurman g] So, will this work on top of Mac OS X's preinstalled version of Ruby? Or
366907 [skim.la gmai] Yes rvm will work using the pre-installed version.  You will have both.  I

^ Shoes: Stacks and Flows
366915 [spare frigid] I'm still learning Shoes -- working on basic formatting. I'm a little
366921 [  jbw jbw.cc] Shoes.app do
366922 [jeremy.ruten] app =3D Shoes.app do
366998 [spare frigid] Thanks. This does what I want.
366999 [jeremy.ruten] It doesn't really, but it has a similar idea. In HTML, you might

^ How to remove leading &nbsp; from string
366916 [lakshmi27.u ] I Need small help that how to remove leading &nbsp; tags
366979 [bdloving gma] simply a.delete!("&nbsp;")
366982 [Rob AgileCon] Well, that's almost certainly not what the OP wants!

^ scite
366917 [shahpriyank0] I want  seperate use of scite so i taken the source and scite editor run
366926 [rogerpack200] is ruby.exe in your path?
367025 [shahpriyank0] Thanks for reply.
367033 [sutniuq gmx.] Does your script name and/or directory name contain spaces? SciTE has

^ [ANN] io_splice 2.2.0 - updates for Linux 2.6.35
366918 [normalperson] The splice family of Linux system calls can transfer data between file

^ running memprof on ree 2010.02, gives a segmentation fault
366919 [kannan.deepa] The installation of memprof was successful. And is on a virtualized on a
366925 [rogerpack200] Maybe it's not REE compatible, since REE uses a different GC style?

^ Re: How to remove leading  from string
366923 [b.candler po] You mean trailing, rather than leading?
366927 [lakshmi27.u ] Am entering multiple paragrpahs in editior .that will be saved into str
+ 366932 [b.candler po] Your requirement is unclear. Are you saying you want to remove the
+ 366956 [mrzombie the] str = str.gsub(/&nbsp;/,"").gsub(/<p>\s*<\/p>/,"")
  367001 [lakshmi27.u ] Let me explain my requiremnt clearly.
  367019 [b.candler po] (1) Write a regular expression which matches just the thing you want to
  367022 [lakshmi27.u ] str.gsub! /<p>(&nbsp;|\s)*<\/p>\s*\z/, ''
  + 367023 [lakshmi27.u ] Oh k basically result not modified then returns nil right?
  | 367036 [b.candler po] So, write a regexp which matches any number of &nbsp; or space, followed
  + 367035 [b.candler po] Yes, the result of gsub! is nil if no change is made; but the string

^ Iteration through File.file? misses entries for which  File.file?(entry) == true
366931 [kyle kylebar] I'm new to Ruby, so I'm most likely making an elementary mistake.
+ 366934 [b.candler po] return pwdFiles
| + 366935 [b.candler po] Oh, and another hint: try things out in irb to find out what's
| + 366937 [oscartheduck] The symbolic constant for truth is True, not true.
|   366940 [b.candler po] That is incorrect, as 5 seconds with irb will show you.
|   366944 [oscartheduck] If you're going to write an email and be wrong, be wrong on every point, =
|   366950 [b.candler po] They are different in both scope and lifetime.
+ 366938 [rws1111 gmai] While not an answer to your question, I thought I'd comment on the line
+ 366947 [sutniuq gmx.] That can't work since Dir.foreach yields only the filenames of the files

^ Installing Ruby 1.9.2 on Win7
366933 [bill44077 ms] I'm a total noob to Ruby and am following the pick axe book and
+ 366936 [b.candler po] Not answering your question directly, but RoR 3.0 should also be
| 366942 [bill44077 ms] Brian,
| 366946 [b.candler po] ruby 1.9.x is a fundamentally different language to 1.8.x, both in its
| 366957 [bill44077 ms] Brian,
+ 366939 [rogerpack200] What's the best way to install Ruby
  366941 [bill44077 ms] Thanks Roger...
  + 366948 [rogerpack200] unzip it using 7 zip, cd into the "bin" folder, run ruby from there.  Or
  | 366958 [bill44077 ms] Roger,
  + 366951 [luislavena g] You need 7-zip to extract that package.
    366959 [bill44077 ms] Makes perfect sense. Thanks!

^ IO.popen
366945 [rogerpack200] I assume the doc's are "just wrong" when they say you can access an
+ 366952 [b.candler po] Yes. It doesn't say "any mode you'd like"; it says "any of the modes
+ 366953 [jeanjulien.f] When I want to read and write from the IO.popen'ed command, I use

^ File.new ("write.txt", "w+") results in error
366955 [binhph gmail] I am new to Ruby.
+ 366962 [joseph.savar] When using ( spaces are not required in 1.8.7 the error is
+ 366997 [justincollin] It's not a bug. A comma-separated list inside of parentheses is just
+ 367003 [eugen prime-] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  367103 [b.candler po] The latter, because in ruby the parentheses surrounding the argument

^ [ANN] 24 More Days Until LSRC 2010
366960 [jimfreeze gm] Howdy

^ Re: SVG generation gem? Cairo?
366961 [wruyahoo05 c] I am also interested in generating vector graphics with Ruby. One thing

^ ANN: Sequel 3.14.0 Released
366964 [code jeremye] Sequel is a lightweight database access toolkit for Ruby.

^ Pingecho, causing SocketError.
366967 [walle.sthlm ] I have a strange problem. The script posted at the end off this post is
366968 [mbj seonic.n] For me it seems that your failing computer is unable to resolv the ip
366969 [walle.sthlm ] Hey Markus,
366970 [walle.sthlm ] I'm sorry, did a small mistake. It works now.

^ 1.9.2 RC2 Uses 1.9.1 for various directories
366973 [zampettim ai] Using 1.9.2 RC2 and building from source, I am seeing the install use
366974 [luislavena g] 1.9.1 stand for Ruby API compatibility, and is used for Ruby C
367807 [rogerdpack2 ] The only incompatibility I've found is ruby-debug gem.  Perhaps it

^ Re: Iteration through File.file? misses entries for which  File.file?(entry) == true -- FIXED
366975 [kylebarbour ] Thanks for all the responses! I feel so thoroughly helped :)
366977 [sutniuq gmx.] I'd prefer the Dir[] variant, since it's more compact. And if you want

^ Installing mysql gem on Win7 x64 for MySQL 5.1.x
366976 [geoff.rowell] * Windows 7 x64
366985 [luislavena g] No, cygwin !=3D mingw32
366988 [geoff.rowell] Okay. The "mingw32" platform isn't intended for Cygwin. However, I think
366995 [luislavena g] Unless you installed a 64bits version of ruby, that is the only way.
366994 [luislavena g] gem install mysql will install the correct binary version, and if none
367060 [manish8n yah] I am also getting problem in installing mysql in window 7.

^ How to save session using open-uri
366981 [tandon.arpit] I am trying to pull out some information from a site.
366983 [astahl hi5.c] Try using Mechanize.  It will handle all the session & cookie detail for
367049 [tandon.arpit] Thanks, it worked.

^ Re: ARGV, STDIN and gets
366987 [prakblr yaho] Thanks Nobuyoshi!

^ how to use xslt on Windows Ruby
366989 [author zhang] I am new to Ruby, i just want to automate my daily work by using some ruby
+ 367007 [author zhang] any idea?
+ 367039 [brabuhr gmai] Using Ruby on Rails and XSLT to Create a Word 2007 Document
+ 367041 [mike.dalessi] Please take a look at the nokogiri gem. It contains a version of libxml that
  367045 [author zhang] Thank you,
  367141 [author zhang] Thank you, Mike

^ [ANN] Key Signing Party at RubyKaigi 2010
366990 [shyouhei rub] As the official site has timetable now, I'm announcing this again.  We ha=

^ ENV['someapp']" is nil when the code is run with "sudo"
366991 [kadishmal gm] Some very weird behavior is happening with Ruby when I run the code with
367004 [b.candler po] env_reset       If set, sudo will reset the environment to only
367010 [kadishmal gm] Thank you very much Brian for your assistance!
367018 [b.candler po] when running specific commands. Since you are allowing your users to run
367079 [kadishmal gm] I have solved it for my personal case with -E flag after sudo like "sudo
367082 [ryand-ruby z] Why does your gem install require environment variables?

^ Shoes: Reopening Window if Necessary
367000 [spare frigid] In my shoes app, I have a situation like this: There is a separate

^ How do I configure ruby to mysql by default instead of sqlit
367006 [olivierdb ho] ruby-1.9.1-p429
367031 [luislavena g] Where are you reading that? installing sqlite3 is as simple as "gem

^ upgrading gems with native dependencies
367008 [kannan.deepa] I have installed a gem with a native dependency.
+ 367500 [kannan.deepa] Any help?
+ 367514 [rogerpack200] Does it remove the old, previous version of the package?

^ Block variable & Local variable
367011 [amiref ymail] array = [1,2,3,4,5]
+ 367013 [eugen prime-] Last item in array is 5, thus |num| value will be the one from last
| 367014 [guglielmo.fa] I've tried it in my machine and the output is 1...
| 367016 [eugen prime-] Look here
| + 367020 [amiref ymail] It means in ruby v 1.8.6 block variable and local variable are the same
| | 367024 [eugen prime-] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
| | 367076 [dblack rubyp] a = nil
| + 367021 [sutniuq gmx.] marvin@ikarus:~$ ruby -w
+ 367415 [barchil gmai] I tried your code i added this at the end

^ Can't install Mongrel  and My SQL gem on Windows XP 64 bit
367012 [s.cambour gm] I have no access to the Internet to be able to install all needed gems,
367029 [luislavena g] For you to avoid triggering the gem compilation process, you need to
367070 [s.cambour gm] I didn't find mysql-2.8.1-x86- mswin32-60.gem, just
367071 [luislavena g] No, some gems do not strict the mswin32 version, x86-mswin32 is
367091 [s.cambour gm] It works like a charm, THANKS a lot !

^ [ANN] Rainbows! 0.96.0 - range support
367017 [normalperson] Rainbows! is an HTTP server for sleepy Rack applications.  It is based on

^ Nokogiri installation problem on Mac 10.6.0
367026 [shahpriyank0] I getting problem when install Nokogiri on mac snow leopard.
+ 367028 [shahpriyank0] I already install libxml2 libxslt so that is not the issue so let me
| 367030 [peterhickman] Look in /Library/Ruby/Gems/1.8/gems/nokogiri-
+ 367032 [luislavena g] on.

^ Complex associations
367037 [trish.ball g] I am working on a project that has some complex table associations,
367043 [b.candler po] class Store
367050 [trish.ball g] Thanks for the input.  I will give these a shot.  Sorry about the

^ [ANN] Money 3.1.0.pre1
367038 [shane.emmons] Money 3.1.0.pre1

^ rubygem dependencies autoremoval
367040 [botpena gmai] if i install a gem, eg, say ruport
367051 [jbarnette gm] We don't track the difference between an explicitly installed gem and a =

^ Easy and fast  job (SCRIPT) , 50 
367042 [axel.tougero] I need a script to automate some http POST requests to a server and i

^ String encoding issues
367046 [oliver.peng ] [root@mars mysql]# irb -E ascii
367047 [oliver.peng ] I figure out the first question.
367048 [b.candler po] Ugh. That's another special case to add to

^ Different between 2 code
367052 [amiref ymail] Why 2 different sort in below code return different result ?
+ 367065 [rws1111 gmai] I think a quick Google search on the "spaceship operator" should help
+ 367093 [b.candler po] irb(main):001:0> 1 <=> 2

367053 [rushikesh.bu] AMISHAPATEL HOT BOOBS

^ Ruby committers Q&A at RubyKaigi
367055 [shugo ruby-l] I'm the moderator of Ruby committers Q&A
367056 [shugo ruby-l] Please give the name of the commiter to whom you would like to ask a

^ HTTPClient can't login to Google Voice
367057 [mtelis gmail] require 'httpclient'
+ 367062 [  jbw jbw.cc] require 'net/https'
| 367067 [mtelis gmail] Guess it was long time ago, before Google added that GALX thing...
| 367072 [  jbw jbw.cc] What does the code look like now? Added that line to mine and ir still works.
| 367073 [mtelis gmail] Thanks for the tip! I've tried net/http, RestClient and HTTPClient and
| 367074 [  jbw jbw.cc] I don't think the API for this is even released offically? But there is
+ 367075 [brabuhr gmai] th"
  367081 [mtelis gmail] Unfortunately, this doesn't work :-( I changed parameters as you
  367145 [mtelis gmail] Bump. Anyone?
  367146 [mtelis gmail] and the CheckCookie part hints that HTTPClient is doing something wrong