<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Me Ruby, You Jane</title>
    <link>http://merubyyoujane.com</link>
    <language>en</language>
    <webMaster>jongretar@jongretar.net (Jon Gretar)</webMaster>
    <copyright>Copyright 2006-2008</copyright>
    <ttl>60</ttl>
    <pubDate>Sat, 10 Feb 2007 21:25:17 GMT</pubDate>
    <description>Let's make Ruby the king of the jungle...</description>
    <item>
      <title>Mephisto is out, Simplelog is in</title>
      <link>http://merubyyoujane.com/past/2007/2/10/mephisto_is_out_simplelog_is/</link>
      <pubDate>Sat, 10 Feb 2007 21:20:00 GMT</pubDate>
      <guid>http://merubyyoujane.com/past/2007/2/10/mephisto_is_out_simplelog_is/</guid>
      <author>jongretar@jongretar.net (Jon Gretar)</author>
      <description>&lt;p&gt;After a lot of time battling with Mephisto and it's stupid stupid Liquid templating system I have finally kicked it out. Simplelog was chosen as the successor. Only problem is that now I have to create the theme again but I have some ideas for a new one anyway so I guess it will all work out.&lt;/p&gt;

&lt;p&gt;In other news I have been playing a bit with Objective-C and Cocoa. A side effect of that is that I have also been taking a look at RubyObjC and I have found it to be wonderfully better that RubyCocoa. Look for a tutorial from me on that one soon. Or mabey even I will try that screencast thing. Time will tell.&lt;/p&gt;</description>
      <category domain="http://merubyyoujane.com/past/tags/announcements">announcements</category>
      <category domain="http://merubyyoujane.com/past/tags/simplelog">simplelog</category>
    </item>
    <item>
      <title>Rails 1.2.0 is out</title>
      <link>http://merubyyoujane.com/past/2007/1/18/rails_120_is_out/</link>
      <pubDate>Thu, 18 Jan 2007 20:52:00 GMT</pubDate>
      <guid>http://merubyyoujane.com/past/2007/1/18/rails_120_is_out/</guid>
      <author>jongretar@jongretar.net (Jon Gretar)</author>
      <description>&lt;p&gt;&lt;img src="http://www.rubyonrails.org/images/rails.png" align="left" style="margin:4px;" /&gt;Ruby on rails has hit the long wanted 1.2.0 version. It can be installed using the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo gem install rails &amp;mdash;source http://gems.rubyonrails.org &amp;mdash;include-dependencies&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now lets hope that we get a feature lock until 2.0.&lt;/p&gt;</description>
      <category domain="http://merubyyoujane.com/past/tags/rails">rails</category>
      <category domain="http://merubyyoujane.com/past/tags/ruby">ruby</category>
    </item>
    <item>
      <title>Camping for IT</title>
      <link>http://merubyyoujane.com/past/2006/12/6/camping_for_it/</link>
      <pubDate>Wed, 06 Dec 2006 20:50:00 GMT</pubDate>
      <guid>http://merubyyoujane.com/past/2006/12/6/camping_for_it/</guid>
      <author>jongretar@jongretar.net (Jon Gretar)</author>
      <description>&lt;p&gt;&lt;img src="http://code.whytheluckystiff.net/camping/chrome/site/images/camping-small.png" align="right" /&gt; &lt;a href="http://code.whytheluckystiff.net/camping/"&gt;Camping&lt;/a&gt; is a great micro-framework from the legendary &lt;a href="http://redhanded.hobix.com/"&gt;_why the lucky stiff&lt;/a&gt;. It's small size and simplicity give me even more enjoyment than when I work with Rails. But it hasn't gotten the recognition as a tool for companies as it deserves. In many ways Camping should have easier access into the hearts and minds of the system administrators and internal company coders then &lt;a href="http://www.rubyonrails.org/"&gt;Rails&lt;/a&gt; has. A lot of what is written internally for a company is little tools for small changes here and there. Passwords need to be changed and the business software needs to export new usernames or change account informations automatically. Historically this has usually been done with perl cgi-bin scripts or even small PHP scripts. We could start using Ruby cgi-bin scrips from ground up but that wouldn't be very ruby'ish of us would it.  &lt;/p&gt;

