[Ironruby-core] Newbie questions regarding IronRuby in Silverlight...

Ivan Porto Carrero ivan at flanders.co.nz
Fri Oct 2 04:20:46 EDT 2009

But that will include all the files and gems you have installed on your
machine for ironruby.
It might be a better idea to copy the ruby files you need into a folder in
your project.
You can use them as an embedded resource and then execute their code in
order to require them
ExecuteScript does that for you.

If you want to use the plain ruby require syntax then you can include them
in the root folder of what gets included in the xap. If your Silverlight
application is a DynamicApplication then you have the necessary PAL loaded
and you can use plain require statements

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

On Fri, Oct 2, 2009 at 10:05 AM, Shay Friedman <shay.friedman at gmail.com>wrote:

> I guess you will need to add the path to the libs directory when creating
> the XAP file.
> When you create a XAP file with Chiron, there is a /path switch where you
> can pass semi-colon separated values with paths to include in the XAP file.
> Something like:
> chr /z:myfile.xap /path:c:\IronRuby\libs
> Have you tried that?
> All the best,
> Shay.
> ------------------------------------------
> Shay Friedman
> Author of IronRuby Unleashed
> http://www.IronShay.com
> Follow me: http://twitter.com/ironshay
> On Fri, Oct 2, 2009 at 9:45 AM, Zoltan Toth <lists at ruby-forum.com> wrote:
>> Hi Guys,
>> How do we, for example, use BigDecimal in IronRuby within a Silverlight
>> application?  When we just require 'bigdecimal', we get an error saying
>> that file can't be found.  Do we have to add that and other ruby
>> standard library files to our application and if so, where do we put
>> them?
>> Note that we are actually developing a standard (non-dynamic) C#
>> Silverlight application (and hence are not using Chiron) and wish merely
>> to execute ruby scripts client-side at various times.  We would like
>> these scripts to be split into different files, for obvious reasons.  We
>> envisage that certain files (i.e. standard library and other non
>> changing code) may well be bound into the xap file somehow and other
>> files may well be dynamically obtained from the back-end.
>> So far, we've been able to execute ruby files deployed as "Build Action:
>> Resource" in VS2008 but, we have not, as yet, been able to get one file
>> to require another in a similar manner to the Chiron demos in IronRuby
>> 0.9.1. (i.e. app.rb requires Silverlight.rb).
>> Any help would be greatly appreciated,
>> Thanks,
>> Zoltan.
>> --
>> Posted via http://www.ruby-forum.com/.
>> _______________________________________________
>> Ironruby-core mailing list
>> Ironruby-core at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/ironruby-core
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091002/7325d3c3/attachment.html>

More information about the Ironruby-core mailing list