Hi Michael<br><br>I think we can work together for that, seen as I will have a bunch of samples I&#39;m writing for the book<br><br>I haven&#39;t gotten round to putting a website/blog up because most of the CMS/blog systems out there don&#39;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 &lt;<a href="mailto:michael.letterle@gmail.com">michael.letterle@gmail.com</a>&gt; 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&#39;m actually getting ready to work on an IronRuby quick start blog<br>post, based on my experiences, but this is the simplest &quot;hello world&quot;<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> &nbsp; &nbsp;static class Program<br> &nbsp; &nbsp;{<br> &nbsp; &nbsp; &nbsp; &nbsp;/// &lt;summary&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;/// The main entry point for the application.<br> &nbsp; &nbsp; &nbsp; &nbsp;/// &lt;/summary&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp;[STAThread]<br> &nbsp; &nbsp; &nbsp; &nbsp;static void Main()<br> &nbsp; &nbsp; &nbsp; &nbsp;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IScriptEnvironment scriptenvironment =<br>ScriptEnvironment.GetEnvironment();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IScriptEngine rubyengine = scriptenvironment.GetEngine(&quot;ruby&quot;);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;scriptenvironment.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString(&quot;puts<br>&#39;Hello World!\nPress Any Key To Continue..&#39;&quot;) );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.ReadKey();<br><br> &nbsp; &nbsp; &nbsp; &nbsp;}<br> &nbsp; &nbsp;}<br>}<br><br>be sure to add references to Microsof.Scripting.dll and IronRuby.dll<br>(and IronRuby.Libraries.dll if you&#39;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 &lt;<a href="mailto:angrygreg@gmail.com">angrygreg@gmail.com</a>&gt; wrote:<br>&gt; OK, so I couldn&#39;t get some of the simple examples of using RubyEngine<br>
&gt; to start calling Ruby from C#...<br>&gt;<br>&gt; So I spent a bit reading through the mailing list archives (realizing<br>&gt; while doing that, that I&#39;d asked a frequently asked question).<br>&gt;<br>&gt; Now, I hope I&#39;m not asking another stupid question.<br>
&gt;<br>&gt; I found another post (<br>&gt; <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>&gt; ) that suggests a method of running Ruby.<br>
&gt;<br>&gt; However, I get an error on this line<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IScriptEngine engine = IronRuby.GetEngine(runtime);<br>&gt;<br>&gt; Which shows this stack trace<br>&gt;<br>&gt; &nbsp; &nbsp;at System.RuntimeMethodHandle._InvokeConstructor(Object[] args,<br>
&gt; SignatureStruct&amp; signature, IntPtr declaringType)<br>&gt; &nbsp; &nbsp;at System.RuntimeMethodHandle.InvokeConstructor(Object[] args,<br>&gt; SignatureStruct signature, RuntimeTypeHandle declaringType)<br>&gt; &nbsp; &nbsp;at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags<br>
&gt; invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)<br>&gt; &nbsp; &nbsp;at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,<br>&gt; Binder binder, Object[] args, CultureInfo culture, Object[]<br>
&gt; activationAttributes)<br>&gt; &nbsp; &nbsp;at System.Activator.CreateInstance(Type type, BindingFlags<br>&gt; bindingAttr, Binder binder, Object[] args, CultureInfo culture,<br>&gt; Object[] activationAttributes)<br>&gt; &nbsp; &nbsp;at System.Activator.CreateInstance(Type type, Object[] args)<br>
&gt; &nbsp; &nbsp;at Microsoft.Scripting.Utils.ReflectionUtils.CreateInstance[T](Type<br>&gt; actualType, Object[] args) in<br>&gt; c:\Libraries\IronRuby\trunk\src\microsoft.scripting\Utils\ReflectionUtils.cs:line<br>&gt; 127<br>&gt;<br>
&gt; --<br>&gt; Greg Akins<br>&gt; Software Development Manager<br>&gt; SSI Services<br>&gt;<br>&gt; <a href="http://kc.vanadium.com" target="_blank">http://kc.vanadium.com</a><br>&gt; <a href="http://www.pghcodingdojo.org" target="_blank">http://www.pghcodingdojo.org</a><br>
&gt; <a href="http://www.insomnia-consulting.org/monologue" target="_blank">http://www.insomnia-consulting.org/monologue</a><br>&gt; _______________________________________________<br>&gt; Ironruby-core mailing list<br>&gt; <a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
&gt; <a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>&gt;<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>