&lt;p&gt;But you do run into a few problems when you start using Camping like that. Camping's conventions assume that you are writing something from the ground up. It assumes that you want to use sqlite but if you use mysql then it assumes that everything is in a single database. But things tend to be different when we write our little helper tools. We might want to build a logviewer to look at some logs in a mysql table and then we have to compare that to a user table in a totally different server. Luckily, this being ruby, that is easily fixable in an elegant way.  &lt;/p&gt;&lt;p&gt;Let's write a YAML config file. We could do this all inside the code but I prefer not having anything that needs to be configure inside my code. So make a file called database.yml and write inside it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:radcheck:
    :adapter: mysql
    :host: auth.example.com
    :database: radauth
    :username: USER
    :password: PASS
:radpostauth:
    :adapter: mysql
    :host: syslog.example.com
    :database: radlog
    :username: USER
    :password: PASS
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Easy enough. Now we need to load the confuration into the camping file. Easily enough done. Just make the start of your file look something like this&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/env ruby
require `camping`
require `yaml`

Markaby::Builder.set(:indent, 2)

DBCONF = YAML.load(File.open(File.join(File.dirname(__FILE__), `database.yml`)))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now the next step is to configure your models. First we need to load the database config to each model and we also need to correct what Camping expects the table's name to be. Because camping expects it's name to be appname__table. So just make the model definition look something like this.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;module Appname::Models

    class RadCheck &amp;lt; Base
        self.establish_connection(DBCONF[:radcheck])
        self.table_name = `radcheck`
    end

    class RadPostAuth &amp;lt; Base
        self.establish_connection(DBCONF[:radpostauth])
        self.table_name = `radpostauth`
    end

end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And now you should be able to use the models normally. Hope this helps anyone.&lt;/p&gt;</description>
      <category domain="http://merubyyoujane.com/past/tags/camping">camping</category>
      <category domain="http://merubyyoujane.com/past/tags/ruby">ruby</category>
    </item>
    <item>
      <title>Ruby's and RoR's problem. A sysadmins perspective.</title>
      <link>http://merubyyoujane.com/past/2006/11/18/ruby-s-and-ror-s-problem-a-sysadmins-perspective/</link>
      <pubDate>Sat, 18 Nov 2006 20:48:00 GMT</pubDate>
      <guid>http://merubyyoujane.com/past/2006/11/18/ruby-s-and-ror-s-problem-a-sysadmins-perspective/</guid>
      <author>jongretar@jongretar.net (Jon Gretar)</author>
      <description>&lt;p&gt;Let me make this clear. I looooves the Ruby. But it has a HUGE problem. I feel this a lot as I'm not a programmer. I'm a system administrator for an ISP. Everyone that has ever done that job knows that it includes a fair bit of programming. Hundreds of parsers need to be written. Hundreds of converters. Tens of little cron jobs to do this and that. A bunch of webpages so the customer service can look up logs, reset passwords, delete records and so on. And my ISP has just started being a VoIP service as well so the number of coding doubles for that. But let's not kid ourselves. Ruby web applications have a HUGE deployment problem. &lt;/p&gt;&lt;h2&gt;mod_ruby&lt;/h2&gt;

&lt;p&gt;It's amazing mod_ruby hasn't been fixed. Yeah I know there are many ways around it. Set up proxy service in Apache that uses pen and mongrel processes etc. Or you switch to Litespeed or some other server. But that is avoiding the problem. Although I like using Litespeed at home I just don't have that luxury at work. Because I might have to use the same server to host a subversion repo for example. There is a reason Apache is loved by ISPs. Apache is a one size fits all solution. Apache can do just about everything. Except host Rails application. And I mean really host it. Not just redirect to another service. So let's make this clear. Ruby and Ruby on rails will &lt;em&gt;NEVER&lt;/em&gt; grow up to the size of PHP, not even half, until you can just upload it to a server and it just works. Hosting companies and ISPs just cannot offer RoR hosting until this is fixed. I know there are a few that support it(kinda) but until there is mod_ruby or mod_rails available then we have a problem. Also if the same guy could make mod_camping then he I can name a few system administrators that would kiss his feet.&lt;/p&gt;

&lt;h2&gt;A sidenote of my hate of net/telnet&lt;/h2&gt;

