Hello guys, we''re looking to adopt IronRuby within our project. It''s been great to test with since we''re all ex-Ruby and/or ex-Rails guys and this makes everything simpler. We were able to work with windows forms and we can do everything we want with it so far without a problem. The one thing that remains is that we are not allowed to send the actual source files as they are to the customer. I assume there is a simple way we can do this, but I can''t find any documentation on that or maybe I missed something. Is there a way I can turn the ruby classes into DLLs so we can package them up and ship them? That would pretty much seal the deal to get IronRuby approved for our project. thanks, Bassel -- Posted via http://www.ruby-forum.com/.
Actually, never mind. Looks like precompilation is not supported yet. Googling shows they may work on it post 1.0. On the other hand, one of the developers came up with a workaround that will work for us since our needs are minimal. We are just going to zip and encrypt for now and we can unzip and run in memory from a small C# app. Also, if someone really needs a DLL you can use rubydotnet. -- Posted via http://www.ruby-forum.com/.
Bassel Samman wrote:> Actually, never mind. Looks like precompilation is not supported yet. > Googling shows they may work on it post 1.0. On the other hand, one of > the developers came up with a workaround that will work for us since our > needs are minimal. We are just going to zip and encrypt for now and we > can unzip and run in memory from a small C# app. Also, if someone > really needs a DLL you can use rubydotnet.I''ve found it easiest to put Ruby scripts into embedded resources in the DLL then read them out from there. You can optionally encrypt them as part of the build process and decrypt them before running them so that they cannot be spied upon. I use this system a lot (with Ruby.Net, but it will work fine with IronRuby too). As an added aid during development, the code that I use to get a resource ''foo.rb'' from the DLL will do a quick check on disk at location <dll_location>\<dll_name> for a plain-text version of ''foo.rb''. If it finds one, it loads it in preference. This way you don''t need to rebuild the DLL during development - only when ready to release. -- Posted via http://www.ruby-forum.com/.
Good idea. However, I''d remove the file check before the production build (use #if DEBUG or something similar). Having it on the client computers generates 2 main problems: 1. Performance - you''re doing one or multiple file system calls in vain. 2. Security - one can figure out about this little mechanism and put a malicious foo.rb file in the correct folder, so your application uses and executes it. Thanks for sharing, Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Sat, Jan 23, 2010 at 2:02 PM, David Lake <lists at ruby-forum.com> wrote:> Bassel Samman wrote: > > Actually, never mind. Looks like precompilation is not supported yet. > > Googling shows they may work on it post 1.0. On the other hand, one of > > the developers came up with a workaround that will work for us since our > > needs are minimal. We are just going to zip and encrypt for now and we > > can unzip and run in memory from a small C# app. Also, if someone > > really needs a DLL you can use rubydotnet. > > I''ve found it easiest to put Ruby scripts into embedded resources in the > DLL then read them out from there. You can optionally encrypt them as > part of the build process and decrypt them before running them so that > they cannot be spied upon. I use this system a lot (with Ruby.Net, but > it will work fine with IronRuby too). > > As an added aid during development, the code that I use to get a > resource ''foo.rb'' from the DLL will do a quick check on disk at location > <dll_location>\<dll_name> for a plain-text version of ''foo.rb''. If it > finds one, it loads it in preference. This way you don''t need to rebuild > the DLL during development - only when ready to release. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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/20100123/21320afe/attachment-0001.html>
If you''ve ever run reflector over a .NET dll, you''ll realise that you''re pretty much shipping the source to every C# or VB.net app you write - so going along with this I''d recommend just putting the ruby files in a zip, renaming the zip to .blah, and calling it a day On 24/01/2010, at 1:02 AM, David Lake wrote:> Bassel Samman wrote: >> Actually, never mind. Looks like precompilation is not supported yet. >> Googling shows they may work on it post 1.0. On the other hand, one of >> the developers came up with a workaround that will work for us since our >> needs are minimal. We are just going to zip and encrypt for now and we >> can unzip and run in memory from a small C# app. Also, if someone >> really needs a DLL you can use rubydotnet. > > I''ve found it easiest to put Ruby scripts into embedded resources in the > DLL then read them out from there. You can optionally encrypt them as > part of the build process and decrypt them before running them so that > they cannot be spied upon. I use this system a lot (with Ruby.Net, but > it will work fine with IronRuby too). > > As an added aid during development, the code that I use to get a > resource ''foo.rb'' from the DLL will do a quick check on disk at location > <dll_location>\<dll_name> for a plain-text version of ''foo.rb''. If it > finds one, it loads it in preference. This way you don''t need to rebuild > the DLL during development - only when ready to release. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core
Thanks to everyone for their responses. We did something similar and things seem to be going OK with management. Also, Orion, the whole point is we can''t just ship source. I agree you can do a lot of things to get to source from compiled formats, but I don''t want to get into the whole argument of shipping source just won''t fly in the Enterprise world. Long story short, I think this would make our life easier and make it easier to convince management that IronRuby is a viable option. -- Posted via http://www.ruby-forum.com/.
Sure :-) I realise the world of enterprises is not neccessarily the world of reason or logic :-) At any rate, I remember some vague mentionings on the list about a platform abstraction layer and it''s being able to read files directly out of zips, which sounds like it would also be useful... was that a silverlight thing or am I confused? On Mon, Jan 25, 2010 at 4:31 AM, Bassel Samman <lists at ruby-forum.com> wrote:> Thanks to everyone for their responses. We did something similar and > things seem to be going OK with management. Also, Orion, the whole > point is we can''t just ship source. I agree you can do a lot of things > to get to source from compiled formats, but I don''t want to get into the > whole argument of shipping source just won''t fly in the Enterprise > world. Long story short, I think this would make our life easier and > make it easier to convince management that IronRuby is a viable option. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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/20100125/0c823bf4/attachment.html>
Orion Edwards wrote:> Sure :-) I realise the world of enterprises is not neccessarily the > world of > reason or logic :-) > > At any rate, I remember some vague mentionings on the list about a > platform > abstraction layer and it''s being able to read files directly out of > zips, > which sounds like it would also be useful... was that a silverlight > thing or > am I confused?Nope, no SilverLight here, just a desktop app with MSCharts, win forms and a whole lot of IronRuby metaprogramming goodness. -- Posted via http://www.ruby-forum.com/.
using a zip format blocks you from using it in certain ways like adding it as a reference to visual studio. Nobody says your dll needs to contain just ruby code. It can contain thin C# wrappers for example. --- 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 Mon, Jan 25, 2010 at 3:04 AM, Bassel Samman <lists at ruby-forum.com> wrote:> Orion Edwards wrote: > > Sure :-) I realise the world of enterprises is not neccessarily the > > world of > > reason or logic :-) > > > > At any rate, I remember some vague mentionings on the list about a > > platform > > abstraction layer and it''s being able to read files directly out of > > zips, > > which sounds like it would also be useful... was that a silverlight > > thing or > > am I confused? > > Nope, no SilverLight here, just a desktop app with MSCharts, win forms > and a whole lot of IronRuby metaprogramming goodness. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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/20100125/1e3f4617/attachment.html>
After 1.0 we?ll be making IronRuby integrate better with its ?static? world. I?m not sure the current state of precompiling, but I?m pretty sure we?re not even testing it. ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Sunday, January 24, 2010 11:21 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Is it possible to generate DLLs? using a zip format blocks you from using it in certain ways like adding it as a reference to visual studio. Nobody says your dll needs to contain just ruby code. It can contain thin C# wrappers for example. --- 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 Mon, Jan 25, 2010 at 3:04 AM, Bassel Samman <lists at ruby-forum.com<mailto:lists at ruby-forum.com>> wrote: Orion Edwards wrote:> Sure :-) I realise the world of enterprises is not neccessarily the > world of > reason or logic :-) > > At any rate, I remember some vague mentionings on the list about a > platform > abstraction layer and it''s being able to read files directly out of > zips, > which sounds like it would also be useful... was that a silverlight > thing or > am I confused?Nope, no SilverLight here, just a desktop app with MSCharts, win forms and a whole lot of IronRuby metaprogramming goodness. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto: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/20100126/d83d34a8/attachment-0001.html>