[#368826] ANN: home_run 0.9.1 Released — Jeremy Evans <code@...>

= home_run

14 messages 2010/09/01

[#368894] uninitialized constant NArray (Name Error) — Abder-Rahman Ali <abder.rahman.ali@...>

Following section (2) here:

12 messages 2010/09/02

[#368914] p vs. print — Abder-Rahman Ali <abder.rahman.ali@...>

I wrote the following scripts from section (2) here:

24 messages 2010/09/02
[#368915] Re: p vs. print — Alex Stahl <astahl@...5.com> 2010/09/02

Ruby uses "puts", not "print". "p" is short for "puts".

[#368977] Read cookie — Pål Bergström <pal@...>

How can I get the value of a browser cookie with Ruby?

29 messages 2010/09/03
[#368978] Re: Read cookie — Brian Candler <b.candler@...> 2010/09/03

P奪l Bergstr旦m wrote:

[#368984] Re: Read cookie — Pål Bergström <pal@...> 2010/09/03

Brian Candler wrote:

[#369036] ruby_archive 0.1.0 released — Jonathan Nielsen <jonathan@...>

After a summer of working on various ways to implement it, I'm happy to

10 messages 2010/09/03

[#369106] A better idiomatic way of doing this?! — Tim Romberg <tim.jakobsson@...>

Hi Im new at Ruby and been struggling with this lab I have for a course

12 messages 2010/09/05

[#369113] unable to open X server `' (Magick::ImageMagickError) — Abder-Rahman Ali <abder.rahman.ali@...>

I have written a Ruby script "dicom_info.rb", and when I try running

16 messages 2010/09/06
[#369119] Re: unable to open X server `' (Magick::ImageMagickError) — Brian Candler <B.Candler@...> 2010/09/06

On Mon, Sep 06, 2010 at 12:42:11PM +0900, Abder-Rahman Ali wrote:

[#369132] Re: unable to open X server `' (Magick::ImageMagickError) — Abder-Rahman Ali <abder.rahman.ali@...> 2010/09/06

Thanks a lot Brian.

[#369139] Re: unable to open X server `' (Magick::ImageMagickError) — Brian Candler <B.Candler@...> 2010/09/06

On Mon, Sep 06, 2010 at 11:55:32PM +0900, Abder-Rahman Ali wrote:

[#369140] Re: unable to open X server `' (Magick::ImageMagickError) — Abder-Rahman Ali <abder.rahman.ali@...> 2010/09/06

So, do you suggest installing "cygwin"?

[#369159] Re: unable to open X server `' (Magick::ImageMagickError) — Roger Pack <rogerpack2005@...> 2010/09/06

> you suggest installing "cygwin"?

[#369124] Odd functional programming question — Peter Hickman <peterhickman386@...>

Ok this is probably not really functional programming but I was just

10 messages 2010/09/06

[#369169] How do I request a HTTPS page? — Samuel Sternhagen <samatoms@...>

I would like to access a https page from irb

14 messages 2010/09/06

[#369226] What OS do you use for Ruby development? — Nick Hird <nrhird@...>

I don't want to start any OS wars. I was just curious as to what OS

67 messages 2010/09/07

[#369301] Nokogiri and LibXML — unbewusst.sein@... (Une B騅ue)

Each time i launch a script using Nokogiri i get :

12 messages 2010/09/08

[#369302] Receiving array naturally? — Terry Michaels <spare@...>

As I learn Ruby, I find a lot of flexibility in the syntax. I was

14 messages 2010/09/08

[#369389] Key Associated w/ Maximum Value in Hash — Timothy Baron <timothy.baron@...>

Simple question: what's the cleanest way to retrieve a key associated

11 messages 2010/09/09

[#369477] How to do foo.chomp!.rstrip!.downcase! ? — Geometric Patterns <geometric.patterns@...>

15 messages 2010/09/10

[#369623] Ruby packaging in Debian and Ubuntu: Mythbusting and FAQ — Lucas Nussbaum <lucas@...>

Hi,

11 messages 2010/09/12

[#369638] Declarative relations between object attributes — Knut Franke <knut.franke@...>

Some time ago I stumbled over Cells[1], a Common Lisp extension allowing

16 messages 2010/09/12

[#369710] Encoding error while installing rails on ruby 1.9.2 — Bek Bek <bekis3@...>

Hello everybody,

11 messages 2010/09/14

[#369796] Ruby Multi-threading? — Terry Michaels <spare@...>

I read a Ruby e-book recently that indicated that although Ruby has

12 messages 2010/09/15

[#369952] Developing for Ruby on Windows? — Tom Wardrop <tom@...>

I've heard a lot of criticism about developing for Ruby on Windows, but

11 messages 2010/09/17

[#370039] Ruby-based data language — Intransition <transfire@...>

Has anyone ever endeavored to create a data/configuration file format

14 messages 2010/09/19

[#370053] Getting GUI for ruby for Linux running (QT or wxWidget)? — Markus Fischer <markus@...>

Hi,

23 messages 2010/09/19
[#370054] Re: Getting GUI for ruby for Linux running (QT or wxWidget)? — Markus Fischer <markus@...> 2010/09/19

On 20.09.2010 01:14, Markus Fischer wrote:

[#370116] Re: Getting GUI for ruby for Linux running (QT or wxWidget)? — Quintus <sutniuq@...> 2010/09/20

-----BEGIN PGP SIGNED MESSAGE-----

[#370164] Re: Getting GUI for ruby for Linux running (QT or wxWidget)? — Ryan Melton <ryanmelt@...> 2010/09/21

qt does have a new gem I put together:

[#370205] QT works! (was: Re: Getting GUI for ruby for Linux running (QT or wxWidget)) — Markus Fischer <markus@...> 2010/09/21

Hi,

[#370127] An elegant way... — "F. Senault" <fred@...>

Hello everybody.

23 messages 2010/09/20

[#370210] The Great Ruby GUI Toolkit Roundup — Ed Howland <ed.howland@...>

Hi,

15 messages 2010/09/21

[#370257] having problems with open4 and stuck forked processes — Tim Uckun <timuckun@...>

I am running a batch process which uses the wkhtmltoimage-i386 binary

13 messages 2010/09/22
[#370268] Re: having problems with open4 and stuck forked processes — Robert Klemme <shortcutter@...> 2010/09/22

On Wed, Sep 22, 2010 at 2:31 PM, Tim Uckun <timuckun@gmail.com> wrote:

[#370294] Re: having problems with open4 and stuck forked processes — Tim Uckun <timuckun@...> 2010/09/22

> What do you mean by that? =C2=A0Goes the timeout undetected? =C2=A0Can't =

[#370309] Re: having problems with open4 and stuck forked processes — Robert Klemme <shortcutter@...> 2010/09/23

On 23.09.2010 01:59, Tim Uckun wrote:

[#370289] Sorting problem with an Array of Arrays — Paul <tester.paul@...>

Hi there, I have an array of arrays that looks like the following:

15 messages 2010/09/22

[#370296] Ruby Installation Error — Tridib Bandopadhyay <tridib04@...>

I am trying this command to build the ruby interpreter

20 messages 2010/09/23
[#370689] Re: Ruby Installation Error — Brian Candler <b.candler@...> 2010/09/29

Tridib Bandopadhyay wrote:

[#370319] to make dot method dot method work? — Pen Ttt <myocean135@...>

here is the class

14 messages 2010/09/23

[#370373] how do i force ruby to release memory — Amit Tomar <amittomer25@...>

Hi all,

19 messages 2010/09/24
[#370374] Re: how do i force ruby to release memory — Robert Klemme <shortcutter@...> 2010/09/24

On Fri, Sep 24, 2010 at 7:36 AM, Amit Tomar <amittomer25@yahoo.com> wrote:

[#370379] Re: how do i force ruby to release memory — Amit Tomar <amittomer25@...> 2010/09/24

Robert Klemme wrote:

[#370380] Re: how do i force ruby to release memory — Jes俍 Gabriel y Gal疣 <jgabrielygalan@...> 2010/09/24

On Fri, Sep 24, 2010 at 10:31 AM, Amit Tomar <amittomer25@yahoo.com> wrote:

[#370383] Re: how do i force ruby to release memory — Amit Tomar <amittomer25@...> 2010/09/24

Jes炭s Gabriel y Gal叩n wrote:

[#370388] How to delete the browser cache through ruby — Arihan Sinha <arihan_sinha@...>

Hi All,

11 messages 2010/09/24

[#370590] Point me to help w/ multithreading in 1.9.2-p0 — Alex Stahl <astahl@...5.com>

Hi Folks - A week or two ago, I pinged this list for recommendations on

11 messages 2010/09/28
[#370593] Re: Point me to help w/ multithreading in 1.9.2-p0 — Alex Stahl <astahl@...5.com> 2010/09/28

Nevermind... figured it out.

[#370640] puts and return — Jim Haungs <jhaungs@...>

10.times do |i|

14 messages 2010/09/28

[#370661] Color sequences in ri on Windows — Eric Christopherson <echristopherson@...>

After installing some gems, the system recommended that I refresh ri

11 messages 2010/09/28

[#370721] The beauty of Ruby through examples — Adriano Ferreira <adrfer@...>

Hey all,

33 messages 2010/09/29

[#370740] Can't upgrade ruby on Snow Leopard — Ast Jay <azzzz@...>

I've followed the instructions here:

13 messages 2010/09/29

[#370796] How to prevent overwriting methods by accident? — Stefan Salewski <mail@...>

In Ruby we can add new methods to existing classes.

13 messages 2010/09/30
[#370797] Re: How to prevent overwriting methods by accident? — Jeremy Bopp <jeremy@...> 2010/09/30

On 9/30/2010 2:15 PM, Stefan Salewski wrote:

[#370800] Re: How to prevent overwriting methods by accident? — Alex Stahl <astahl@...5.com> 2010/09/30

But is there a way to call the original method instead of just quitting

Re: Problem connecting to hotmail using the pony gem (now using hotmailer)

From: Jen <fluffy_bunny_1988@...>
Date: 2010-09-29 05:29:01 UTC
List: ruby-talk #370682
Hi Josh,

I can't see your message. Could you please send it again?

Thanks,
Jen.


On 26/09/10 18:48, Josh Cheek wrote:
> On Sun, Sep 26, 2010 at 3:09 AM, Jen<fluffy_bunny_1988@hotmail.co.uk>wrote:
>
>    
>> Hi,
>>
>> I found the 'hotmailer' gem, but when I try to use it I get an error saying
>> the "login" method is unknown. I've looked at the gem code and it looks like
>> I'm calling the correct method. Can someone please tell me what I'm doing
>> wrong :(
>>
>> Here is the code I used to test the gem:
>>
>>     require "rubygems"
>>     require "hotmailer"
>>     #create object and login
>>     jen = Hotmailer.new("my_email_address@hotmail.co.uk","my_password")
>>     puts jen.inspect
>>     jen.login()
>>
>> Here is the error I receive:
>>
>>     /var/lib/gems/1.8/gems/hotmailer-1.0.1/lib/hotmailer.rb:24:in `login':
>> undefined method `login=' for     nil:NilClass (NoMethodError)
>>         from hotmailertest.rb:6
>>
>> The README for the hotmailer gem is located here:
>>
>>   http://rubydoc.info/gems/hotmailer/1.0.1/frames
>>
>> Thanks in advance for any suggestions,
>> Jen.
>>
>>
>> On 08/09/10 18:47, Alex Stahl wrote:
>>
>>      
>>> Hi Jen - Not too long ago I was involved w/ some code to do exactly this
>>> - connect to hotmail.  Can't say that I know the solution that my
>>> colleague developed before he left, but I do know that hotmail uses a
>>> fair amount of ajax (or whatever M$ calls it).  That implies that it's
>>> not as simple as sending an http request - there's some processing on
>>> the login page that needs to happen first.
>>>
>>> My next step in inheriting the work is to try to figure out how to parse
>>> the javascript from ruby to send the proper request.  Looking at either
>>> the harmony or rkelly gems to do so.  They might be suitable for what
>>> you're trying as well.
>>>
>>> -Alex
>>>
>>> On Tue, 2010-09-07 at 23:46 -0500, Jen wrote:
>>>
>>>
>>>        
>>>> Hello,
>>>>
>>>> I have only just started seariously playing with Ruby.
>>>> I have a script that needs to e-mail data it has gathered to a specific
>>>> address. I want to use my hotmail account to send out the e-mail until I
>>>> sort my own mail server, but can't connect using pony.
>>>>
>>>> my code is:
>>>>
>>>>       Pony.mail(:to =>   "Myaddress@hotmail.co.uk", :from =>
>>>> "Myaddress@hotmail.co.uk", :via =>   :smtp,
>>>> :smtp =>   {:host =>   "smtp.live.com", :port =>   "25", :tls =>   true,
>>>> :user
>>>> =>   "fMyUserName",
>>>> :password =>   "MyPassword", :auth =>   :plain,
>>>> #:login, :cram_md5,
>>>> :domain =>   "localhost:chicken"}, :subject =>   "Optelec tweets", :body =>
>>>> "This is a test")
>>>>
>>>> I am trying to send the email to myself to check if I can receive it.
>>>> Does it matter that the 'from' and 'to' addresses are the same.
>>>> When I run this (with the correct username and password) the connection
>>>> times out.
>>>> Uncommenting the commented line above gives errors when running, and I
>>>> think this line is actually gmail specific.
>>>>
>>>> If there is a better way of doing this please let me know.
>>>>
>>>> Regards,
>>>> Jen.
>>>>
>>>>
>>>>          
>>>
>>>
>>>
>>>
>>>
>>>        
>>
>>
>>      
> Honestly, I don't think this hotmailer gem is going to work. Its last
> release was December 2006. It also requires Mechanize, and Mechanize has
> changed quite a bit since then. If you knew what version of mechanize it
> wanted, you could download the correct version, but it doesn't say, and I
> can see that some of its use is not correct any more. For example, the class
> is declared as "class Hotmailer<  WWW::Mechanize" but using the WWW
> namespace is deprecated.
>
>
> Its initialize method is:
>
> def initialize(username,passwd)
>    super()
>    self.user_agent_alias  = "Windows IE 6"
>    @username = username
>    @passwd = passwd
>    @inbox = ''
>    @contacts = []
>    @messages = []
> end
>
>
> I don't know if setting it to "Windows IE 6" is a problem or not, but it
> seems quite improbable that you are using IE 6.
>
> Here is where the problem you are running into is coming from:
>
>
> def login
> #Logs in the user
>    first_page = self.get('http://hotmail.com')
>    login_form = first_page.form('f1')
>    login_form.login = self.username
>    login_form.passwd = self.passwd
> ...
>
> You see it gets the page at hotmail.com. Then it tries to fill out the form
> 'f1'. Looking at the hotmail page, it appears the form is still named 'f1',
> but this method is returning nil (which is why login_form.login raises a no
> method error -- because nil does not have a login method).  I expect that
> this returns nil because you aren't using the same version of Mechanize as
> this was written with.
>
> Here are the versions of mechanize
> http://rubygems.org/gems/mechanize/versions You might scroll down to find
> the ones that were released prior to Dec 2006 (when the hotmailer gem was
> released). Then you can start installing old versions (gem install -v
> 0.6.3), and in the hotmailer gem, where it requires mechanize, tell it which
> one you want to use.
>
> I'm not really sure how to tell it which one you want, I think you just
> replace (require 'mechanize') with (gem 'mechanize', '=0.6.3')
>
> Anyway, if that still doesn't work, theres only about 250 lines of code in
> that gem, you can possibly sit down with for a while and get it fixed. Or,
> find a gem that works better. This one manually logs into the site using its
> web interface. This is a fun idea, but will break any time hotmail changes
> anything your gem relies on. There are a number of gems related to sending
> email, and I know Rails just got a new one for Rails 3, probably your best
> bet will be to check one of them out.
>
>    


In This Thread