&lt;p&gt;Sorry. It's just broken. net/telnet works fine if only thing you want is to telnet to another fresh linux computer and execute some command. But you actually never need to do that. You use telnet when you need to run some commands on some telephoning server written in 1975 that only worries about one standard... It's own. I had the other day to write a command that logs into a telnet server, lists files, and downloads them to local for processing. And those are hundreds of files. I tried every trick net/telnet had but in the end I had to do such an ugly cheat that I still feel sick thinking about it. &lt;/p&gt;</description>
      <category domain="http://merubyyoujane.com/past/tags/ruby">ruby</category>
    </item>
    <item>
      <title>Jamis harnessed SQL</title>
      <link>http://merubyyoujane.com/past/2006/11/9/jamis_harnessed_sql/</link>
      <pubDate>Thu, 09 Nov 2006 20:47:00 GMT</pubDate>
      <guid>http://merubyyoujane.com/past/2006/11/9/jamis_harnessed_sql/</guid>
      <author>jongretar@jongretar.net (Jon Gretar)</author>
      <description>&lt;p&gt;&lt;a href="http://weblog.jamisbuck.org/"&gt;Jamis&lt;/a&gt; has a &lt;a href="http://weblog.jamisbuck.org/2006/11/7/don-t-be-afraid-of-harnessing-sql"&gt;nice article&lt;/a&gt; on how to Harness SQL. I personally love ActiveRecord but I agree that you should use AR as much as you can, but trying to force all your work into AR even though it may not fit is a mistake.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def instantiate
  list = TodoList.create(:name =&amp;gt; name, :description =&amp;gt; description)

  TodoItem.connection.insert &amp;lt;&amp;lt;-SQL, "Populating items"
    INSERT INTO todo_items (todo_list_id, content, position, created_at)
      SELECT #{list.id}, content, position, UTC_TIMESTAMP()
        FROM todo_item_templates
       WHERE todo_list_template_id = #{id}
  SQL

  list.todo_items.reset
  list
end
&lt;/code&gt;&lt;/pre&gt;</description>
      <category domain="http://merubyyoujane.com/past/tags/ruby">ruby</category>
    </item>
    <item>
      <title>Ruby on Webkit. Anyone?</title>
      <link>http://merubyyoujane.com/past/2006/11/3/ruby_on_webkit_anyone/</link>
      <pubDate>Fri, 03 Nov 2006 20:43:00 GMT</pubDate>
      <guid>http://merubyyoujane.com/past/2006/11/3/ruby_on_webkit_anyone/</guid>
      <author>jongretar@jongretar.net (Jon Gretar)</author>
      <description>&lt;p&gt;I have been looking a bit more on the webkit engine (the HTML engine that runs Safari and Dashboard). What really interests me is the quite impressive features on how it runs outside of normal browsing tasks. Dashboard widgets are basically HTML files and with a hack those can be run as normal software on the desktop. Another cool use of it is in the new Web Inspector feature in Safari. The nice thing about that tool is that it is itself written in html/css. So it is clear to me that you can write pretty impressive desktop tools using the webkit to display the UI. &lt;/p&gt;

&lt;p&gt;What I would love is for someone more talented that me to write a RoR like framework using the webkit rendering engine. Allowing people the make simple desktop tools with the same ease as RoR enabled web development. Anyone up for the task?&lt;/p&gt;</description>
      <category domain="http://merubyyoujane.com/past/tags/ruby">ruby</category>
    </item>
    <item>
      <title>Me Ruby, You Jane is up</title>
      <link>http://merubyyoujane.com/past/2006/11/3/me_ruby_you_jane_is/</link>
      <pubDate>Fri, 03 Nov 2006 20:40:00 GMT</pubDate>
      <guid>http://merubyyoujane.com/past/2006/11/3/me_ruby_you_jane_is/</guid>
      <author>jongretar@jongretar.net (Jon Gretar)</author>
      <description>&lt;p&gt;Me Ruby, you Jane is up. I decided to move all &lt;a href="http://www.ruby-lang.org/en/"&gt;ruby&lt;/a&gt; related weblog posts here and start using my &lt;a href="http://jongretar.net/"&gt;personal website&lt;/a&gt; for a &lt;a href="http://tumblelog.co.uk/"&gt;Tumblelog&lt;/a&gt;. Also what can be gained by the move is that the blog is no longer related to my name and that way other people can post in here.&lt;/p&gt;

&lt;p&gt;As a weblog engine I use &lt;a href="http://mephistoblog.com/"&gt;Mephisto&lt;/a&gt;. It's a hell of a lot better than Typo in most ways but looses a lot of ground by using the horrific Liquid template system. &lt;a href="http://weblog.techno-weenie.net/"&gt;Mr. Weenie&lt;/a&gt;, please. I know it's a nice idea to be able to quickly download and change themes but like this system is then it would actually be simpler and a hell of a lot quicker to edit files in /app/view/layout.&lt;/p&gt;

&lt;p&gt;Well.. I hope this website grows from being a simple weblog to being a good repository of Ruby related things. &lt;/p&gt;</description>
      <category domain="http://merubyyoujane.com/past/tags/announcements">announcements</category>
    </item>
  </channel>
</rss>
