<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>kyleheon.com: Tag ruby</title>
    <link>http://www.kyleheon.com/articles/tag/ruby</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Random musings about anything and everything...</description>
    <item>
      <title>Typo 4.0 upgrade!</title>
      <description>&lt;p&gt;So the &lt;a href="http://www.typosphere.org"&gt;Typo team&lt;/a&gt; has released the long overdue Typo 4.0 upgrade. This latest version includes countless bug fixes and feature additions. Read about it &lt;a href="http://scottstuff.net/blog/articles/2006/07/22/typo-4-0-0"&gt;here&lt;/a&gt; if you are interested.&lt;/p&gt;


	&lt;p&gt;Also with this upgrade I&amp;#8217;ve rolled out a new focus area on the article detail page. I was inspired by the awesome &lt;a href="http://typogarden.com/articles/2005/11/29/hemingway-theme"&gt;Hemingway theme&lt;/a&gt; but wasn&amp;#8217;t able to pull off exactly what I wanted with Typo (as easily as I&amp;#8217;d have liked). What I would like to be able to do is easily flag sidebars per page type (list, archives, detail, etc). Speaking of the Hemingway theme, I&amp;#8217;ve it out but couldn&amp;#8217;t get it to display quite to my liking, plus with sidebars enabled it threw a Rails Application Error that I haven&amp;#8217;t tracked down. I&amp;#8217;m new to Ruby and Rails and can&amp;#8217;t figure out how the sidebar code works.&lt;/p&gt;</description>
      <pubDate>Sun, 23 Jul 2006 20:30:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8018c1b7-e139-45c1-8780-0ce136386672</guid>
      <author>Kyle Heon</author>
      <link>http://www.kyleheon.com/articles/2006/07/23/typo-4-0-upgrade</link>
      <category>Development</category>
      <category>rails</category>
      <category>ruby</category>
      <category>typo</category>
      <trackback:ping>http://www.kyleheon.com/articles/trackback/102</trackback:ping>
    </item>
    <item>
      <title>My Rails option_tag</title>
      <description>&lt;p&gt;Being relatively new to Ruby and Rails I&amp;#8217;ve been taking it slow as I work through an application that I&amp;#8217;m building, mostly for fun but has applicability when finished where I work.&lt;/p&gt;


	&lt;p&gt;Anyways, I have a series of multiple select boxes that exist on a particular form. In all my research online I wasn&amp;#8217;t able to find a helper method that would handle multiple select boxes. Given that I decided to write a helper myself. At the moment this just writes out just the option tag and selects it if the value matches something found in a passed in collection.&lt;/p&gt;


	&lt;p&gt;Here is the helper code:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;option_tag&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;value&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;title&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;collection&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="keyword"&gt;begin&lt;/span&gt;
    &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="punct"&gt;(!&lt;/span&gt;&lt;span class="ident"&gt;collection&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;empty?&lt;/span&gt; &lt;span class="keyword"&gt;and&lt;/span&gt; &lt;span class="ident"&gt;collection&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;value&lt;/span&gt;&lt;span class="punct"&gt;))&lt;/span&gt;
      &lt;span class="ident"&gt;selected&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt; selected=&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;selected&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;rescue&lt;/span&gt;
    &lt;span class="ident"&gt;selected&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;nil&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&amp;lt;option value=&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;&lt;span class="expr"&gt;#{value}&lt;/span&gt;&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;&lt;span class="expr"&gt;#{selected}&lt;/span&gt;&amp;gt;&lt;span class="expr"&gt;#{title}&lt;/span&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Here&amp;#8217;s how to use it:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&amp;lt;p&amp;gt;&amp;lt;label for=&amp;quot;browser_id&amp;quot;&amp;gt;Browsers&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;
&amp;lt;select id=&amp;quot;browser_id&amp;quot; name=&amp;quot;browser[id][]&amp;quot; size=&amp;quot;5&amp;quot; multiple=&amp;quot;multiple&amp;quot;&amp;gt;
  &amp;lt;% for browser in @browsers %&amp;gt;
    &amp;lt;%= option_tag(browser.id, browser.name, @item.browsers) %&amp;gt;
  &amp;lt;% end %&amp;gt;
