Other than Nokogiri / hpricot gem available? for Screen scraping - xpath

I tried Nokogiri and hpricot to find the value of xpath. But that's not working how i m expecting (I described my problem in Screen scraping through nokogiri or hpricot). Anyone knows other gems for screen scraping.

Here are some other popular web scraping libraries for ruby:
scRUBYt
Mechanize
Watir

Related

Query Ruby core documentation with ri, then display HTML in web browser?

I want to do the analog of ri Array#join but read it, nicely formatted, in my web browser. I know about ri -f but according to ri --help, HTML is not one of the supported format. This is with ruby 2.4.3 installed with rbenv.

Embed a ruby gosu game to play in a browser

I have played with some gosu tutorials to create a simple gosu game using my mac. I followed the instructions in https://www.libgosu.org/ruby.html
My question is:
Can a gosu game be set up to run on a website using something like https://github.com/opal/opal-browser using a gem "opal"
Opal compiles the game.rb file but does not add gems. So I get an error, cannot find require file.
I want to set up an index.html page and run the game in a web browser with a button that runs bundle exec ruby game.rb instead of running the file from the console.
This question Ruby: Running Gosu game from a web browser may have asked the same thing but my question is around using Google Native Client tools to solve it.

Ruby browser automation

I want to write ruby script which run browser (for example, firefox), open web-addresses, click links, check/uncheck boxes and other stuff. What gem can i use for that?
Selenium / Selenium Ruby is another option and there's Selenium IDE for scripting Firefox.
"It is implemented as a Firefox extension, and allows you to record,
edit, and debug tests."
Check watir and watir_webdriver which is used for automated web browser testing but it can be used for browser scripting from ruby http://watir.com/
you can use the rb-appscript framework to automate macosx
http://appscript.sourceforge.net/rb-appscript/index.html
Its a ruby framework that uses the applescript interfaces to interact with the macos applications.
I'm not sure if there is a gem you can use to install yet but there is are install instructions in the link above.
there is a nice article at http://www.apeth.com/rbappscript/00intro.html that shows how to replace applescript with ruby using rb-appscript
Check out watir, watir-webdriver or firewatir. It's very easy to use especially if you're just starting out. You can check out this quick tutorial on how to set it up, it's extremely easy.
http://webmites.org/watir-automated-tests-for-everyone/

How to display content for a ruby game?

I am wanting to do a game in Ruby, but I came across a problem. I am intermediate level in Ruby. I only know of running Ruby through the command line but to make the game I am thinking of similar to Dwarf Fortress would require something more.
I need to be able to use arrow keys and enter to select things. I also need 2 frames displaying, one for the map and one for in-game information.
How do I go about doing this? Would I need to use a GUI or something to that effect. If it can't be a desktop app, that's fine. I have a vague idea of how I could do it in the browser.
Check out the gosu gem which gives you a 2d game engine from www.libgosu.org
gem install gosu
# complete with examples, precompiled for Windows & OS X
gem install texplay
# pixel-based drawing on Gosu images, by banister
gem install chingu
# a library that adds more game logic, by ippa
gem install ruby-opengl
# the standard Ruby OpenGL gem works fine with Gosu to add 3D effects
# (See the included example, or this fine bundle of tutorials by tjbladez. Also note this thread if you have problems installing on Windows)
gem install chipmunk
# a popular physics library with an integration example in the wiki
gem install rmagick
# can be used as a more powerful but harder-to-distribute alternative to TexPlay, example included in Gosu
How about ruby-gl
http://ruby-opengl.rubyforge.org/

Ruby Shoes and gems with native extensions

Ruby. Shoes. DataMapper.
After an encoding error I get 'failed to build native extensions'.
That happens when I do the Shoes.setup and it tries to fetch and install the gem.
Since Shoes can't be run as a gem is there a different approach?
you're wrong, shoes CAN be run as a gem, you have different flavors (colors) of shoes.
Most people work with Red Shoes but you also have a Green Shoes implementation, i use it always with native extensions. Not all methods from red are available and possibly you have to change your code a little but it should work. Success !

Resources