Hi Michael<br><br>I think we can work together for that, seen as I will have a bunch of samples I'm writing for the book<br><br>I haven't gotten round to putting a website/blog up because most of the CMS/blog systems out there don't do exactly what I want (which is not much). I want it to be ruby of course.<br>
<br>Email me off list if you like the idea?<br><br>Cheers<br>Ivan<br><br><div class="gmail_quote">On Jan 28, 2008 12:34 PM, Michael Letterle <<a href="mailto:michael.letterle@gmail.com">michael.letterle@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I'm actually getting ready to work on an IronRuby quick start blog<br>post, based on my experiences, but this is the simplest "hello world"<br>
using the hosting mechanism I could come up with:<br><br>using System;<br>using Ruby.Runtime;<br>using Microsoft.Scripting.Hosting;<br>namespace RubyExample<br>{<br> static class Program<br> {<br> /// <summary><br>
/// The main entry point for the application.<br> /// </summary><br> [STAThread]<br> static void Main()<br> {<br> IScriptEnvironment scriptenvironment =<br>ScriptEnvironment.GetEnvironment();<br>
IScriptEngine rubyengine = scriptenvironment.GetEngine("ruby");<br> scriptenvironment.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString("puts<br>'Hello World!\nPress Any Key To Continue..'") );<br>
Console.ReadKey();<br><br> }<br> }<br>}<br><br>be sure to add references to Microsof.Scripting.dll and IronRuby.dll<br>(and IronRuby.Libraries.dll if you're so inclined).<br><br>You can also use scriptenvironment.ExecuteFile(pathtofile) if you have<br>
your ruby script inn a standalone file.<br><div><div></div><div class="Wj3C7c"><br>On Jan 27, 2008 6:16 PM, Greg Akins <<a href="mailto:angrygreg@gmail.com">angrygreg@gmail.com</a>> wrote:<br>> OK, so I couldn't get some of the simple examples of using RubyEngine<br>
> to start calling Ruby from C#...<br>><br>> So I spent a bit reading through the mailing list archives (realizing<br>> while doing that, that I'd asked a frequently asked question).<br>><br>> Now, I hope I'm not asking another stupid question.<br>
><br>> I found another post (<br>> <a href="http://rubyforge.org/pipermail/ironruby-core/2008-January/000616.html" target="_blank">http://rubyforge.org/pipermail/ironruby-core/2008-January/000616.html</a><br>> ) that suggests a method of running Ruby.<br>
><br>> However, I get an error on this line<br>><br>> IScriptEngine engine = IronRuby.GetEngine(runtime);<br>><br>> Which shows this stack trace<br>><br>> at System.RuntimeMethodHandle._InvokeConstructor(Object[] args,<br>
> SignatureStruct& signature, IntPtr declaringType)<br>> at System.RuntimeMethodHandle.InvokeConstructor(Object[] args,<br>> SignatureStruct signature, RuntimeTypeHandle declaringType)<br>> at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags<br>
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)<br>> at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,<br>> Binder binder, Object[] args, CultureInfo culture, Object[]<br>
> activationAttributes)<br>> at System.Activator.CreateInstance(Type type, BindingFlags<br>> bindingAttr, Binder binder, Object[] args, CultureInfo culture,<br>> Object[] activationAttributes)<br>> at System.Activator.CreateInstance(Type type, Object[] args)<br>
> at Microsoft.Scripting.Utils.ReflectionUtils.CreateInstance[T](Type<br>> actualType, Object[] args) in<br>> c:\Libraries\IronRuby\trunk\src\microsoft.scripting\Utils\ReflectionUtils.cs:line<br>> 127<br>><br>
> --<br>> Greg Akins<br>> Software Development Manager<br>> SSI Services<br>><br>> <a href="http://kc.vanadium.com" target="_blank">http://kc.vanadium.com</a><br>> <a href="http://www.pghcodingdojo.org" target="_blank">http://www.pghcodingdojo.org</a><br>
> <a href="http://www.insomnia-consulting.org/monologue" target="_blank">http://www.insomnia-consulting.org/monologue</a><br>> _______________________________________________<br>> Ironruby-core mailing list<br>> <a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
> <a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>><br><br><br><br></div></div><font color="#888888">--<br>Michael Letterle<br>
[Polymath Programmer]<br><a href="http://michaeldotnet.blogspot.com" target="_blank">http://michaeldotnet.blogspot.com</a><br></font><div><div></div><div class="Wj3C7c">_______________________________________________<br>Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br></div>
</div></blockquote></div><br>