&amp;lt;/select&amp;gt;
&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;I&amp;#8217;ll probably look into building something that can handle a multiple select and reuse as much of the Rails helper methods as possible.&lt;/p&gt;


	&lt;p&gt;If I completely missed something and can actually do what I want using what Rails offers please let me know, I&amp;#8217;d rather use what is there then roll my own unless I have a good reason to.&lt;/p&gt;


	&lt;p&gt;Also, should you see something glaringly wrong or inefficient in my code above please say so, as I said, I&amp;#8217;m just learning Ruby and Rails and want to learn how to do things the right way.&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jul 2006 20:31:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4a6dd489-9462-49db-945c-c1b96ec70fc7</guid>
      <author>Kyle Heon</author>
      <link>http://www.kyleheon.com/articles/2006/07/13/my-rails-option_tag</link>
      <category>Development</category>
      <category>rails</category>
      <category>ruby</category>
      <trackback:ping>http://www.kyleheon.com/articles/trackback/96</trackback:ping>
    </item>
    <item>
      <title>I just love the Ruby community!</title>
      <description>&lt;p&gt;A few weeks back I started &lt;a href="http://thread.gmane.org/gmane.comp.lang.ruby.general/122442"&gt;this thread&lt;/a&gt; on the Ruby Talk mailing list inquiring as to whether there were any equivalents to &lt;a href="http://robocode.sourceforge.net/"&gt;RoboCode&lt;/a&gt; or &lt;a href="http://www.windowsforms.net/Applications/application.aspx?PageID=30&amp;#38;tabindex=8"&gt;Terrarium&lt;/a&gt; to aid in the learning of Ruby.&lt;/p&gt;


	&lt;p&gt;The thread went on for days and even broke out into a couple groups forming a project to start development when suddenly &lt;a href="http://rrobots.rubyforge.org/index.html"&gt;RRobots&lt;/a&gt; was announced on the list.&lt;/p&gt;


	&lt;p&gt;I just got around to really looking into this and I downloaded a few of the bots that were sent via the mailing list. This is a pretty impressive port (using that term loosely) of RoboCode. I hope that over the next few nights I can start to dive in and build a few bots. I&amp;#8217;d love to see a community spring up around this very awesome training tool.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve been playing around with Ruby on Rails now since early this year. I&amp;#8217;ve bought and read the books, drank the coolaid, and all that but because I don&amp;#8217;t get to program in Ruby professionally (as in at work) I&amp;#8217;m struggling to really reach that eureka moment where all things Ruby suddenly make sense and I&amp;#8217;m hopeful that something like this might be just what the doctor ordered.&lt;/p&gt;</description>
      <pubDate>Tue, 29 Nov 2005 01:43:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:78d997ca-55bf-4307-940b-12fc1bca63f5</guid>
      <author>Kyle Heon</author>
      <link>http://www.kyleheon.com/articles/2005/11/29/i-just-love-the-ruby-community</link>
      <category>Development</category>
      <category>rrobots</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Move Complete</title>
      <description>&lt;p&gt;Well after many nights of struggling I have finally managed to get my site setup on &lt;a href="http://www.textdrive.com/"&gt;Textdrive&lt;/a&gt; using &lt;a href="http://www.lighttpd.net/"&gt;lighttpd&lt;/a&gt; and &lt;a href="http://www.fastcgi.com/"&gt;FastCGI&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;This new site looks much like it did last time only now it&amp;#8217;s powered by &lt;a href="http://typo.leetsoft.com/trac/"&gt;Typo&lt;/a&gt; which is the premiere &lt;a href="http://www.rubyonrails.com/"&gt;Rails&lt;/a&gt; blog engine.&lt;/p&gt;


	&lt;p&gt;Everything from my old &lt;a href="http://www.textpattern.com/"&gt;Textpattern&lt;/a&gt; site should have been copied over, including the comments.&lt;/p&gt;


	&lt;p&gt;I have high hopes to really start in on some Rails development now that I have a host that supports it. My number one focus is going to actually build out my photography section. I don&amp;#8217;t consider myself an expert photographer but I do feel I&amp;#8217;m somewhere between novice and expert.&lt;/p&gt;</description>
      <pubDate>Sun, 09 Oct 2005 11:46:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a86f82a7-b460-4b2d-8c70-893641539ec1</guid>
      <author>Kyle Heon</author>
      <link>http://www.kyleheon.com/articles/2005/10/09/move-complete</link>
      <category>Development</category>
      <category>Photography</category>
      <category>Miscellaneous</category>
      <category>typo</category>
      <category>rails</category>
      <category>ruby</category>
      <category>textdrive</category>
    </item>
    <item>
      <title>Ugh, ASP.NET != Fun (like Rails is)</title>
      <description>&lt;p&gt;This past weekend I was able to really spend some quality time exploring &lt;a href="http://www.rubyonrails.com"&gt;Rails&lt;/a&gt;, something I&amp;#8217;ve been having a tough time finding the time to do. Not the case this weekend.&lt;/p&gt;


	&lt;p&gt;In order to learn &lt;a href="http//www.rubyonrails.com"&gt;Ruby and Rails&lt;/a&gt; I&amp;#8217;ve been taking some of the applications we offer at work (ASP) and porting them to the Rails framework. I have been working much slower then I probably could simply because I want to understand what and why things are the way they are. Even still, I&amp;#8217;ve managed to port two of the tools over in relatively short order (except the file upload functionality, which I will tackle last).&lt;/p&gt;


	&lt;p&gt;I didn&amp;#8217;t realize how much fun and how quick Rails developing was till I got back into some &lt;a href="http://www.asp.net"&gt;&lt;span class="caps"&gt;ASP&lt;/span&gt;.NET&lt;/a&gt; development that I&amp;#8217;m doing at work. It&amp;#8217;s been tiring mostly because we are porting some really sloppy third-party &lt;a href="http://www.macromedia.com/software/coldfusion/?promoid=BINO"&gt;&lt;span class="caps"&gt;CFMX&lt;/span&gt;&lt;/a&gt; code over. The biggest annoyance I had to deal with all day though was in coding, compiling (wait), and refresh (wait for &lt;span class="caps"&gt;IIS&lt;/span&gt; to rebuild the application) process.&lt;/p&gt;


	&lt;p&gt;The good news is I&amp;#8217;m home now and I can get back into some more Rails fun. Hoping someday we&amp;#8217;ll be able to offer Rails applications where I work but for the time being we are primarily an MS shop with some &lt;a href="http://www.php.net/"&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt;&lt;/a&gt; mixed in (but not hosted, we don&amp;#8217;t have any Linux servers available for site hosting, only development).&lt;/p&gt;</description>
      <pubDate>Mon, 18 Jul 2005 18:18:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a1db1dc3-1fb4-431e-b15f-9a927d906763</guid>
      <author>kheon</author>
      <link>http://www.kyleheon.com/articles/2005/07/18/ugh-asp-net-fun-like-rails-is</link>
      <category>Development</category>
      <category>net</category>
      <category>asp</category>
      <category>rails</category>
      <category>ruby</category>
      <trackback:ping>http://www.kyleheon.com/articles/trackback/40</trackback:ping>
    </item>
    <item>
      <title>Fun with Ruby on Rails and other news</title>
      <description>&lt;p&gt;Well, it&amp;#8217;s been awhile since I last updated so I figured I&amp;#8217;d update everyone (those few that actually visit this site) on what I have been up to lately.&lt;/p&gt;


	&lt;p&gt;Finally, after about two months of setup, my Linux system is finally at a point where I can start playing around with Ruby on Rails. For about the past week I have been doing just that. At first it was playing but then I decided to take all of the &lt;span class="caps"&gt;ASP&lt;/span&gt; (yeah, Active Server Pages) apps that we have where I work and port them to Rails.&lt;/p&gt;


	&lt;p&gt;This process has been pretty fun. Instead of just ripping through and getting it down I&amp;#8217;ve decided to take a slow, methodical approach and actually learn the &amp;#8220;Rails&amp;#8221; way of doing things. Thankfully this has still be a pretty fast moving process. I&amp;#8217;ve had a few hiccups along the way but nothing all that major, the Rails framework really is all about getting things done quickly and effeciently.&lt;/p&gt;


	&lt;p&gt;I have been eagerly following all the Ruby/Rails blogs I know of and after having some dissatisfying experiences with a commercial content management system (CMS) that we are implementing at work I&amp;#8217;ve been really thinking about writing one myself, however I know there is no way I could take on something like that by myself so I have joined the &lt;a href="http://www.railfrog.com/"&gt;RailFrog&lt;/a&gt; project. Right now I&amp;#8217;m just kind of sitting on the sidelines, listening as I am just learning how to do things in the world of Ruby and Rails plus it&amp;#8217;s still very early in the project planning.&lt;/p&gt;


	&lt;p&gt;In other news, my daughter graduated preschool a few weeks back and can&amp;#8217;t wait to start kindergarten in the fall. My son just finished up 1st grade. Also, in regards to my son, he is just a month shy of testing for his Black Belt in Taekwondo and he has improved considerably in the last month or so.&lt;/p&gt;


	&lt;p&gt;Today is my wife&amp;#8217;s 30th. We threw her a surprise birthday party two weekends ago which was a lot of fun. My daughters birthday was yesterday which we celebrated last Saturday.&lt;/p&gt;


	&lt;p&gt;We have watched a ton of movies, I&amp;#8217;ve just been too lazy to write up a review for any of them. Speaking of movies, damn there is just too many good movies in the theater. The wife and I want to get out and see Star Wars: Episode &lt;span class="caps"&gt;III&lt;/span&gt;, Batman Begins, War of the Worlds, and Fantastic Four but that will be tough, too many movies too close together. We need a sitter every weekend for a month which just isn&amp;#8217;t realistic.&lt;/p&gt;</description>
      <pubDate>Wed, 22 Jun 2005 21:10:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a5e8b1c9-e36d-4e3c-9dfa-c6fcfe61c58b</guid>
      <author>kheon</author>
      <link>http://www.kyleheon.com/articles/2005/06/22/fun-with-ruby-on-rails-and-other-news</link>
      <category>Development</category>
      <category>Miscellaneous</category>
      <category>rails</category>
      <category>ruby</category>
      <trackback:ping>http://www.kyleheon.com/articles/trackback/38</trackback:ping>
    </item>
    <item>
      <title>Rails Beta Book Available</title>
      <description>&lt;p&gt;The good folks over at &lt;a href="http://www.pragmaticprogrammer.com/"&gt;The Pragmatic Programmer&lt;/a&gt; have released a &lt;a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Random/RailsBetaBook.rdoc"&gt;beta book&lt;/a&gt; for the forthcoming &lt;a href="http://www.pragmaticprogrammer.com/titles/rails/index.html"&gt;Agile Web Development with Rails&lt;/a&gt; which is a web framework for my current favorite language, &lt;a href="http://www.ruby-lang.org"&gt;Ruby&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Essentially what they have done is released a pre-release book in &lt;span class="caps"&gt;PDF&lt;/span&gt; format. You pay for it in full now in exchange for getting to download a beta &lt;span class="caps"&gt;PDF&lt;/span&gt; months before the printed book is ready. Once the print book is ready they ship it to you.&lt;/p&gt;


	&lt;p&gt;This is an awesome concept, especially for the &lt;a href="http://www.rubyonrails.org"&gt;Rails&lt;/a&gt; community because while there is  quite a bit of documentation on the web, it&amp;#8217;s spread out all over the place making it tough to really come up to speed.&lt;/p&gt;


	&lt;p&gt;I purchased my copy a few hours ago and have my beta &lt;span class="caps"&gt;PDF&lt;/span&gt; downloaded. They are working on a way for those that have purchased this to get updated beta versions as the book matures.&lt;/p&gt;


	&lt;p&gt;If you are interested in grabbing a copy, swing by &lt;a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Random/RailsBetaBook.rdoc"&gt;here&lt;/a&gt; for the necessary details and links.&lt;/p&gt;</description>
      <pubDate>Thu, 26 May 2005 19:39:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:297c3b15-49e2-4e2b-a380-72f541729712</guid>
      <author>kheon</author>
      <link>http://www.kyleheon.com/articles/2005/05/26/rails-beta-book-available</link>
      <category>Development</category>
      <category>rails</category>
      <category>ruby</category>
      <trackback:ping>http://www.kyleheon.com/articles/trackback/37</trackback:ping>
    </item>
    <item>
      <title>Success! Apache, Ruby, Rails, and FastCGI</title>
      <description>&lt;p&gt;I&amp;#8217;m starting to get my feet wet with some Linux stuff so I decided to setup a small Linux server. It&amp;#8217;s running Fedora Core 3 and I have finally (after about 2-3 weeks of screwing around) managed to get everything installed that I set out to have running on this box.&lt;/p&gt;


	&lt;p&gt;This includes:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; (1.2 &lt;span class="caps"&gt;RC3&lt;/span&gt; built from source)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.ruby-lang.org/en/"&gt;Ruby&lt;/a&gt; (1.8.2 built from source)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://rubyforge.org/frs/?group_id=126"&gt;Ruby Gems&lt;/a&gt; (0.8.10 built from source)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.rubyonrails.com/"&gt;Rails&lt;/a&gt; (0.11.1 installed via Ruby Gems)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://httpd.apache.org/"&gt;Apache&lt;/a&gt; (2.0.54 installed with Fedora Core 3)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.fastcgi.com/"&gt;FastCGI&lt;/a&gt; (2.4 built from source)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://us3.samba.org/samba/"&gt;Samba&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Now my goal was to get Apache and Subversion running so that I could move my Subversion repository off from my main development workstation (XP Pro) so that I could rebuild this system without losing any data and at the same time offload some unnecessary services that are slowing things down. Having a dedicated Linux box allows me to have Subversion, Apache and any other *nix based languages.&lt;/p&gt;


	&lt;p&gt;The secondary goal was to be able to play around with Ruby and Rails a lot more as I&amp;#8217;ve had a bitch of a time getting it running properly on my Windows box. It runs but I have to use the build in WEBrick server and I didn&amp;#8217;t really want to.&lt;/p&gt;


	&lt;p&gt;For some reason getting Rails installed and configured to use FastCGI on Apache was a considerable effort but I believe now it is working. The first time you request the Rails application it seems pretty slow (on par with a .NET sites &lt;span class="caps"&gt;JIT&lt;/span&gt; on first request) but after that it seems to scream. I&amp;#8217;m happy about that.&lt;/p&gt;


	&lt;p&gt;Now that I have all of this working I&amp;#8217;m going to continue to play around for a few more weeks but at some point I&amp;#8217;ll blow everything away and start over, this time hopefully to keep it up for good.&lt;/p&gt;


	&lt;p&gt;Last, but certainly not least is my ultimate goal with Subversion, Ruby, and Rails. I want to build a Subversion powered &lt;span class="caps"&gt;CMS&lt;/span&gt; using Ruby and Rails. This is an ambitious project for sure, especially as I&amp;#8217;m just starting to learn Ruby but I figure if I can find a project that has meaning to me then it&amp;#8217;ll make it that much more real. It should be fun.&lt;/p&gt;</description>
      <pubDate>Tue, 17 May 2005 19:09:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c2de1dee-983d-4bb7-bcd9-b0931ef9e429</guid>
      <author>kheon</author>
      <link>http://www.kyleheon.com/articles/2005/05/17/success-apache-ruby-rails-and-fastcgi</link>
      <category>Development</category>
      <category>linux</category>
      <category>subversion</category>
      <category>rails</category>
      <category>ruby</category>
      <trackback:ping>http://www.kyleheon.com/articles/trackback/33</trackback:ping>
    </item>
  </channel>
</rss>
