views:

376

answers:

3

I'm on a .NET project, and I would like to migrate build script from MsBuild to Rake. I don't want to force developers (or build agent machines) to have to install anything, I want it to be self contained. If possible I'd prefer to use IronRuby.

Is it possible to just drop everything in /tools/rake and /tools/IronRuby and have it just work, the way everyone does with NAnt?

I would appreciate any pointers to tutorials on this or blogposts. I'm a complete noob when it comes to Ruby, rake and these gem things.

+1  A: 

Yes it is possible, but you pay the cost of bringing the IronRuby runtime with you. That's about 2300 files to deploy so you'd need to pack 7zip with your lib to unpack IronRuby.

I did something similar where I wanted to pack LessCss with IronRuby in one managed wrapper. Turned out to be a totally impracticable solution:

http://www.tigraine.at/2009/08/24/introducing-ironlessnet-your-duct-tape-solution-to-lesscss-in-aspnet/

greetings Daniel

Tigraine
Interesting. I kindof expected (hoped) it would be like NAnt - drop a few assemblies and you're done... Maybe PSake is not such a bad idea after all then...
Krzysztof Koźmic
I'm no expert on this either, so maybe there is a way. But I don't really see one without packing the whole IR thing.. And once you extract it FileSystem operations get really wonky (never copy that folder!).I'd expect (since Win7 also packs Powershell) that the majority of users will have Powershell installed..
Tigraine
So far all our dev machines are Win XP... Anyway, I'll chech the PSake out, and maybe I'll just have all devs install it... Thanks
Krzysztof Koźmic
What is the difference between installing PowerShell and installing Ruby/Iron ruby? The dev/build machines will still need them installing.
Owen
The difference is how easy it is to install. Ruby has become quite easy to install, but is far from the dumb click setup.exe and be done solution.. Also, Win7 machines all have Powershell 2.0 pre-installed so moving forward powershell needs no setup at all on modern machines.
Tigraine
A: 

I think its possible now. Ben Schierman was doing it during his automated build talk at Houston Techfest '09.

I'm trying to figure it out now too. Will update this post with new info.

George Mauer
Thanks George. Looking forward to it.
Krzysztof Koźmic
I got build 0.9.1.0 - 2009-09-28 and irake doesn't work - breaks if you run it with the simplest of RakeFile.rb files
George Mauer
@george IronRuby passes all the Rake unit tests, so I'd be curious to see your rake file
Jimmy Schementi
@Jimmy, I am sure that the fault is my own. Here is a screencast of me trying to run irake with no rake file - it gives me a gems activation error http://screencast.com/t/Y1vkkMlC I thought everything you need to run it was included?
George Mauer
+2  A: 

I have a project that will allow you to run IronRuby applications out of a zip file, so you can easily X-Copy deploy the IronRuby standard library along with any gems you may need. Theoretically you could even embed such a zip file in a .dll as a resource, but I'm not sure what you'd get out of that. I created this so that I could embed IronRuby automation in my desktop front end in a straightforward way without adding any extra complication to the deployment phase, but it would probably work just as well for your scenario, maybe with a little tweaking.

http://github.com/PlasticLizard/Bracket

Nathan