From: Tim P. <he...@ti...> - 2007-07-10 11:26:37
|
Hey all I have been playing with soap4r and for some reason, it works perfectly under ruby 1.8.4, but complains about missing XSD::QName::EMPTY under the apple installed 1.8.2 - i think this is to do with the differences in the REXML implementation. So what I was wondering was if it would be possible to package everything into an app (yes i appreciate this would bloat it some what) including the ruby distribution itself? Has anyone done this and had any luck with it? Cheers Tim |
From: Jon B. <jo...@gm...> - 2007-07-10 11:35:21
|
Pretty good question ... you might want to have a look @ this project maybe: http://www.joyent.com/developers/slingshot/ Inside the code there you will find a "Ruby VM" setup, so I think it's something feasible, I think @ rb_main startup you would need to adjust environment PATH and Ruby LOADPATH $: and you would be set (guessing). - Jon On Jul 10, 2007, at 7:24 AM, Tim Perrett wrote: > Hey all > > I have been playing with soap4r and for some reason, it works > perfectly under ruby 1.8.4, but complains about missing > XSD::QName::EMPTY under the apple installed 1.8.2 - i think this is > to do with the differences in the REXML implementation. So what I was > wondering was if it would be possible to package everything into an > app (yes i appreciate this would bloat it some what) including the > ruby distribution itself? > > Has anyone done this and had any luck with it? > > Cheers > > Tim > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Eloy D. <elo...@gm...> - 2007-07-10 12:27:40
|
Couldn't you instead only bundle the newer version of REXML and only use it if the user has 1.8.2 installed? Cheers, Eloy On 7/10/07, Jon Baer <jo...@gm...> wrote: > > Pretty good question ... you might want to have a look @ this project maybe: > > > http://www.joyent.com/developers/slingshot/ > > Inside the code there you will find a "Ruby VM" setup, so I think it's > something feasible, I think @ rb_main startup you would need to adjust > environment PATH and Ruby LOADPATH $: and you would be set (guessing). > > - Jon > > > On Jul 10, 2007, at 7:24 AM, Tim Perrett wrote: > > Hey all > > I have been playing with soap4r and for some reason, it works > perfectly under ruby 1.8.4, but complains about missing > XSD::QName::EMPTY under the apple installed 1.8.2 - i think this is > to do with the differences in the REXML implementation. So what I was > wondering was if it would be possible to package everything into an > app (yes i appreciate this would bloat it some what) including the > ruby distribution itself? > > Has anyone done this and had any luck with it? > > Cheers > > Tim > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > |
From: Tim P. <he...@ti...> - 2007-07-10 12:44:00
|
Hey Eloy / Jon REXML is part of the standard lib in ruby though - im not sure how you could override that? Slingshot are using somthing called "libruby-static.a" - any ideas what this is? Locomotive also has a self contained ruby environment, but from what I can tell the slingshot implementation is more elegant. Is the libruby-static.a some kind of all in one binary of ruby? They still have the 1.8, site_ruby and gems folders as you would usually have... Cheers Tim On 10 Jul 2007, at 13:27, Eloy Duran wrote: > Couldn't you instead only bundle the newer version of REXML and only > use it if the user has 1.8.2 installed? > > Cheers, > Eloy |
From: Jon B. <jo...@gm...> - 2007-07-10 12:57:50
|
Usually it's whatever comes first in a require call ... [MacBook-Pro:~]$ ruby -e '$:[0] = "/my/new/path/for/rexml/"; puts $:' /my/new/path/for/rexml/ /opt/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.4 /opt/local/lib/ruby/site_ruby /opt/local/lib/ruby/vendor_ruby/1.8 /opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin8.9.4 /opt/local/lib/ruby/vendor_ruby /opt/local/lib/ruby/1.8 /opt/local/lib/ruby/1.8/i686-darwin8.9.4 . I bet that would work. - Jon On Jul 10, 2007, at 8:41 AM, Tim Perrett wrote: > Hey Eloy / Jon > > REXML is part of the standard lib in ruby though - im not sure how > you could override that? > > Slingshot are using somthing called "libruby-static.a" - any ideas > what this is? Locomotive also has a self contained ruby environment, > but from what I can tell the slingshot implementation is more > elegant. Is the libruby-static.a some kind of all in one binary of > ruby? They still have the 1.8, site_ruby and gems folders as you > would usually have... > > Cheers > |
From: Laurent S. <lsa...@ap...> - 2007-07-10 12:48:39
|
On Jul 10, 2007, at 2:41 PM, Tim Perrett wrote: > Hey Eloy / Jon > > REXML is part of the standard lib in ruby though - im not sure how > you could override that? REXML is maybe part of the stdlib but it's a pure Ruby library. I would bet copying the necessary .rb files in your app bundle and prefixing your $: with their path will work for you. Laurent > On 10 Jul 2007, at 13:27, Eloy Duran wrote: > >> Couldn't you instead only bundle the newer version of REXML and only >> use it if the user has 1.8.2 installed? >> >> Cheers, >> Eloy > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Eloy D. <elo...@gm...> - 2007-07-10 12:57:35
|
> REXML is maybe part of the stdlib but it's a pure Ruby library. I > would bet copying the necessary .rb files in your app bundle and > prefixing your $: with their path will work for you. Exactamundo! ;) Eloy |
From: Tim P. <he...@ti...> - 2007-07-10 13:11:24
|
Ok great - sounds good. I know im being dumb here, but I can see how that would work in general terms, but how does it directly apply within an RC app? Its was mentioned earlier in this thread about doing something in the rb_main.rb file? The example Jon posted was using -e option on the ruby command, how do I change my load path within the application? Apologies for what probably seems like a really newbie question! Cheers Tim On 10 Jul 2007, at 13:57, Eloy Duran wrote: >> REXML is maybe part of the stdlib but it's a pure Ruby library. I >> would bet copying the necessary .rb files in your app bundle and >> prefixing your $: with their path will work for you. > > Exactamundo! ;) > > Eloy |
From: Jon B. <jo...@gm...> - 2007-07-10 13:19:13
|
You know what is a good app to check out ... http://infinitenil.com/packrat/ Download it and jump into /Applications/PackRat.app/Contents/ Resources and take a look @ how his "lib" and rb_main.rb are laid out. I found it be pretty helpful, although still not sure if it was all generated by standalonify + if this is the "standard" way to do it. In a nutshell (just remember to load REXML first): COCOA_APP_RESOURCES_DIR = File.dirname(__FILE__) $LOAD_PATH.reject! { |d| d.index(File.dirname (COCOA_APP_RESOURCES_DIR))!=0 } $LOAD_PATH << File.join(COCOA_APP_RESOURCES_DIR,"ThirdParty") $LOAD_PATH << File.join(File.dirname(COCOA_APP_RESOURCES_DIR),"lib") $LOADED_FEATURES << "rubycocoa.bundle" ENV['GEM_HOME'] = ENV['GEM_PATH'] = File.join (COCOA_APP_RESOURCES_DIR,"RubyGems") HTH, - Jon On Jul 10, 2007, at 9:09 AM, Tim Perrett wrote: > Ok great - sounds good. I know im being dumb here, but I can see how > that would work in general terms, but how does it directly apply > within an RC app? Its was mentioned earlier in this thread about > doing something in the rb_main.rb file? > > The example Jon posted was using -e option on the ruby command, how > do I change my load path within the application? Apologies for what > probably seems like a really newbie question! > > Cheers > > Tim > > > On 10 Jul 2007, at 13:57, Eloy Duran wrote: > >>> REXML is maybe part of the stdlib but it's a pure Ruby library. I >>> would bet copying the necessary .rb files in your app bundle and >>> prefixing your $: with their path will work for you. >> >> Exactamundo! ;) >> >> Eloy > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Tim P. <he...@ti...> - 2007-07-10 13:42:12
|
Ok thats interesting - however in his 'lib' dir he has nkf.bundle, stringio.bundle, strscan.bundle - which I dont think you are talking about. There is no such directoy as ./Resources/lib so you must mean ../lib? Looking at the rb_main, those other bits have been added by standalonify - looking in standalonify.rb in the src, you can see exactly the same as what is in PackRat. I understand what you are getting at however, and it makes sense :) I am still iterated as to how Slingshot have it working, as that seems like it would be a very elegant solution? There code base is much more tidy than that of locomotive. What does the static.a thing do? Cheers Tim On 10 Jul 2007, at 14:19, Jon Baer wrote: > You know what is a good app to check out ... > > http://infinitenil.com/packrat/ > > Download it and jump into /Applications/PackRat.app/Contents/ > Resources and take a look @ how his "lib" and rb_main.rb are laid > out. I found it be pretty helpful, although still not sure if it > was all generated by standalonify + if this is the "standard" way > to do it. > > In a nutshell (just remember to load REXML first): > COCOA_APP_RESOURCES_DIR = File.dirname(__FILE__) > $LOAD_PATH.reject! { |d| d.index(File.dirname > (COCOA_APP_RESOURCES_DIR))!=0 } > $LOAD_PATH << File.join(COCOA_APP_RESOURCES_DIR,"ThirdParty") > $LOAD_PATH << File.join(File.dirname(COCOA_APP_RESOURCES_DIR),"lib") > $LOADED_FEATURES << "rubycocoa.bundle" > ENV['GEM_HOME'] = ENV['GEM_PATH'] = File.join > (COCOA_APP_RESOURCES_DIR,"RubyGems") > > HTH, > > - Jon |
From: Jon B. <jo...@gm...> - 2007-07-10 13:55:19
|
Going to guess its just a static library build of ruby itself ... [MacBook-Pro:/opt/local/lib]$ ls *ruby* libruby-static.a libruby.1.8.6.dylib libruby. 1.8.dylib libruby.dylib I know there are a few way you can compile/build the ruby binary itself ... [MacBook-Pro:~/ruby-1.8.6]$ ./configure --help | grep static --with-static-linked-ext link external modules statically [MacBook-Pro:~/ruby-1.8.6]$ ./configure --help | grep shared --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --enable-shared build a shared library for Ruby. [MacBook-Pro:~/ruby-1.8.6]$ If you were super picky you could probably build it + bundle w/ only packages you really need (I have run ruby on a Zaurus before). But I know just from looking that Slingshot comes w/ the kitchen sink. Seems to have come up on lists before (a Slim Ruby) ... http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/41452 - Jon On Jul 10, 2007, at 9:40 AM, Tim Perrett wrote: > Ok thats interesting - however in his 'lib' dir he has nkf.bundle, > stringio.bundle, strscan.bundle - which I dont think you are talking > about. There is no such directoy as ./Resources/lib so you must > mean ../lib? > > Looking at the rb_main, those other bits have been added by > standalonify - looking in standalonify.rb in the src, you can see > exactly the same as what is in PackRat. I understand what you are > getting at however, and it makes sense :) > > I am still iterated as to how Slingshot have it working, as that > seems like it would be a very elegant solution? There code base is > much more tidy than that of locomotive. What does the static.a > thing do? > > Cheers > > Tim > > > > On 10 Jul 2007, at 14:19, Jon Baer wrote: > >> You know what is a good app to check out ... >> >> http://infinitenil.com/packrat/ >> >> Download it and jump into /Applications/PackRat.app/Contents/ >> Resources and take a look @ how his "lib" and rb_main.rb are laid >> out. I found it be pretty helpful, although still not sure if it >> was all generated by standalonify + if this is the "standard" way >> to do it. >> >> In a nutshell (just remember to load REXML first): >> COCOA_APP_RESOURCES_DIR = File.dirname(__FILE__) >> $LOAD_PATH.reject! { |d| d.index(File.dirname >> (COCOA_APP_RESOURCES_DIR))!=0 } >> $LOAD_PATH << File.join(COCOA_APP_RESOURCES_DIR,"ThirdParty") >> $LOAD_PATH << File.join(File.dirname(COCOA_APP_RESOURCES_DIR),"lib") >> $LOADED_FEATURES << "rubycocoa.bundle" >> ENV['GEM_HOME'] = ENV['GEM_PATH'] = File.join >> (COCOA_APP_RESOURCES_DIR,"RubyGems") >> >> HTH, >> >> - Jon > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Eloy D. <elo...@gm...> - 2007-07-10 13:55:49
|
If all you need is REXML then going down this road isn't going to make it easier for you. There's no need at all to bundle libruby etc unless the version of REXML you want to use doesn't work with 1.8.2, which I don't think...? Like Laurent said it's a pure ruby lib, so you can require it just like any ruby source file. Depending on how REXML internally requires files you might not even need to set the load path, although this could be handy in general. So maybe this might work: require "#{path_to_bundle_resources}/lib/REXML" Eloy On 7/10/07, Tim Perrett <he...@ti...> wrote: > Ok thats interesting - however in his 'lib' dir he has nkf.bundle, > stringio.bundle, strscan.bundle - which I dont think you are talking > about. There is no such directoy as ./Resources/lib so you must > mean ../lib? > > Looking at the rb_main, those other bits have been added by > standalonify - looking in standalonify.rb in the src, you can see > exactly the same as what is in PackRat. I understand what you are > getting at however, and it makes sense :) > > I am still iterated as to how Slingshot have it working, as that > seems like it would be a very elegant solution? There code base is > much more tidy than that of locomotive. What does the static.a thing do? > > Cheers > > Tim > > > > On 10 Jul 2007, at 14:19, Jon Baer wrote: > > > You know what is a good app to check out ... > > > > http://infinitenil.com/packrat/ > > > > Download it and jump into /Applications/PackRat.app/Contents/ > > Resources and take a look @ how his "lib" and rb_main.rb are laid > > out. I found it be pretty helpful, although still not sure if it > > was all generated by standalonify + if this is the "standard" way > > to do it. > > > > In a nutshell (just remember to load REXML first): > > COCOA_APP_RESOURCES_DIR = File.dirname(__FILE__) > > $LOAD_PATH.reject! { |d| d.index(File.dirname > > (COCOA_APP_RESOURCES_DIR))!=0 } > > $LOAD_PATH << File.join(COCOA_APP_RESOURCES_DIR,"ThirdParty") > > $LOAD_PATH << File.join(File.dirname(COCOA_APP_RESOURCES_DIR),"lib") > > $LOADED_FEATURES << "rubycocoa.bundle" > > ENV['GEM_HOME'] = ENV['GEM_PATH'] = File.join > > (COCOA_APP_RESOURCES_DIR,"RubyGems") > > > > HTH, > > > > - Jon > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Tim P. <he...@ti...> - 2007-07-10 14:06:01
|
Not to worry Eloy, I am only interested in this for my own information - I agree with you that just changing the load path would be the optiomal solution. The static lib just interests me thats all :) Cheers for the info Jon / Eloy / Laurent - i'll try changing the load path and see where we get too Thanks Tim On 10 Jul 2007, at 14:55, Eloy Duran wrote: > If all you need is REXML then going down this road isn't going to make > it easier for you. There's no need at all to bundle libruby etc unless > the version of REXML you want to use doesn't work with 1.8.2, which I > don't think...? |
From: Eloy D. <elo...@gm...> - 2007-07-10 14:16:30
|
> Not to worry Eloy, I am only interested in this for my own > information Pfew.... ;-) > - I agree with you that just changing the load path would > be the optiomal solution. The static lib just interests me thats all :) True, it's always a good thing to learn. Good luck. Eloy |
From: Jon B. <jo...@gm...> - 2007-07-10 14:07:23
|
Just curious ... does any OS X < 10.4 ship w/ a Ruby binary? - Jon On Jul 10, 2007, at 9:55 AM, Eloy Duran wrote: > If all you need is REXML then going down this road isn't going to make > it easier for you. There's no need at all to bundle libruby etc unless > the version of REXML you want to use doesn't work with 1.8.2, which I > don't think...? > > Like Laurent said it's a pure ruby lib, so you can require it just > like any ruby source file. Depending on how REXML internally requires > files you might not even need to set the load path, although this > could be handy in general. > So maybe this might work: require "#{path_to_bundle_resources}/lib/ > REXML" > > Eloy > > On 7/10/07, Tim Perrett <he...@ti...> wrote: >> Ok thats interesting - however in his 'lib' dir he has nkf.bundle, >> stringio.bundle, strscan.bundle - which I dont think you are talking >> about. There is no such directoy as ./Resources/lib so you must >> mean ../lib? >> >> Looking at the rb_main, those other bits have been added by >> standalonify - looking in standalonify.rb in the src, you can see >> exactly the same as what is in PackRat. I understand what you are >> getting at however, and it makes sense :) >> >> I am still iterated as to how Slingshot have it working, as that >> seems like it would be a very elegant solution? There code base is >> much more tidy than that of locomotive. What does the static.a >> thing do? >> >> Cheers >> >> Tim >> >> >> >> On 10 Jul 2007, at 14:19, Jon Baer wrote: >> >>> You know what is a good app to check out ... >>> >>> http://infinitenil.com/packrat/ >>> >>> Download it and jump into /Applications/PackRat.app/Contents/ >>> Resources and take a look @ how his "lib" and rb_main.rb are laid >>> out. I found it be pretty helpful, although still not sure if it >>> was all generated by standalonify + if this is the "standard" way >>> to do it. >>> >>> In a nutshell (just remember to load REXML first): >>> COCOA_APP_RESOURCES_DIR = File.dirname(__FILE__) >>> $LOAD_PATH.reject! { |d| d.index(File.dirname >>> (COCOA_APP_RESOURCES_DIR))!=0 } >>> $LOAD_PATH << File.join(COCOA_APP_RESOURCES_DIR,"ThirdParty") >>> $LOAD_PATH << File.join(File.dirname(COCOA_APP_RESOURCES_DIR),"lib") >>> $LOADED_FEATURES << "rubycocoa.bundle" >>> ENV['GEM_HOME'] = ENV['GEM_PATH'] = File.join >>> (COCOA_APP_RESOURCES_DIR,"RubyGems") >>> >>> HTH, >>> >>> - Jon >> >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Jon B. <jo...@jo...> - 2007-07-10 14:12:24
|
Nevermind found my answer ... Ruby Weekly News: 08/26/2002 OSX 10.2 ships with Ruby Luc Heinrich let us know that MacOS X (10.2 aka Jaguar) ships with Ruby 1.6.7. On Jul 10, 2007, at 10:07 AM, Jon Baer wrote: > Just curious ... does any OS X < 10.4 ship w/ a Ruby binary? > > - Jon > > On Jul 10, 2007, at 9:55 AM, Eloy Duran wrote: > >> If all you need is REXML then going down this road isn't going to >> make >> it easier for you. There's no need at all to bundle libruby etc >> unless >> the version of REXML you want to use doesn't work with 1.8.2, which I >> don't think...? >> >> Like Laurent said it's a pure ruby lib, so you can require it just >> like any ruby source file. Depending on how REXML internally requires >> files you might not even need to set the load path, although this >> could be handy in general. >> So maybe this might work: require "#{path_to_bundle_resources}/lib/ >> REXML" >> >> Eloy >> >> On 7/10/07, Tim Perrett <he...@ti...> wrote: >>> Ok thats interesting - however in his 'lib' dir he has nkf.bundle, >>> stringio.bundle, strscan.bundle - which I dont think you are >>> talking >>> about. There is no such directoy as ./Resources/lib so you must >>> mean ../lib? >>> >>> Looking at the rb_main, those other bits have been added by >>> standalonify - looking in standalonify.rb in the src, you can see >>> exactly the same as what is in PackRat. I understand what you are >>> getting at however, and it makes sense :) >>> >>> I am still iterated as to how Slingshot have it working, as that >>> seems like it would be a very elegant solution? There code base is >>> much more tidy than that of locomotive. What does the static.a >>> thing do? >>> >>> Cheers >>> >>> Tim >>> >>> >>> >>> On 10 Jul 2007, at 14:19, Jon Baer wrote: >>> >>>> You know what is a good app to check out ... >>>> >>>> http://infinitenil.com/packrat/ >>>> >>>> Download it and jump into /Applications/PackRat.app/Contents/ >>>> Resources and take a look @ how his "lib" and rb_main.rb are laid >>>> out. I found it be pretty helpful, although still not sure if it >>>> was all generated by standalonify + if this is the "standard" way >>>> to do it. >>>> >>>> In a nutshell (just remember to load REXML first): >>>> COCOA_APP_RESOURCES_DIR = File.dirname(__FILE__) >>>> $LOAD_PATH.reject! { |d| d.index(File.dirname >>>> (COCOA_APP_RESOURCES_DIR))!=0 } >>>> $LOAD_PATH << File.join(COCOA_APP_RESOURCES_DIR,"ThirdParty") >>>> $LOAD_PATH << File.join(File.dirname >>>> (COCOA_APP_RESOURCES_DIR),"lib") >>>> $LOADED_FEATURES << "rubycocoa.bundle" >>>> ENV['GEM_HOME'] = ENV['GEM_PATH'] = File.join >>>> (COCOA_APP_RESOURCES_DIR,"RubyGems") >>>> >>>> HTH, >>>> >>>> - Jon >>> >>> >>> -------------------------------------------------------------------- >>> ----- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >>> >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Tim P. <he...@ti...> - 2007-07-11 20:43:32
|
Further to this.... With another project a particular XML file I need to parse doesn't play well with REXML, so I then tried libxml-ruby and it works like a charm and is much faster. From what I can tell this is down to unicode support. However, libxml-ruby gem requires that it compile some native extensions and I was wondering if anyone had any ideas how this could then be packaged with an RC app? Out of the box libxml-ruby need at least a ruby version of 1.8.4 I believe which is obviously a problem as the apple install is only 1.8.2? Any ideas would be most welcome! Cheers Tim |
From: Jon B. <jo...@gm...> - 2007-07-11 21:26:34
|
Yeah that is what those *.bundle items are when you looked @ PackRat app ... Inside of lib you would put ... ./gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml_so.bundle And then require that bundle in rb_main. Im having a similar issue with Hpricot gem I want to use and not sure the bundling of native items will work properly if the ruby binary has not been updated. - Jon On Jul 11, 2007, at 3:54 PM, Tim Perrett wrote: > Further to this.... With another project a particular XML file I need > to parse doesn't play well with REXML, so I then tried libxml-ruby > and it works like a charm and is much faster. From what I can tell > this is down to unicode support. > > However, libxml-ruby gem requires that it compile some native > extensions and I was wondering if anyone had any ideas how this could > then be packaged with an RC app? Out of the box libxml-ruby need at > least a ruby version of 1.8.4 I believe which is obviously a problem > as the apple install is only 1.8.2? > > Any ideas would be most welcome! > > Cheers > > Tim > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: <jea...@gm...> - 2007-07-11 21:54:40
|
On 7/11/07, Jon Baer <jo...@gm...> wrote: > > Yeah that is what those *.bundle items are when you looked @ PackRat > app ... > > Inside of lib you would put ... > > ./gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml_so.bundle > > And then require that bundle in rb_main. > > Im having a similar issue with Hpricot gem I want to use and not sure > the bundling of native items will work properly if the ruby binary > has not been updated. could you build the native parts on the respective platforms then lipo them together? cheers, jean-pierre |
From: Jon B. <jo...@gm...> - 2007-07-11 23:04:03
|
Yeah thats the confusing part, so to bundle for PPC and Intel (UB) you need to modify the Makefile that comes w/ a gem to get to that part. I think, so its pretty tricky for RC apps then since there might be a few scenarios you have to work out, does standalonify take any of these into consideration? Im fortunately @ the point where Im not packaging an app yet but Im looking @ how others accomplish it. - Jon On Jul 11, 2007, at 5:54 PM, jea...@gm... wrote: > On 7/11/07, Jon Baer <jo...@gm...> wrote: > Yeah that is what those *.bundle items are when you looked @ PackRat > app ... > > Inside of lib you would put ... > > ./gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml_so.bundle > > And then require that bundle in rb_main. > > Im having a similar issue with Hpricot gem I want to use and not sure > the bundling of native items will work properly if the ruby binary > has not been updated. > > could you build the native parts on the respective platforms then > lipo them together? > > cheers, > jean-pierre |
From: Tim P. <he...@ti...> - 2007-07-12 08:09:12
|
Ok sounds good - would I then just be able to do a normal require 'libxml' in my rb_main? Or would it be some OSX specific for loading a bundle? In terms of handling both PPC and Intel architecture, surely there must be a way of doing it? I would have thought there are some apps out there doing it as there are so many gems that use ruby C extensions and require compilation. Would one of the rc-dev team be able to tell us weather or not standalonafiy takes this into account? All the best Tim On 11 Jul 2007, at 22:26, Jon Baer wrote: > Yeah that is what those *.bundle items are when you looked @ PackRat > app ... > > Inside of lib you would put ... > > ./gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml_so.bundle > > And then require that bundle in rb_main. > > Im having a similar issue with Hpricot gem I want to use and not sure > the bundling of native items will work properly if the ruby binary > has not been updated. > > - Jon |
From: Eloy D. <elo...@gm...> - 2007-07-12 08:50:01
|
I had a look at compiling hpricot as a universal bundle which works if I edit the Makefile created by extconf.rb. I had to add to both CFLAGS and the LDSHARED the following: -arch ppc -arch i386 What I'm wondering is how extconf works.... I thought it would pick up the correct flags from the configure settings of ruby itself, however running the extconf against the apple supplied universal ruby does not add these flags. So does someone with more knowledge of extconf know how we could patch this so any lib that builds with extconf automatically gets the correct flags? Cheers, Eloy On 7/12/07, Tim Perrett <he...@ti...> wrote: > Ok sounds good - would I then just be able to do a normal require > 'libxml' in my rb_main? Or would it be some OSX specific for loading > a bundle? > > In terms of handling both PPC and Intel architecture, surely there > must be a way of doing it? I would have thought there are some apps > out there doing it as there are so many gems that use ruby C > extensions and require compilation. Would one of the rc-dev team be > able to tell us weather or not standalonafiy takes this into account? > > All the best > > Tim > > > > On 11 Jul 2007, at 22:26, Jon Baer wrote: > > > Yeah that is what those *.bundle items are when you looked @ PackRat > > app ... > > > > Inside of lib you would put ... > > > > ./gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml_so.bundle > > > > And then require that bundle in rb_main. > > > > Im having a similar issue with Hpricot gem I want to use and not sure > > the bundling of native items will work properly if the ruby binary > > has not been updated. > > > > - Jon > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Tim P. <he...@ti...> - 2007-07-12 10:04:57
|
Ive just had a go with it and it works fine doing that with hpricot, but the I tried libxml-ruby and the make file it creates is a lot more complex than that of hpricot. It seems to check the architecture of ruby, to make sure its compiling the right one. These are the following lines in the make file: arch = i686-darwin8.7.1 sitearch = i686-darwin8.7.1 Which was generated by extconf.rb. I tried manually adding different architecture flags but it doesn't like it and complains with the following: libz.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) I think the first bit relates to that its already cast itself as i686 and knows its not a PPC so doesn't need to compile it (or cant compile it?) What are peoples thoughts? Cheers Tim On 12 Jul 2007, at 09:49, Eloy Duran wrote: > I had a look at compiling hpricot as a universal bundle which works if > I edit the Makefile created by extconf.rb. > > I had to add to both CFLAGS and the LDSHARED the following: -arch > ppc -arch i386 > > What I'm wondering is how extconf works.... I thought it would pick up > the correct flags from the configure settings of ruby itself, however > running the extconf against the apple supplied universal ruby does not > add these flags. So does someone with more knowledge of extconf know > how we could patch this so any lib that builds with extconf > automatically gets the correct flags? > > Cheers, > Eloy |
From: Tim P. <he...@ti...> - 2007-07-13 08:58:02
|
I had a thought about this... I have been looking at the locomotive project, and the slingshot VM........ both of which has there own internal ruby environment. With locomotive you have to select either PPC or Intel bundles; slingshot on the other hand is only available for intel. Rather than trying to re-invent the wheel would it be fair to say that those who have gone before us couldn't make universal gem compilation work so thats why they have had to use platform specific implementations? Cheers Tim |
From: Eloy D. <elo...@gm...> - 2007-07-13 09:07:29
|
It really depends on the gem.... Like I said earlier Hpricot for instance builds as a universal binary without any problems. Getting ruby to play nice with universal is the first hurdle. I have it finally compiling as a universal, the only last problem is with the openssl lib. Once that's done I'll have a look at if mkmf needs additional patching for C extensions to build as universal binaries. Eloy On 7/13/07, Tim Perrett <he...@ti...> wrote: > I had a thought about this... > > I have been looking at the locomotive project, and the slingshot > VM........ both of which has there own internal ruby environment. > With locomotive you have to select either PPC or Intel bundles; > slingshot on the other hand is only available for intel. > > Rather than trying to re-invent the wheel would it be fair to say > that those who have gone before us couldn't make universal gem > compilation work so thats why they have had to use platform specific > implementations? > > Cheers > > Tim > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |