Comments for scRUBYt! http://scrubyt.org/blog WWW::Mechanize and Hpricot on Steroids Wed, 10 Mar 2010 08:04:39 +0000 http://wordpress.org/?v=2.6.2 Comment on Really Getting scRUBYt! up and Running on Ubuntu by graham http://scrubyt.org/blog/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35212 graham Sat, 13 Feb 2010 17:20:15 +0000 http://scrubyt.org/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35212 <p>I had a problem with my other machine after following the above instructions and after answering yes and ok to all the questions:</p> <p>added the following line to /etc/apt/sources.list deb http://cz.archive.ubuntu.com/ubuntu karmic main universe</p> <p>sudo apt-get update</p> <p>sudo apt-get install build-essential ruby-full rubygems libxml-ruby libxslt1.1 libxslt1-dev libxslt-ruby libxml2 libxml2-dev</p> <p>sudo gem install rack rubyforge rake hoe sinatra nokogiri user-choices xml-simple s4t-utils builder commonwatir activesupport hpricot mechanize firewatir</p> <p>sudo gem install scrubyt</p> <p>I then restarted the computer (i don't know why, maybe a Windows habit)</p> <p>then sudo gem uninstall hpricot mechanize</p> <p>sudo gem install hpricot -v=0.6.164</p> <p>sudo gem install mechanize -v=0.8.5 </p> <p>finished</p> <p>But i got a problem with one of my scripts:</p> <p>/usr/local/lib/site<em>ruby/1.8/rubygems/custom</em>require.rb:31:in `gem<em>original</em>require': no such file to load -- firewatir (LoadError)</p> <p>so I tried installing firewatir again, sudo gem install firewatir ERROR: Error installing firewatir: gemcutter requires RubyGems version >= 1.3.5</p> <p>which lead me to updating rubygems, sudo gem install rubygems-update</p> <p>sudo update_rubygems</p> <p>All sorted! everything's working fine.</p> I had a problem with my other machine after following the above instructions and after answering yes and ok to all the questions:

added the following line to /etc/apt/sources.list
deb http://cz.archive.ubuntu.com/ubuntu karmic main universe

sudo apt-get update

sudo apt-get install build-essential ruby-full rubygems libxml-ruby libxslt1.1 libxslt1-dev libxslt-ruby libxml2 libxml2-dev

sudo gem install rack rubyforge rake hoe sinatra nokogiri user-choices xml-simple s4t-utils builder commonwatir activesupport hpricot mechanize firewatir

sudo gem install scrubyt

I then restarted the computer (i don’t know why, maybe a Windows habit)

then
sudo gem uninstall hpricot mechanize

sudo gem install hpricot -v=0.6.164

sudo gem install mechanize -v=0.8.5

finished

But i got a problem with one of my scripts:

