Engines and sub-apps

Posted by tom February 25th, 2007

Just came across this article by James W. Long. I think the statement he’s making is a very valuable one: Rails DOES need (and deserve) something better than Engines. Not that engines are bad, on the contrary, it’s a good step in the right direction. And no, Engines are not Evil.

Moved this site from Radiant CMS to Mephisto

Posted by tom February 25th, 2007

Today I’ve moved this site from Radiant CMS to Mephisto. It’s not that I don’t like Radiant CMS (anymore), instead I like some of it’s concepts better than Mephisto’s. It’s just that this site is a blog and I need blogging capabilities. Of course I could have done with a comment-plugin, but there’s more to it: assets, comments, etc. Hey, I might move back later!

Moving from Radiant CMS to Mephisto is a no-brainer, I just wrote a small Ruby script which did the trick. I could use a similar script to move back. But I must say Rick Olson and Justin Palmer did a wonderful job with the Admin interface!

However, Radiant CMS’s template system is far more advanced and well conceived than Mephisto’s: Liquid. Choices, choices! Anyway in the mean time I’ve setup a Radiant CMS test-site for my own testing purposes.

What I actually hope for: a merger between the two, but that is probably never gonna happen…

Ruby Gems got me confused

Posted by tom February 23rd, 2007

Recently (well okay maybe not so recently?) there were quite a bit of changes to RubyGems, one of which is that require_gem is deprecated. Previously I could say:

require 'rubygems'
require_gem 'mygem'

This would automagically require ‘mygem’ because of spec.autorequire. There’s also:

require 'rubygems'
gem 'mygem', '>=0.0.8'

This doesn’t do a require ‘mygem’ but I’m able to indicate a version which should be used. Then, which by now should be the standard (if I read everything correct):

require 'rubygems'
require 'mygem'

But where’s the version in that? Maybe this would be an even better solution:

require 'rubygems'
require 'mygem', '>=0.0.8'

But this doesn’t work: ArgumentError: wrong number of arguments (2 for 1). The question is: What is the solution? What should I use and what shouldn’t I use?

SFTP Drive for Mac OSX

Posted by tom February 13th, 2007

Today I’ve found this totally new gem: SSHFS for Darwin. It’s brilliant! It allows you to connect to a SFTP host and use it as if it was a local volume. It’s for 10.4 (Tiger) only. So this together with TextMate make a perfect couple for me.

This week a colleague and myself have been working hard to create a Ruby extension which allows Ruby to make RPC calls to UniVerse and UniData (the IBM U2 databases). The module has been dubbed U2, the class UniRPC. It implements the intercall interface, and from that the functions: open, close, opensession, quit, readlist, execute, read, write & delete. Within the c-code it translates the @FM separated records (and readlists) into Ruby Arrays (for easy access). It currently does not translate @VM, @SM & @TM to sub-array structures, but maybe one day…

We’ve also created a ActiveRecord-like class to work with U2 files (tables & records) all in all pretty interesting!!

WBXML4R: WBXML for Ruby

Posted by tom February 4th, 2007

Today I’ve created my very first Ruby Extension: WBXML4R. It’s a pretty simple extension, but I needed it very badly. It translates WAP Binary XML to XML and back, now if somebody can explain me how to wrap this in a gem I’d appreciate it. It uses wbxml2-0.9.2 available from here. If you want it drop me a mail.

The idea for it’s use is simple: I want to write a small Ruby server which will allow my P990 to sync with it.

Read the rest of this entry