[MacRuby-devel] mechanize and macgems

Conrad Taylor conradwt at gmail.com
Sun Dec 27 00:34:00 PST 2009


Jarred, after further analysis in regards to installing an earlier version
of the Mechanize gem (i.e. 0.8.5), it has a couple of runtime dependencies:

hpricot >= 0.5.0, Note:  This gem contains C Ruby native extensions.

hoe      >= 1.8.2, Note:  This gem contains pure Ruby code.

Thus, you'll still have issues installing earlier version of Mechanize gem
like version 0.8.5 because it depends on a gem which has C Ruby native
extensions.  I have been reading many threads on moving away from using C
Ruby extensions to using FFI which allows any client that supports FFI to
easily connect to native librarie(s).  The benefit would be to allow one to
do the following:

For example, using Nokogiri as an example:

a)  build a Nokogiri interface and push the sources to github.com
b)  push the Nokogiri library sources to
     1)  to MacPorts, Linux distros, and so
     2)  to github.com

BTW, this is very similar to what we need to do today to interact with
MySQL, PostgreSQL, and SQLite3 relational databases from Ruby.  However,
Ruby FFI makes this process much easier.  Lastly, you can read more about
FFI here:

http://mwrc2009.confreaks.com/13-mar-2009-16-10-ffi-jeremy-hinegardner.html
http://wiki.github.com/ffi/ffi
http://www.igvita.com/2009/01/15/bridging-mri-jruby-rubinius-with-ffi/
http://blog.headius.com/2008/10/ffi-for-ruby-now-available.html
http://www.rubyinside.com/ruby-ffi-library-calling-external-libraries-now-easier-1293.html

Good luck,

-Conrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20091227/2bbc5ab4/attachment.html>


More information about the MacRuby-devel mailing list