Ruby WebKit 2
The Ruby-WebKitGtk bindings are usable. Clone them:
git clone git://github.com/danlucraft/rbwebkitgtk.git
or download them. I’m using the WebKit nightly r31823, YMMV. Build instructions for WebKitGtk are here.

To do:
- Finish the methods on WebView.
WebHistoryListWebHistoryItem
Comments
7 Responses to “Ruby WebKit 2”
Leave a Reply
[...] Update: These bindings are now pretty usable. See here. [...]
Hi, do you think is possible to use Ruby-WebKitGtk to embed Google Maps?
I’d like to get the coordinates from the position the user selects on the map.
http://grigio.org/xmp_manager
Cool,
thanks that was i was looking for
anyone a idea how do u get a swf to run with webkit ? possible to install adobe flash plugin ?
if i open a swf i see only some binary code ..
Philipp: ultimately it should possible to do that since WebKit itself must have a way. I should ask at the WebKitGTK project since the Ruby bindings will probably not play a part in that.
Luigi: I’m not sure exactly what you mean. The WebKit bindings allow you to write a browser in Ruby, essentially.
If you embed Google Maps onto your own website you can direct the user of the Ruby/Webkit browser to that site, of course.
Alternatively if you direct the user to the official Google Maps site, you should still be able to get the information you need out of the browser by using the ‘execute_script’ to execute a bit of JavaScript that can figure out where the current location is. Not sure if Google Maps makes it easy for you though. :)
Hi, I’m on Ubuntu hardy, I did:
export RG2_DIR=/usr/lib/ruby/1.8/gtk2/
…
But I get:
$ irb
irb(main):001:0> require ‘webkit’
LoadError: libwebkit-1.0.so.1: impossibile aprire il file oggetto condiviso: Nessun file o directory - /usr/local/lib/site_ruby/1.8/i486-linux/rbwebkitgtk.so
from /usr/local/lib/site_ruby/1.8/i486-linux/rbwebkitgtk.so
from /usr/local/lib/site_ruby/1.8/webkit.rb:7
from (irb):1:in `require’
from (irb):1
from :0
Hmm, do you have webkitgtk installed from here live.gnome.org/WebKitGtk?