hi,
 
I want to install Rails but it give an error. I have already installed ruby with rubygems.

[EMAIL PROTECTED] wrote:
Send Wtr-general mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Wtr-general digest..."


Today's Topics:

1. Re: xpath support doesn't work for me (Angrez Singh)
2. Negative Loop Regular _expression_ checks (Paul Carvalho)
3. Re: Negative Loop Regular _expression_ checks (Pierre Garigue)
4. Re: Negative Loop Regular _expression_ checks (Paul Carvalho)
5. Re: Negative Loop Regular _expression_ checks (Pierre Garigue)
6. Re: xpath support doesn't work for me (Bret Pettichord)


----------------------------------------------------------------------

Message: 1
Date: Thu, 9 Mar 2006 22:18:24 +0530
From: "Angrez Singh" <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] xpath support doesn't work for me
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Hi Chris,

I am still not able to locate the cause of error. Lets make sure that these
things are in place:

1. You should have new 'elements.rb' & 'functions.rb' copied from tar ball
to [ruby installation directory]/lib/ruby/1.8/rexml. This is the correct
folder where you should have elements.rb & functions.rb.

2. You have latest version of watir installed using install.rb not by using
watir_installer.exe

Let me know if you still face any problem.

Regards,
Angrez

On 3/9/06, Brown, Christopher < [EMAIL PROTECTED]> wrote:
>
> Hi Angrez,
>
> I haven't been able to spend time on this recently. As you can see from
> the details below my setup should be okay
>
> C:\>ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM'
> ruby 1.8.2 (2004-12-25) [i386-mswin32]
> "3.1.2.1"
> "i386-mswin32"
>
> Given the following error
>
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1922:in `elements_by_xpath':
> undefined method `elements' for nil:NilClass (NoMethodError)
> from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1912:in
> `element_by_xpath'
> from G:/workspace/web_pages/trial.rb:3
>
> This is what's in watir.rb at line 1922
>
> def elements_by_xpath(xpath)
> doc = rexml_document_object()
> modifiedXpath = ""
> selectedElements = Array.new
> => doc.elements.each(xpath) do |element| <= line 1922
> modifiedXpath = element.xpath
> temp = element_by_absolute_xpath(modifiedXpath)
> selectedElements << temp if temp != nil
> end
>
> element.rb seems to be the missing link. I've tried this file in several
> locations
>
> C:\ruby\lib\ruby\1.8\rexml
> C:\ruby\lib\ruby\1.8\watir\rexml C:\ruby\lib\ruby\site_ruby\1.8\rexml
> C:\ruby\lib\ruby\site_ruby\1.8\watir\rexml
>
> I've read the code and see where rexml/document gets loaded. If
> create_rexml_document_object does its thing then how can the elements be
> missing?
>
> Any ideas?
>
> Regards
>
> Chris
>
> p.s.
>
> I've just tried v 1.8.4 of Ruby and get t! he following
>
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1755: [BUG] Segmentation fault
> ruby 1.8.4 (2005-12-24) [i386-mswin32]
>
>
> abnormal program termination
>
>
> -----Original Message-----
> *From: * Angrez Singh [mailto:[EMAIL PROTECTED]
> *Sent:* Friday, March 03, 2006 4:30 PM
> *To:* [email protected]
> *Subject:* Re: [Wtr-general] xpath support doesn't work for me
>
> Hi Chris,
>
> What version of Ruby are you running?
> >
>
> I am using Ruby 1.8.2 and latest watir tar ball. Also REXML version is "
> 3.1.2.1". You can check this by using following command:
>
> ruby -vrrexml/rexml -e 'p REXML::Version, PLATFORM'
>
> But still I have no clue of what is going wrong?
>
> Regards,
> Angrez
>
>
>
>
> _______________________________________________
> Wtr-genera! l mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/112be847/attachment-0001.htm

------------------------------

Message: 2
Date: Thu, 9 Mar 2006 11:57:47 -0500
From: "Paul Carvalho" <[EMAIL PROTECTED]>
Subject: [Wtr-general] Negative Loop Regular _expression_ checks
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"

Hello all,

I'm having difficulty programming a negative loop. That is, while something
isn't there, then do this. Here's an example:

I've scripted Watir to randomly select a report, and then when the report
comes up it checks the month of the report. If it's not the month I want, I
have the script click t! he "Previous" link until it finds the report I want.

Here's the code :
----
while $ie.frame('MainWindow').span(:id,
/ReportingPeriodValueLabel/).text != 'Dec 2005'
$ie.frame('MainWindow').link(:text, 'Previous').click
end
----

This works - most of the time. The problem is that if the report happens to
come up on particular page, the label value = 'Jan - Dec 2005' and the check
above *always* fails.

I tried to change the comparison value to a regex but that didn't work.
That is, "while blahblah.text != /Dec 2005/" will be True even when the
label = 'Dec 2005'! (That's no good. I expect it to be false and break out
of the loop.)

I think I'm missing something in the use of regular expressions that I just
don't know yet. (I'm just starting to learn about them - they are *way*
handy.)

Paul.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/a9e59d23/attachment-0001.htm

------------------------------

Message: 3
Date: Thu, 9 Mar 2006 12:32:31 -0500
From: "Pierre Garigue" <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] Negative Loop Regular _expression_ checks
To:
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="UTF-8"

try using an 'until' with the use of =~ /regex/, it will make it clearer

also you may want add more detail to the regex such as it case sensitive? /i makes the regex match case insensitive.

-Pierre Garigue
-----Original Message-----
From: Paul Carvalho [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 09, 2006 11:58 AM
To: [email protected]
Subject: [Wtr-general] Negative Loop Regular _expression_ checks


Hello all,

I'm having difficulty programming a negativ! e loop. That is, while something isn't there, then do this. Here's an example:

I've scripted Watir to randomly select a report, and then when the report comes up it checks the month of the report. If it's not the month I want, I have the script click the "Previous" link until it finds the report I want.

Here's the code :
----
while $ie.frame('MainWindow').span(:id, /ReportingPeriodValueLabel/).text != 'Dec 2005'
$ie.frame('MainWindow').link(:text, 'Previous').click
end
----

This works - most of the time. The problem is that if the report happens to come up on particular page, the label value = 'Jan - Dec 2005' and the check above *always* fails.

I tried to change the comparison value to a regex but that didn't work. That is, "while blahblah.text != /Dec 2005/" will be True even when the label = 'Dec 2005'! (That's no good. I expect it to be false and break out of the loop.)

I think I'm missing something in the use of regular expres! sions that I just don't know yet. (I'm just starting to learn about them - they are *way* handy.)

Paul.



------------------------------

Message: 4
Date: Thu, 9 Mar 2006 13:05:05 -0500
From: "Paul Carvalho" <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] Negative Loop Regular _expression_ checks
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"

On 09/03/06, Pierre Garigue <[EMAIL PROTECTED]>wrote:
>
> try using an 'until' with the use of =~ /regex/, it will make it clearer
>
> also you may want add more detail to the regex such as it case sensitive?
> /i makes the regex match case insensitive.
>
>
Aha! "until"! That is new to my vocabulary. That works perfectly, thanks!

I really love Ruby and Watir! I can't believe how readable and easy the
scripts are. It's almost like pseudo-code, tha! t's how easy it is.

Cheers. Paul.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/32c60ae4/attachment-0001.htm

------------------------------

Message: 5
Date: Thu, 9 Mar 2006 13:24:28 -0500
From: "Pierre Garigue" <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] Negative Loop Regular _expression_ checks
To:
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="UTF-8"

a good little read (part one and two)
http://code.box.sk/newsread.php?newsid=948
Ten Reasons Ruby Is Cool

Cheers
Pierre Garigue
http://www.trug.ca/Main_Page



-----Original Message-----
From: Paul Carvalho [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 09, 2006 1:05 PM
To: [email protected]
Subject: Re: [Wtr-general] Negative Loop Regul! ar _expression_ checks


On 09/03/06, Pierre Garigue <[EMAIL PROTECTED]>wrote:
try using an 'until' with the use of =~ /regex/, it will make it clearer

also you may want add more detail to the regex such as it case sensitive? /i makes the regex match case insensitive.



Aha! "until"! That is new to my vocabulary. That works perfectly, thanks!

I really love Ruby and Watir! I can't believe how readable and easy the scripts are. It's almost like pseudo-code, that's how easy it is.

Cheers. Paul.



------------------------------

Message: 6
Date: Thu, 9 Mar 2006 12:47:04 -0600
From: "Bret Pettichord" <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] xpath support doesn't work for me
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

On 3/9/06, Angrez Singh <[EMAIL PROTECTED]>wrote:
>
! > 2. You have latest version of watir installed using install.rb not by
> using watir_installer.exe
>

Actually install.rb is broken in HEAD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060309/0dc8ef59/attachment.htm

------------------------------

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

End of Wtr-general Digest, Vol 28, Issue 15
*******************************************


Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to