in a hotcocoa project i have unpack gem in a vendor/gems directory
then i use them as simple library not as gems.
i use this script to load them at boot time :
Dir.glob(File.expand_path("#{NSBundle.mainBundle.resourcePath}/vendor/
gems/*", __FILE__)).each do |gem|
$:.unshift File.join(gem, 'lib')
end
Le 18 avr. 09 à 08:23, Alex Vollmer a écrit :
One question I have is what the proper expectations are for using
Ruby gems within a Macruby application. For example, I wanted to use
the HTTParty gem for some web service processing since it provides a
nice, succinct interface. However the gem won't load in MacRuby
because of an issue with REXML (I can provide details if necessary).
The gem works in 1.9 YARV, so my guess is that it's some difference
in the Ruby REXML classes between MacRuby 0.4 and YARV.
Is the "right" way to do things is to use NSURL and not bother with
gems, or should I file bugs about the issue with REXML? I know
there's a ton of effort going into getting 0.5 out the door, so if
the primary goal of MacRuby is to provide a Ruby language interface
to the Obj-C runtime, fixing defects in the porting effort from YARV
may be of secondary concern.
If it's considered good-form to use gems, then what's the right way
to package gems in an application? The only way I could get it
working was to manipulate the gem_path in the rb_main.rb to point to
a local gems installation (think like vendor/gems in a rails project).
Cheers,
Alex V.
----
Musings & Notes — http://alexvollmer.com
Track what you lend and borrow — http://moochbot.com
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel