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
[...] 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?
Hi,
this is great, thanks very much for the effort!
I’m just having a hard time digging deeper because i can’t find a usable reference text or api docs or something.
Is there such thing available?
For instance, i wonder
- how to access the ‘page’ or ‘frame’ object of a WebView
(they are passed in some signal handlers, but can they be fetched from the WebView object?)
- how to handle something like ctrl+click or middle-click to open page in new window/tab
(signal navigation_requested might be a way, but it always breaks)
Makefile and etxconf.rb should be updated.
change name to webkit-1.0 and include path to webkit-1.0/webkit