[#7043] RUBYOPT versioning? — Caleb Tennis <caleb@...>
Matz, others:
[#7050] RDoc patches for BigDecimal in Ruby CVS — mathew <meta@...>
Now that 1.8.4 is out and the initial flurry of problem reports has died
[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>
Okay. I've got Ruby compiling. I'm attempting to get everything in
Hi,
On 05/01/06, nobuyoshi nakada <nobuyoshi.nakada@ge.com> wrote:
On 06/01/06, Austin Ziegler <halostatue@gmail.com> wrote:
Hi,
On 09/01/06, nobuyoshi nakada <nobuyoshi.nakada@ge.com> wrote:
[#7057] 64-bit Solaris READ_DATA_PENDING Revisited — Steven Lumos <steven@...>
[#7078] CRC - a proof-of-concept Ruby compiler — Anders Hkersten <chucky@...>
Hello everyone,
[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)
Hi,
Hadmut Danisch wrote:
Daniel Berger wrote:
*Dean Wampler *<deanwampler gmail.com> writes:
On Fri, 13 Jan 2006, mathew wrote:
On Fri, 13 Jan 2006, Mathieu Bouchard wrote:
ara.t.howard@noaa.gov wrote:
On Fri, 13 Jan 2006, James Britt wrote:
Dean Wampler <deanwampler gmail.com> writes:
On Sat, 14 Jan 2006, mathew wrote:
[#7100] core dump with ruby 1.9.0 (2006-01-10) and bdb-0.5.8 — Tanaka Akira <akr@...17n.org>
I found following test script dumps core.
>>>>> "T" == Tanaka Akira <akr@m17n.org> writes:
In article <200601110905.k0B950Op001713@moulon.inra.fr>,
[#7109] Calling flock with block? — Bertram Scharpf <lists@...>
Hi,
On Thu, 12 Jan 2006, Bertram Scharpf wrote:
[#7129] YAML.load({[]=>""}.to_yaml) — Tanaka Akira <akr@...17n.org>
I found that current YAML doesn't round trip {[]=>""}.
Hi.
Hi.
In article <20060115202203.D3624CA0.ocean@m2.ccsnet.ne.jp>,
[#7162] FileUtils.mv does not unlink source file when moving over filesystem boundary — Pav Lucistnik <pav@...>
Hi,
On Mon, 16 Jan 2006, Pav Lucistnik wrote:
[#7178] Add XHTML 1.0 Output Support to Ruby CGI — Paul Duncan <pabs@...>
The attached patch against Ruby 1.8.4 adds XHTML 1.0 output support to
[#7186] Ruby 1.9 and FHS — "Kirill A. Shutemov" <k.shutemov@...>
Build and install system changes:
[#7195] trouble due ruby redefining posix function eaccess — noreply@...
Bugs item #3317, was opened at 2006-01-24 15:33
[#7197] SSL-enabled DRb fds on SSLError? — ctm@... (Clifford T. Matthews)
Howdy,
On Jan 24, 2006, at 12:46 PM, Clifford T. Matthews wrote:
Patch worked fine against HEAD.
[#7203] bcc32's memory manager bug — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Hi.
[#7211] Some troubles with an embedded ruby interpreter — Matt Mower <matt.mower@...>
Hi folks,
[#7216] String#scan loops forefever if scanned string is modified inside block. — noreply@...
Bugs item #3329, was opened at 2006-01-26 10:55
[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>
Hello,
Sean E. Russell wrote:
>
On 1/28/06, Caleb Tennis <caleb@aei-tech.com> wrote:
On Saturday 28 January 2006 17:13, Wilson Bilkovich wrote:
Sean E. Russell wrote:
[#7249] PATCH: append option to sysread — Yohanes Santoso <ysantoso-rubycore@...>
[#7259] TCP/UDP server weird lags on 1.8.4 linux — "Bill Kelly" <billk@...>
Hi !
Re: Some troubles with an embedded ruby interpreter
Hi Matt,
I always load the file with the complete path, but the next should work
without it.
rb_load_file is a routine called from within rb_f_load (the routine called
by a Ruby-cript if you use 'load "afile.rb"')
But this routine is static, if you look at the source it calls rb_load:
So try calling rb_load (static VALUE rb_load(VALUE fileName,int wrap) )
should be something like:
VALUE f = rb_str_new2("cocoabug.rb");
rb_load(f,0);
Hope this helps
Wim van den Bos.
Matt Mower <matt.mower@gmail.com> wrote on 25/01/2006 22:13:21:
> Hi folks,
>
> I posted this message to ruby-talk yesterday but didn't receive any
> responses. I hope you don't mind if I repost it here since I hope it
> is more likely that people here have experience of embedding the ruby
> interpreter and likely things that might be done wrong in the attempt.
>
> I have embedded a Ruby 1.8.4 interpreter (compiled last night) into a
> Cocoa application built using the latest version of the XCode
> development tool on MacOSX. I embedded it by copying the
> libruby-static.a file into the XCode project and marking it to be
> included in the application bundle.
>
> Using the instructions in the 2nd edition of Programming Ruby I have
> managed to get the interpreter working and can execute Ruby statements
> using rb_eval_string(). In particular by using ruby_init_loadpath and
> rb_eval_string() to output $: I can be sure it is loaded the prepared
> ruby and not the system ruby.
>
> However I am having some problems when it comes to executing ruby
> scripts using rb_load_file with a script included in the App bundle. I
> don't think bundling is the issue since a bundle is just a directory
> as far as the underlying OS (and Ruby) are concerned.
>
> If I try to preload $: with the path to the Ruby scripts in my app bundle
>
> NSBundle* mainBundle = [NSBundle mainBundle];
> NSString* scriptPath = [mainBundle pathForResource:@"cocoabug"
> ofType:@"rb"];
> NSString* scriptFolder = [scriptPath
stringByDeletingLastPathComponent];
> NSString* operation = @"$: << \"";
> operation = [operation stringByAppendingString:scriptFolder];
> operation = [operation stringByAppendingString:@"\""];
> rb_eval_string( [operation fileSystemRepresentation] );
>
> This code works and sets the $: correctly (as verified by printing it
> us rb_eval_string( "puts $:" );. However attempts to do:
>
> rb_load_file( "cocoabug" )
> or
> rb_load_file( "cocoabug.rb" )
>
> Both raise load errors.
>
> [Session started at 2006-01-24 21:52:29 +0000.]
> Load script: cocoabug.rb
> From Folder:
/Users/matt/Projects/RiC/build/Debug/RiC.app/Contents/Resources
> Ruby = 1.8.4
> Path = /Users/matt/Projects/RiC/build/Debug/RiC.app/Contents/Resources
> (eval): No such file or directory -- cocoabug.rb (LoadError)
>
> RiC has exited with status -1.
> [Session started at 2006-01-24 21:52:46 +0000.]
> Load script: cocoabug
> From Folder:
/Users/matt/Projects/RiC/build/Debug/RiC.app/Contents/Resources
> Ruby = 1.8.4
> Path = /Users/matt/Projects/RiC/build/Debug/RiC.app/Contents/Resources
> (eval): No such file or directory -- cocoabug (LoadError)
>
> However attempting the same thing from IRB using:
>
> $:.clear
> $: <<
"/Users/matt/Projects/RiC/build/Debug/RiC.app/Contents/Resources"
> require "cocoabug"
>
> Works fine.
>
> The alternative approach that I tried was to load the file using the
> complete path, i.e.
>
> rb_load_file( [scriptPath fileSystemRepresentation] );
>
> Does not raise a LoadError, but doesn't appear to work either.
> Whatever I put in cocoabug.rb does not get executed including raising
> Exception.new which should (taking the discussion of rb_protect into
> account) have terminated the whole process.
>
> I'm kinda stumped as to what's wrong but I'm so new to Cocoa/XCode and
> the inner workings of the Ruby interpreter that I'm not sure where to
> look next for the problem.
>
> The source code to my app is available from:
> http://matt.blogs.it/share/source/main.txt
>
> If anyone could help me out I'd be much obliged.
>
> Regards,
>
> Matt
>
> --
> Matt Mower :: http://matt.blogs.it/
>
--------------------------------------------------------------------------------------------
Disclaimer
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht
ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender
direct te informeren door het bericht te retourneren. De afzender sluit
iedere aansprakelijkheid uit die voortvloeit uit elektronische verzending.