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.

rbwebkitgtk.png

To do:

Comments

7 Responses to “Ruby WebKit 2”

  1. Ruby WebKit : Nuclear-Powered Nutcracker on April 13th, 2008 9:34 am

    [...] Update: These bindings are now pretty usable. See here. [...]

  2. Luigi on April 18th, 2008 6:17 am

    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

  3. Philipp on April 23rd, 2008 10:24 am

    Cool,
    thanks that was i was looking for

  4. Philipp on April 23rd, 2008 11:49 am

    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 ..

  5. Daniel on April 24th, 2008 3:26 am

    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. :)

  6. Luca on June 23rd, 2008 3:40 pm

    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

  7. Daniel on June 24th, 2008 8:51 am

    Hmm, do you have webkitgtk installed from here live.gnome.org/WebKitGtk?

Leave a Reply




  • About

    Daniel Lucraft, London, UK. Interested in Ruby, Prolog and software.