[#400832] Need someone to do assessment - will pay $10! — "Mohammed A." <lists@...>
Hi,
[#400838] command prompt problem with windows 7 — Al Baker <lists@...>
I'm new to this, so forgive me noobishness(is that a word?) and have a
Am 02.11.2012 07:52, schrieb Al Baker:
> Are you really sure that the file `argv.rb' is in your current
[#400843] Simple question — "August Y." <lists@...>
I have just picked up ruby and am trying to teach my self. so this
[#400846] exception: can't convert nil into String — Peter Bailey <lists@...>
Hello,
You don't set the pdffile variable anywhere.
Bartosz Dziewo=C5=84ski wrote in post #1082535:
[#400858] Support for multiple Inheritance by classes — Ross Konsolebox <lists@...>
Will Ruby ever support multiple inheritance through classes instead of
I think I can say "no" with a fair amount of confidence.
unsubscrev please
Arlen Cuss wrote in post #1082618:
Even though other languages handle multiple inheritance without any
Peter Hickman wrote in post #1082748:
Well the example you gave at the head of this thread is pretty meaningless.
Peter Hickman wrote in post #1082753:
Ok then lets return to your puzzle problem. Given the first example that
Peter Hickman wrote in post #1082761:
On 4 November 2012 14:57, Ross Konsolebox <lists@ruby-forum.com> wrote:
> If you really want a Ruby-like language with multiple
[#400861] ruby -r debug -> "Emacs support available" — "listgj-ruby@..." <listgj-ruby@...>
Forgive my ignorance, but what does that "Emacs support available" message =
[#400862] unsubscrever forum, RETIRAR, DELETAR PLEASE, UNSUBSCREVER DO FORUM — sancozz@...
[#400865] why does UnboundMethod need to remember the class it was retrieved from (not merely owner)? — "Mean L." <lists@...>
class Base; def foo; end end
An unbound method can be called only after it is bound to an object
Igor Pirnovar wrote in post #1082653:
Mean L. wrote in post #1082655:
Igor Pirnovar wrote in post #1082666:
Mean L. wrote in post #1082678:
Igor Pirnovar wrote in post #1082685:
Mean L. wrote in post #1082686:
Igor Pirnovar wrote in post #1082688:
Mean L. wrote in post #1082704:
[#400873] image hexcode — Adriana Mikolaskova <lists@...>
Hello,
[#400912] Display Text as Image — Adriana Mikolaskova <lists@...>
Hello,
[#400914] login web page using mechanize — john smith <lists@...>
new to ruby, love the language. read programmatic programmers guide to
thank you. i am going to try your suggestion. is copybara a gem? i will
ok i need help with capybara. i keep finding pages with info about using
ive been trying to look up xpath and css selectors. i have my program
[#400946] Ruby under Valgrind shows a ton of memory errors -- normal? — Alex Dowad <lists@...>
Hi,
[#400985] How to merge two or more hashes in to one? — "Jermaine O." <lists@...>
Hi everyone.
Well, in this case I don't really see the advantage of using sets. The
Jan E. wrote in post #1083271:
Hi,
Jan E. wrote in post #1083135:
Jermaine O. wrote in post #1083143:
Jan E. wrote in post #1083144:
Jermaine O. wrote in post #1083159:
> The same thing can be achieved with Enumerable#inject, which is the
[#400994] putting values in one lines — Ferdous ara <lists@...>
Hi,
[#401006] Ruby Gem Dev IDE or editor? — Ziq Qwerty <lists@...>
I am making a ruby gem but I have to create a project structure and rake
[#401007] Type confusion: Java vs. Ruby — Regina George <lists@...>
Preface: this is my first day using Ruby
[#401026] Site down watir-webdriver — ajay paswan <lists@...>
Whenever a site is down it keeps on looking for it for sometime and
[#401027] Closing popups watir-webdriver — ajay paswan <lists@...>
Sometimes popup comes when a link is clicked, sometimes popup comes when
[#401028] open-uri, nokogiri and UTF-8 to US-ASCII — Panagiotis Atmatzidis <atma@...>
Hello,
If one were to examine the ruby URI docs, how would one know that there
[#401046] Need help improving this FileUtils.cp of an array of destinations — Robert Hansen <lists@...>
Hi
[#401079] Ruby script to process html — Mario Trento <lists@...>
Hi,
Or maybe you have a hint how to extract value between <td>...</td>,
[#401098] RSpec question about catching expected exception in class .new — tamouse mailing lists <tamouse.lists@...>
I have the following I'm trying to test:
[#401123] Heroku question — Kasenath Nao <lists@...>
Is Heroku for uploading my pure ruby(not rails) application and letting
[#401125] Complete newbie — "Carlos A." <lists@...>
Hey guys!
Your mac already comes with a computer programming text editor--it's
On Sat, Nov 10, 2012 at 3:32 PM, 7stud -- <lists@ruby-forum.com> wrote:
True. Why not try Gedit or maybe sublime text 2? Just a suggestion.
[#401141] Instance name of a class/object? — Carolyn Grant <lists@...>
Hi! I'm quite new to Ruby, and am quite confused about instance names.
[#401143] Trouble with http post — "Shaun A." <lists@...>
I am trying to create an http post request that sends a series of
[#401161] Convert date to string — Ferdous ara <lists@...>
Hi
Subject: Convert date to string
> You will have a Time object (do ri Time to know more), on which you
Am 11.11.2012 19:57, schrieb Ferdous ara:
On Mon, Nov 12, 2012 at 6:23 AM, <sto.mar@web.de> wrote:
Am 12.11.2012 15:45, schrieb Hassan Schroeder:
[#401173] question on watir — Raj pal <lists@...>
I am automating Idit application using Ruby, at one screen I can't feed
[#401191] Extending Array instances — Charles Hixson <charleshixsn@...>
I'm trying to figure out a good way to extend an Array, when the items
Charles Hixson wrote in post #1084111:
Brian Candler wrote:
On Mon, Nov 12, 2012 at 10:12 PM, Charles Hixson
[#401200] Efficient way for comparing records between 2 large files (16 million records) — Ruby Student <ruby.student@...>
Team,
Hello,
Robert,
[#401203] Python or RUBY? — "Radu M." <lists@...>
Hi.What do you think is easier?
[#401211] Calling Ruby from C (reverse SWIG) — Graham Menhennitt <graham@...>
TXkgQyBwcm9ncmFtIGNhbGxzIGEgdGhpcmQtcGFydHkgV2luZG93cyBETEwgdG8gcHJvdmlkZSBh
[#401245] Beginner with project in mind — Dan Dan <lists@...>
Hi, I've recently started learning ruby and have a project in mind.
[#401264] Need of ruby and Scripting language — NagaLakshmi _N <lists@...>
Hi..
We don't have to use a scripting language, but if you're a Ruby beginner, it sounds like you might have chosen to anyway!
[#401270] best method for creating a new gem in 1.9.3 land — tamouse mailing lists <tamouse.lists@...>
I'm starting to work on a new gem, a command line application.
[#401274] following along with "Beginning Ruby." — Al Baker <lists@...>
I'm having trouble following along with some of the examples in this
I tried to delete a directory that I created.
I did. I got:
[#401279] Question on exceptions — Justin Gamble <lists@...>
Hello! I have a simple bank program where I have to have an exception
What is the reason of doing the .new(...)in
Justin Gamble wrote in post #1084635:
On Fri, Nov 16, 2012 at 1:43 AM, Brian Candler <lists@ruby-forum.com> wrote:
On Fri, Nov 16, 2012 at 9:27 AM, tamouse mailing lists
On Fri, Nov 16, 2012 at 6:27 AM, Robert Klemme
[#401282] Re: creating users with LDAP — "Marcelo G." <lists@...>
You are certainly not obligated to answer any postings but I was
[#401297] why texts are jumbled using PDF-reader. — ajay paswan <lists@...>
I am using pdf-reader gem and trying to look for some content at some
[#401301] Alternatives to methods for large number of nested "ifs" — Philip Rhoades <phil@...>
People,
Philip Rhoades wrote in post #1084734:
[#401336] Advice for simple client/server application — Panagiotis Atmatzidis <atma@...>
Hello,
Subject: Advice for simple client/server application
[#401340] Cannot install heroku gem — Kunio Takamoto <lists@...>
Hi,
[#401344] adding load_path — Jia Hu <hujia06@...>
Hi all:
[#401364] Metaprogramming — "Aurimas N." <lists@...>
Hello,
Aurimas N. wrote in post #1085124:
7stud, you are being needlessly belligerent. A moment's Googling would tell you that Aurimas is not a native English speaker, and you should adjust your attitude accordingly.
[#401366] Magical 57.6 minutes in Time — Todd Benson <caduceass@...>
irb(main):80:0> RUBY_VERSION
[#401371] Missing Something — "Ron S." <lists@...>
I am an amateur programmer, and I feel I am missing something. Whenever
Thanks, Chris! I have spent time thinking about ALL of those things.
On Mon, Nov 19, 2012 at 5:27 PM, Ron S. <lists@ruby-forum.com> wrote:
[#401380] some gems not working anymore — johnny mo <lists@...>
hi,
[#401402] C Extension Shutdown GC vs Free Functions Called — Robert Buck <lists@...>
It was my assumption that during shutdown the objects would be freed
Robert Buck wrote in post #1085583:
Unsure if this really applies. Could you restate? I am not quite
[#401404] "undefined method `synchronize' for #<Mutex:0xa0f5adc>" from embedded Ruby program — Graham Menhennitt <graham@...>
I'm writing a C++ program (on Centos 5 Linux) that embeds a Ruby 1.9.3
On 21/11/2012 5:38 PM, Graham Menhennitt wrote:
Ah: prelude.rb defines Mutex#synchronize and Thread.exclusive in Ruby.
On 22/11/2012 1:09 PM, Arlen Cuss wrote:
[#401422] how to increase variable inside the while loop — Ferdous ara <lists@...>
Hi, my question might be confusing as its hard for me to make it clear,
[#401430] mysql drama! — Al Baker <lists@...>
I'm havng trouble using mysql in my example.
[#401433] Call SharePoint web services in Ruby — Baba Ghaytadkar <lists@...>
Hello Team,
On Wed, Nov 21, 2012 at 9:58 PM, Baba Ghaytadkar <lists@ruby-forum.com> wrote:
[#401434] Instance-variable-like user API — Garthy D <garthy_lmkltybr@...>
[#401438] ruby 1.9.3p237 in cygwin — botp <botpena@...>
definitely not a ruby-core dev here, so hope this is ok to post.
On 22/11/2012 19:16, botp wrote:
[#401449] CSV:mode must be 'r', 'rb', 'w', or 'wb' — ajay paswan <lists@...>
Why this code is giving error:
[#401450] Errno::ECONNREFUSED in net/ssh — Sambath Kumar Moorthy <lists@...>
Hi,
[#401451] Arrays with records as objects — Steve Tucknott <lists@...>
I am completely new to Ruby.
[#401452] Optimal number of threads in real browser testing — ajay paswan <lists@...>
Am writing a program for multithread real browser testing using ruby
[#401458] working with mysql in ruby — john smith <lists@...>
i have been trying to successfully connect ruby with mysql. there are a
I just tried reinstalling ruby, i installed the devkit. i do have vmware
На 25.11.2012 г. 20:39 ч., john smith написа:
Ivan Cenov wrote in post #1086301:
> You can put the lib\libmysql.dll available in this package to your
[#401481] declarative database schemes - automatically create migration files? — Marc Weber <marco-oweber@...>
I'm looking for something like this:
[#401490] Ruby XMLRPC OpenSSL::SSL::SSLError — Mohammed Yasin Rahman <Mohammed-Yasin.Rahman@...6.fr>
Hi,
On Fri, Nov 23, 2012 at 7:00 AM, Mohammed Yasin Rahman
On Fri, Nov 23, 2012 at 7:26 AM, Mohammed Yasin Rahman
I am using ruby 1.9.3p194 (2012-04-20 revision 35410) =
On Fri, Nov 23, 2012 at 7:50 AM, Mohammed Yasin Rahman
[#401516] I'm exploiting Ruby references — Nokan Emiro <uzleepito@...>
Hi,
On Sat, Nov 24, 2012 at 2:39 AM, Nokan Emiro <uzleepito@gmail.com> wrote:
[#401520] C Extension: Why would VALUE state appear differently during shutdown than immediately before it? — Robert Buck <lists@...>
I have a graph of objects in a C extension, and as such I maintain
For the record, if anyone else tries to write a database driver, or any
[#401529] How to create a gem which conditionally compiles/installs a C extension? — "Rocky B." <lists@...>
I have a gem that needs to compile and install a C extension on MRI
> * Figure out some way in the gem to dynamically disable compiling the
[#401565] browser.html diffrent from the page source - watir-webdriver — ajay paswan <lists@...>
Hi,
[#401567] click on link not working with ie #watir-webdriver — ajay paswan <lists@...>
Greetings,
Found this on another forum, does it help?
[#401577] Few unclosed browser — ajay paswan <lists@...>
I have the following program using watir-webdriver, I have made the code
[#401578] atomic statements in multithreading — ajay paswan <lists@...>
suppose I am working in multiple thread each thread runs following
On Mon, Nov 26, 2012 at 12:03 PM, ajay paswan <lists@ruby-forum.com> wrote:
Robert Klemme wrote in post #1086457:
[#401581] Own sort method — "Artem B." <lists@...>
I have wrote my own sort method for array:
[#401597] Contribuer à Diaspora — Flaburgan <flaburgan@...>
[#401598] Algorithm for choosing object based on priority — Damjan Rems <lists@...>
Since I am not computer graduate (electro engineer as mater of fact) I
On Mon, Nov 26, 2012 at 3:23 PM, Damjan Rems <lists@ruby-forum.com> wrote:
Thanks so much. I guess I was over-complicating.
On Mon, Nov 26, 2012 at 6:10 PM, Damjan Rems <lists@ruby-forum.com> wrote:
On Mon, Nov 26, 2012 at 6:30 PM, Jes=FAs Gabriel y Gal=E1n
[#401607] Novice: Understanding instance 'variables' and methods — Steve Tucknott <lists@...>
A question - or comment - on instance variables.
[#401616] Ruby + Selenium-webdriver — "Mattias A." <lists@...>
Hi,
[#401635] error in if — Mohammed Yasin Rahman <Mohammed-Yasin.Rahman@...6.fr>
WHat's the error here?
[#401644] Getting the smallest Items of an Array — "Ismail M." <lists@...>
Hello guys,
>> def n_min(l,n) (1..n).map {a=l.min ; l=l-[a]; a } end
2012/11/29 Regis d'Aubarede <lists@ruby-forum.com>:
On Thu, Nov 29, 2012 at 12:02 PM, Regis d'Aubarede <lists@ruby-forum.com> wrote:
[#401655] gem problems(sigh) — Al Baker <lists@...>
i tried to make a gem and tried to build the spec file and this is what
[#401672] Using model methods without an object for that model — comopasta Gr <lists@...>
Hi, I'm implementing an API to create records for one type of object in
Ha, I think this one was better on the ruby on rails space of the forum.
[#401674] CGI question — Assaf Shomer <lists@...>
Ruby Beginner question.
[#401676] How to know in which class we are when inheriting — Mario Ruiz <lists@...>
Look at this code:
Hi,
Well, it is more complicated what i want to do... but doint it like you
On Wed, Nov 28, 2012 at 12:51 PM, Mario Ruiz <lists@ruby-forum.com> wrote:
Hey Robert it doesn't work for me that way, i'm using 1.8.7 and i cannot
[#401687] Multidimensional Array — "John M." <lists@...>
Hi ,
[#401688] sorting data from a file — "Ismail M." <lists@...>
Hey guys,
of course I see your point Jan E.
I haven't done any thing yet.. i just didn't know where to start.
[#401706] Newbie question: (free) on-line courses? — Ken D'Ambrosio <ken@...>
Hello, all. There's a bunch of free on-line training for Javascript,
Codecademy just added Ruby.
Some basic lessons at www.oldkingjames.org click link top of page to lesson=
[#401711] Page Objectt design with Selenium Watir-Webdriver — "Mattias A." <lists@...>
Hi,
[#401724] This is not working. — "Radu M." <lists@...>
Hi...I tried this code:
[#401730] Need advice- would like to implement a delayed-load proxy class — Gary Weaver <lists@...>
I'd like to have const_missing return a class that would do the
[#401733] Simple script not working — Prog Rammer <lists@...>
Hi,
It looks like your browser can't establish a connection. Firewall?
[#401740] Trouble with Chronic — Joel Pearson <lists@...>
I've decided to try Chronic to make it easier (hopefully) to get certain
[#401753] removing directories — Peter Bailey <lists@...>
Hello,
[#401770] An example in Exception Handling with Ruby. — "Nathan Mr." <lists@...>
Source file is attached. I'm new to this forum so I don't know if there
[#401772] Ordered Hash (v. 1.8) — Doug Jolley <lists@...>
I am running Ruby v. 1.8.7 and I have installed the orderedhash gem. I
[#401791] Ocra build error — Joel Pearson <lists@...>
I'm confused by this, I can't see any reason for Ocra to fail in
[#401807] Gem install error? — Al Baker <lists@...>
i tried to install my own gem and got this:
Re: Arrays with records as objects
On Nov 22, 2012 11:07 AM, "Steve Tucknott" <lists@ruby-forum.com> wrote:
> I am 'playing'/'learning' at the moment - so what I have been doing is
> taking base examples and then adding how I could use them in the 'real
> world'.
This is great!! Experimenting with stuff that your learning is a great
thing, and no way would I want to discourage that. Checking in with
what your learning is a great thing, too.
> In an earlier array example, I had used the record Openstruct structure
> as:
> # -- This is my test to see how arrays can be indexed.....a
> five element array
> # -- for names and address/post code
> addr = []
>
> for i in 0..5
> addr_rec = OpenStruct.new
> addr_rec.name = "Cust#{i+1}"
> addr_rec.line1 = "C#{i+1}Line1"
> addr_rec.line2 = "C#{i+1}Line2"
> addr_rec.line3 = "C#{i+1}Line3"
> addr_rec.line4 = "C#{i+1}Line4"
> addr_rec.pcode = "C#{i+1}PCode"
> addr[i] = addr_rec
> end
>
> for i in 0..(addr.length-1)
> `zenity --info --title="My Array" --text="Each Array
> Element:\n#{addr[i].name}\n#{addr[i].line1}\n#{addr[i].line2}\n#{addr[i].line3}\n#{addr[i].line4}\n#{addr[i].pcode}"`
> end
>
> So, because that seemed to work ok, I then wanted to try to represent
> the TodoList file line contents as a 'record' (in general, that is how
> I'm used to handling file data). Hence then getting the 'line' record
> into the array.
It does work, yet it might not be the best way to do things in the
ruby world. Looking at the above, it seems to be borrowing idioms from
other 'less expressive' languages than ruby.
For instance, for loops are almost never needed in ruby. To approach a
more idiomatic ruby expression of the above, you would use the "each"
method:
0..5.each do |i| # a range creates an iterator,
usable by each
addr_rec = OpenStruct.new
cnum = i+1 # calculating the "customer number" once
# rather than recalculating it for each
# field below
addr_rec.name = "Cust#{cnum}"
addr_rec.line1 = "C#{cnum}Line1"
addr_rec.line2 = "C#{cnum}Line2"
addr_rec.line3 = "C#{cnum}Line3"
addr_rec.line4 = "C#{cnum}Line4"
addr_rec.pcode = "C#{cum}PCode"
addr[i] = addr_rec
# this could also be written as:
# addr << addr_rec
end
addr.each do |a| # an array also has an
iterator, also usable by each
`zenity --info --title="My Array" --text="Each Array
Element:\n#{a.name}\n#{a.line1}\n#{a.line2}\n#{a.line3}\n#{a.line4}\n#{a.pcode}"`
end
Note the comment about calculating cnum; in general it's best to
calculate a local constant once, rather than several times. It
wouldn't surprise me if the above was optimized away under the hood,
but it's best not to rely on such things, and it's more expressive of
what you mean by giving it it's own variable name
> In between postings though, I did remove the record structure, and made
> the item three separate instance variables again.
> So I think I'll create two versions of this - the single variables and
> record structure options.
>
> All the STDOUTs are my debug lines (as well as the main zenity system
> calls) to see what is going on.
Another way to approach this, rather than inserting debug statements
you will later have to remove from code if you're going to use it in
an application, is to follow a technique known as Test Driven
Development. The ruby community has, more than any other I've
encountered, embraced testing as a way of life, and the best practice.
The idea that you write down how you are going to test something helps
tremendously in figuring out what you want the code to do. While
you're experimenting and just trying things out, it can seem like a
bit of a hindrance, yet establishing the habit early can be quite
beneficial.
Essentially, with the TodoItem class, instead of printing out the
debug statements, you could write test code that verified the
behaviour of the methods. There are some great ruby test gems, a lot
of people use RSpec because of the neat way you write tests, but even
a "poor man's" test program is possible, and in just starting out,
maybe more helpful.
In a test script, making a call like:
item = TodoItem.new("1<<>>a new item")
You can then debug/test that item was created successfully, doing
something like:
puts "done = #{item.done}"
puts "action = #{item.action}"
puts "name = #{item.name}"
puts "state is = #{item.state_getter}"
item.state_setter
puts "state is now #{item.state_getter}"
Also, if you haven't, do try out the ruby console, irb. You can
quickly throw ruby expressions like this at it and see what happens.
> Is there a separate forum that you know of for complete Ruby newbies
> like me?
Here is good -- we all learn from each other!
There are lots of great resources out there, but I think interacting
with real people is great way to learn the subtler nuances of things,
such as the each method if you're coming from a standard procedure
programming approach; in learning to use a language, the idioms that
are best used in that language are sometimes not that apparent. That's
where knocking heads with others helps a lot.
I'm also firmly of the belief that you can't *really* master something
unless you can teach it. So do me a favour and stick around. :)
(and, crikey, i'm having fun, too :) )