/usr/local/lib/siteruby/1.8/rubygems/customrequire.rb:31:in `gemoriginalrequire’: no such file to load — firewatir (LoadError)

so I tried installing firewatir again,
sudo gem install firewatir
ERROR: Error installing firewatir:
gemcutter requires RubyGems version >= 1.3.5

which lead me to updating rubygems,
sudo gem install rubygems-update

sudo update_rubygems

All sorted! everything’s working fine.

]]>
Comment on Really Getting scRUBYt! up and Running on Ubuntu by graham http://scrubyt.org/blog/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35211 graham Fri, 12 Feb 2010 22:22:35 +0000 http://scrubyt.org/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35211 <p>Some of my scripts worked but I had a problem with one script, it gave the following error:</p> <p>/var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:178:in <code>fill_textfield': undefined method</code>[]=' for nil:NilClass (NoMethodError)</p> <p>I had to do the following to fix the problem,</p> <p>gem uninstall hpricot mechanize</p> <p>gem install hpricot -v=0.6.164</p> <p>gem install mechanize -v=0.8.5 </p> <p>This solved the problem.</p> Some of my scripts worked but I had a problem with one script, it gave the following error:

/var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:178:in fill_textfield': undefined method[]=’ for nil:NilClass (NoMethodError)

I had to do the following to fix the problem,

gem uninstall hpricot mechanize

gem install hpricot -v=0.6.164

gem install mechanize -v=0.8.5

This solved the problem.

]]>
Comment on Really Getting scRUBYt! up and Running on Ubuntu by graham http://scrubyt.org/blog/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35210 graham Fri, 12 Feb 2010 19:43:31 +0000 http://scrubyt.org/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35210 <p>The link to "standard installation" seems to be broken anyway. So I tried to look for different instructions on google.</p> <p>Ended up adding, deb http://cz.archive.ubuntu.com/ubuntu karmic main universe</p> <p>to the /etc/apt/sources.list file.</p> <p>Did an update,</p> <p>sudo apt-get update</p> <p>Then I did the following,</p> <p>sudo apt-get install build-essential ruby-full rubygems libxml-ruby libxslt1.1 libxslt1-dev libxslt-ruby libxml2 libxml2-dev</p> <p>then,</p> <p>sudo gem install rack rubyforge rake hoe sinatra nokogiri user-choices xml-simple s4t-utils builder commonwatir activesupport hpricot mechanize firewatir</p> <p>then finally,</p> <p>sudo gem install scrubyt</p> <p>That was it, it worked.</p> The link to “standard installation” seems to be broken anyway. So I tried to look for different instructions on google.

Ended up adding,
deb http://cz.archive.ubuntu.com/ubuntu karmic main universe

to the /etc/apt/sources.list file.

Did an update,

sudo apt-get update

Then I did the following,

sudo apt-get install build-essential ruby-full rubygems libxml-ruby libxslt1.1 libxslt1-dev libxslt-ruby libxml2 libxml2-dev

then,

sudo gem install rack rubyforge rake hoe sinatra nokogiri user-choices xml-simple s4t-utils builder commonwatir activesupport hpricot mechanize firewatir

then finally,

sudo gem install scrubyt

That was it, it worked.

]]>
Comment on Really Getting scRUBYt! up and Running on Ubuntu by graham http://scrubyt.org/blog/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35209 graham Fri, 12 Feb 2010 17:31:03 +0000 http://scrubyt.org/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35209 <p>Removed ri from the list and i get,</p> <p>:~$ sudo apt-get install build-essential ruby ruby1.8-dev libopenssl-ruby1.8 Reading package lists... Done Building dependency tree Reading state information... Done Package libopenssl-ruby1.8 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package libopenssl-ruby1.8 has no installation candidate</p> Removed ri from the list and i get,

:~$ sudo apt-get install build-essential ruby ruby1.8-dev libopenssl-ruby1.8
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package libopenssl-ruby1.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libopenssl-ruby1.8 has no installation candidate

]]>
Comment on Really Getting scRUBYt! up and Running on Ubuntu by graham http://scrubyt.org/blog/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35208 graham Fri, 12 Feb 2010 17:24:14 +0000 http://scrubyt.org/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35208 <p>still having the same problem after uncommenting all the lines in /etc/apt/sources.list</p> <p>Put the comments back on and am back to square one,</p> <p>:~$ sudo apt-get install build-essential ruby ri ruby1.8-dev libopenssl-ruby1.8 Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package ri</p> still having the same problem after uncommenting all the lines in /etc/apt/sources.list

Put the comments back on and am back to square one,

:~$ sudo apt-get install build-essential ruby ri ruby1.8-dev libopenssl-ruby1.8
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Couldn’t find package ri

]]>
Comment on Really Getting scRUBYt! up and Running on Ubuntu by graham http://scrubyt.org/blog/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35207 graham Fri, 12 Feb 2010 17:14:34 +0000 http://scrubyt.org/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35207 <p>I uncommented the following lines from /etc/apt/sources.list</p> <p>deb http://gb.archive.ubuntu.com/ubuntu/ dapper universe deb-src http://gb.archive.ubuntu.com/ubuntu/ dapper universe</p> <p>and ran an update</p> <p>:~$ sudo apt-get update</p> <p>Then did this again,</p> <p>:~$ sudo apt-get install build-essential ruby ri ruby1.8-dev libopenssl-ruby1.8</p> <p>But got another problem,</p> <p>Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:</p> <p>The following packages have unmet dependencies. libopenssl-ruby1.8: Depends: libruby1.8 (>= 1.8.4) but it is not going to be installed ri: Depends: ri1.8 but it is not going to be installed ruby: Depends: ruby1.8 but it is not going to be installed ruby1.8-dev: Depends: libruby1.8 (= 1.8.6.111-2ubuntu1.3) but it is not going to be installed E: Broken packages</p> I uncommented the following lines from /etc/apt/sources.list

deb http://gb.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ dapper universe

and ran an update

:~$ sudo apt-get update

Then did this again,

:~$ sudo apt-get install build-essential ruby ri ruby1.8-dev libopenssl-ruby1.8

But got another problem,

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
libopenssl-ruby1.8: Depends: libruby1.8 (>= 1.8.4) but it is not going to be installed
ri: Depends: ri1.8 but it is not going to be installed
ruby: Depends: ruby1.8 but it is not going to be installed
ruby1.8-dev: Depends: libruby1.8 (= 1.8.6.111-2ubuntu1.3) but it is not going to be installed
E: Broken packages

]]>
Comment on Really Getting scRUBYt! up and Running on Ubuntu by graham http://scrubyt.org/blog/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35206 graham Fri, 12 Feb 2010 16:56:12 +0000 http://scrubyt.org/really-getting-scrubyt-up-and-running-on-ubuntu/#comment-35206 <p>I am running ubuntu 8.04 LTS, I tried it and had a problem on the first step.</p> <p>:~$ sudo apt-get install build-essential ruby ri rdoc ruby1.8-dev libopenssl-ruby1.8</p> <p>Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package ri</p> I am running ubuntu 8.04 LTS, I tried it and had a problem on the first step.

:~$ sudo apt-get install build-essential ruby ri rdoc ruby1.8-dev libopenssl-ruby1.8

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Couldn’t find package ri

]]>
Comment on Your First Extractor by lishali http://scrubyt.org/blog/your-first-extractor/#comment-35202 lishali Wed, 23 Dec 2009 15:07:02 +0000 http://scrubyt.org/your-first-extractor/#comment-35202 <p>Hi, I installed the scRUBYt! today.And then I run the example which you give in the page "http://github.com/scrubber/scrubyt_examples/blob/master/ebay.rb". And my OS is Ubuntu 9.10- the Karmic Koala My Firefox's version is 3.5.5,which installed the DOM Inspector 2.0.4 and the XPather 1.4.3.</p> <p>The error's detail is following: sali@sali-laptop:~/NetBeansProjects/PDF7/lishali<em>pdfg/PDF7/lib$ ruby ebay.rb /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:234:in <code>find_form_based_on_tag': undefined method</code>attributes' for nil:NilClass (NoMethodError) from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:232:in <code>each' from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:232:in</code>find</em>form<em>based</em>on<em>tag' from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:225:in <code>lookup_form_for_tag' from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:177:in</code>fill</em>textfield' from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/navigation<em>actions.rb:27:in <code>fill_textfield' from ebay.rb:7 from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:75:in</code>instance</em>eval' from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:75:in <code>initialize' from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in</code>new' from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in `define' from ebay.rb:4</p> <p>Thank you!</p> Hi,
I installed the scRUBYt! today.And then I run the example which you give in the page “http://github.com/scrubber/scrubyt_examples/blob/master/ebay.rb”.
And my OS is Ubuntu 9.10- the Karmic Koala
My Firefox’s version is 3.5.5,which installed the DOM Inspector 2.0.4 and the XPather 1.4.3.

