Typo 4.0 upgrade!

Posted by Kyle Heon Sun, 23 Jul 2006 20:30:00 GMT

So the Typo team has released the long overdue Typo 4.0 upgrade. This latest version includes countless bug fixes and feature additions. Read about it here if you are interested.

Also with this upgrade I’ve rolled out a new focus area on the article detail page. I was inspired by the awesome Hemingway theme but wasn’t able to pull off exactly what I wanted with Typo (as easily as I’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’ve it out but couldn’t get it to display quite to my liking, plus with sidebars enabled it threw a Rails Application Error that I haven’t tracked down. I’m new to Ruby and Rails and can’t figure out how the sidebar code works.

Posted in  | Tags , ,  | no comments | no trackbacks

My Rails option_tag

Posted by Kyle Heon Thu, 13 Jul 2006 20:31:00 GMT

Being relatively new to Ruby and Rails I’ve been taking it slow as I work through an application that I’m building, mostly for fun but has applicability when finished where I work.

Anyways, I have a series of multiple select boxes that exist on a particular form. In all my research online I wasn’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.

Here is the helper code:

def option_tag(value, title, collection)
    begin
      if (!collection.empty? and collection.find(value))
        selected = " selected=\"selected\""
      end
    rescue
      selected = nil
    end
    "<option value=\"#{value}\"#{selected}>#{title}</option>"
  end

Here’s how to use it:

<p><label for="browser_id">Browsers</label><br />
  <select id="browser_id" name="browser[id][]" size="5" multiple="multiple">
    <% for browser in @browsers %>
      <%= option_tag(browser.id, browser.name, @item.browsers) %>
    <% end %>
  </select>
  </p>

I’ll probably look into building something that can handle a multiple select and reuse as much of the Rails helper methods as possible.

If I completely missed something and can actually do what I want using what Rails offers please let me know, I’d rather use what is there then roll my own unless I have a good reason to.

Also, should you see something glaringly wrong or inefficient in my code above please say so, as I said, I’m just learning Ruby and Rails and want to learn how to do things the right way.

Posted in  | Tags ,  | 1 comment | no trackbacks

I just love the Ruby community!

Posted by Kyle Heon Tue, 29 Nov 2005 01:43:00 GMT

A few weeks back I started this thread on the Ruby Talk mailing list inquiring as to whether there were any equivalents to RoboCode or Terrarium to aid in the learning of Ruby.

The thread went on for days and even broke out into a couple groups forming a project to start development when suddenly RRobots was announced on the list.

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’d love to see a community spring up around this very awesome training tool.

I’ve been playing around with Ruby on Rails now since early this year. I’ve bought and read the books, drank the coolaid, and all that but because I don’t get to program in Ruby professionally (as in at work) I’m struggling to really reach that eureka moment where all things Ruby suddenly make sense and I’m hopeful that something like this might be just what the doctor ordered.

Posted in  | Tags ,  | no comments

Move Complete

Posted by Kyle Heon Sun, 09 Oct 2005 11:46:00 GMT

Well after many nights of struggling I have finally managed to get my site setup on Textdrive using lighttpd and FastCGI.

This new site looks much like it did last time only now it’s powered by Typo which is the premiere Rails blog engine.

Everything from my old Textpattern site should have been copied over, including the comments.

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’t consider myself an expert photographer but I do feel I’m somewhere between novice and expert.

Posted in , ,  | Tags , , ,  | no comments

Ugh, ASP.NET != Fun (like Rails is)

Posted by kheon Mon, 18 Jul 2005 18:18:00 GMT

This past weekend I was able to really spend some quality time exploring Rails, something I’ve been having a tough time finding the time to do. Not the case this weekend.

In order to learn Ruby and Rails I’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’ve managed to port two of the tools over in relatively short order (except the file upload functionality, which I will tackle last).

I didn’t realize how much fun and how quick Rails developing was till I got back into some ASP.NET development that I’m doing at work. It’s been tiring mostly because we are porting some really sloppy third-party CFMX code over. The biggest annoyance I had to deal with all day though was in coding, compiling (wait), and refresh (wait for IIS to rebuild the application) process.

The good news is I’m home now and I can get back into some more Rails fun. Hoping someday we’ll be able to offer Rails applications where I work but for the time being we are primarily an MS shop with some PHP mixed in (but not hosted, we don’t have any Linux servers available for site hosting, only development).

Posted in  | Tags , , ,  | no comments | no trackbacks

Fun with Ruby on Rails and other news

Posted by kheon Wed, 22 Jun 2005 21:10:00 GMT

Well, it’s been awhile since I last updated so I figured I’d update everyone (those few that actually visit this site) on what I have been up to lately.

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 ASP (yeah, Active Server Pages) apps that we have where I work and port them to Rails.

This process has been pretty fun. Instead of just ripping through and getting it down I’ve decided to take a slow, methodical approach and actually learn the “Rails” way of doing things. Thankfully this has still be a pretty fast moving process. I’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.

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’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 RailFrog project. Right now I’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’s still very early in the project planning.

In other news, my daughter graduated preschool a few weeks back and can’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.

Today is my wife’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.

We have watched a ton of movies, I’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 III, 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’t realistic.

Posted in ,  | Tags ,  | no comments | no trackbacks

Rails Beta Book Available

Posted by kheon Thu, 26 May 2005 19:39:00 GMT

The good folks over at The Pragmatic Programmer have released a beta book for the forthcoming Agile Web Development with Rails which is a web framework for my current favorite language, Ruby.

Essentially what they have done is released a pre-release book in PDF format. You pay for it in full now in exchange for getting to download a beta PDF months before the printed book is ready. Once the print book is ready they ship it to you.

This is an awesome concept, especially for the Rails community because while there is quite a bit of documentation on the web, it’s spread out all over the place making it tough to really come up to speed.

I purchased my copy a few hours ago and have my beta PDF downloaded. They are working on a way for those that have purchased this to get updated beta versions as the book matures.

If you are interested in grabbing a copy, swing by here for the necessary details and links.

Posted in  | Tags ,  | no comments | no trackbacks

Success! Apache, Ruby, Rails, and FastCGI

Posted by kheon Tue, 17 May 2005 19:09:00 GMT

I’m starting to get my feet wet with some Linux stuff so I decided to setup a small Linux server. It’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.

This includes:

  • Subversion (1.2 RC3 built from source)
  • Ruby (1.8.2 built from source)
  • Ruby Gems (0.8.10 built from source)
  • Rails (0.11.1 installed via Ruby Gems)
  • Apache (2.0.54 installed with Fedora Core 3)
  • FastCGI (2.4 built from source)
  • Samba

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.

The secondary goal was to be able to play around with Ruby and Rails a lot more as I’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’t really want to.

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 JIT on first request) but after that it seems to scream. I’m happy about that.

Now that I have all of this working I’m going to continue to play around for a few more weeks but at some point I’ll blow everything away and start over, this time hopefully to keep it up for good.

Last, but certainly not least is my ultimate goal with Subversion, Ruby, and Rails. I want to build a Subversion powered CMS using Ruby and Rails. This is an ambitious project for sure, especially as I’m just starting to learn Ruby but I figure if I can find a project that has meaning to me then it’ll make it that much more real. It should be fun.

Posted in  | Tags , , ,  | no comments | no trackbacks