The error’s detail is following:
sali@sali-laptop:~/NetBeansProjects/PDF7/lishalipdfg/PDF7/lib$ ruby ebay.rb
/var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:234:in find_form_based_on_tag': undefined methodattributes’ for nil:NilClass (NoMethodError)
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:232:in each'
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:232:in
find
formbasedontag’
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:225:in lookup_form_for_tag'
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:177:in
fill
textfield’
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/navigationactions.rb:27:in fill_textfield'
from ebay.rb:7
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:75:in
instance
eval’
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:75:in initialize'
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in
new’
from /var/lib/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/core/shared/extractor.rb:32:in `define’
from ebay.rb:4

Thank you!

]]>
Comment on Using Different Types of Examples by donaldjeo http://scrubyt.org/blog/using-different-types-of-examples/#comment-35201 donaldjeo Wed, 23 Dec 2009 06:50:10 +0000 http://scrubyt.org/using-different-types-of-examples/#comment-35201 <p>Thanks for sharing information. its really nice and mean full. I want to write more but these days I am doing preparation of different online certifications and I found <a href="http://www.ciscobraindumps.com" rel="nofollow">cisco training</a> guide is the best helping source which is providing 100% authentic material. I also spend my extra time in surfing internet, listening music and playing games. After my exams I would like to join your group.</p> Thanks for sharing information. its really nice and mean full. I want to write more but these days I am doing preparation of different online certifications and I found cisco training guide is the best helping source which is providing 100% authentic material. I also spend my extra time in surfing internet, listening music and playing games. After my exams I would like to join your group.

]]>
Comment on scRUBYt! gem on Github by Eric http://scrubyt.org/blog/scrubyt-gem-on-github/#comment-35199 Eric Wed, 04 Nov 2009 08:49:01 +0000 http://scrubyt.org/blog/?p=101#comment-35199 <p>In the google.rb example I have to install also the firewatir gem. In the newest Version on github also?</p> <p>eric</p> In the google.rb example I have to install also the firewatir gem.
In the newest Version on github also?

eric

]]>