Wolfmans Howlings

A programmers Blog about Programming solutions and a few other issues

Epsilon Programmers Editor

Posted by Jim Morris on Sat Sep 30 17:20:15 -0700 2006

I use Lugarus excellent Epsilon Editor for most of my programming editing needs, on Win32 and Linux.

(An exception is for Java programming where I use Eclipse).

... Show more ...

Posted in Linux,Rails,Ruby  |  Tags ide,ruby,rails,epsilon,editor  |  1 comments

Using Ruby SVN bindings to get file status

Posted by Jim Morris on Mon Sep 04 11:51:35 -0700 2006

If you Google around for information or even some documentation on the ruby SVN bindings you will find plenty of comments that it simply is not documented, so when I wanted to add an SVN status check to a UI I was working on (a project browser window for Rails), I had to "Use the source Luke". However given the bindings are actually mostly automatically generated by SWIG, and the actual details are hidden in a goo of swig generated c code, even that was a challenge.

Eventually I realized that the API was almost identical to the c level subversion API, not surprisingly, and for the most part it works the way you would expect. However I could not find any examples of the client status call, so here it is for anyone else struggling with this issue.

... Show more ...

Posted in Ruby,svn  |  Tags ruby,subversion,svn,rubysvn  |  3 comments

Getting f-spot to upload to flickr on KUbuntu

Posted by Jim Morris on Sun Aug 27 20:29:43 -0700 2006

f-spot is a good photo importer and organizer, but it is a gnome application. When I installed it on KUbuntu, which uses KDE, using aptitude install f-spot it worked ok, except I got the following error when I tried to send my photos to flickr.

GLib.GException: There is no default action associated with this location
... Show more ...

Posted in Linux  |  Tags kubuntu,flickr,fspot  |  no comments

Experiences with Komodo Pro and Ruby

Posted by Jim Morris on Wed Aug 09 22:39:06 -0700 2006

I got a license for Komodo Pro, (Komodo-Professional-3.5.3-262321-linux-libcpp5-x86) and started trying to use it, I have the latest KUbuntu, with GTK installed so I had no problems installing Komodo as far as libraries and requirements were concerned, however running it had me stumped, I ran into immediate problems (some of my own making I'll admit).

First I saw a stream of errors on the screen, they didn't seem fatal but are annoying, for instance...

... Show more ...

Posted in Rails,Ruby  |  Tags komodo,ide,ruby,rails,editors,epsilon  |  1 comments

Switching to KUbuntu from Redhat 9

Posted by Jim Morris on Mon Jul 03 13:07:40 -0700 2006

OK it was time I upgraded my main development workstation from a highly modified Redhat 9 to something more up to date that actually gets security updates and has a good package manager.

I have been using Ubuntu for my servers for some time, and like the package management, but I am used to KDE now and don't really want to switch to Gnome on my workstation. So I decided to try to upgrade to KUbuntu.

... Show more ...

Posted in Linux  |  Tags linux,ubuntu,firefox,thunderbird,dualmonitor,xmodmap  |  no comments

Painting exterior siding

Posted by Jim Morris on Sun Jun 11 15:11:28 -0700 2006

I took off a month from work and needed a project, so I decided to repaint the outside of my house. It is an old house with wood siding, the last time I had it painted I asked the contractor to strip the old paint off first as it was peeling badly, I suggested he sandblast it or something first. That was a bad idea, he rented a sandblaster and had never used one and discovered you can't sandblast wood siding (the siding disappears :). Rather than wait for me to come home and tell me about it he decided to go ahead and paint anyway over the old paint. Needless to say that paint job did not last long, you can't paint on top of old peeling paint and get away with it.

So this time I decided I'd do the job myself, after researching the web for how to remove old paint, it was apparent the experts were saying you cannot avoid scraping it off, no mention of sandblasting, but power washers were mentioned, saying they could damage the siding too. Ignoring this I got myself a 2,500 psi gas power washer (Exccel, Home Depot, $299), and indeed found that if you get the head close enough to strip off the paint you also damage the wood, you can get the loosest paint off when the head is about a foot from the wall without damaging the wood, but not much paint comes off, I found the rotating head was most effective.

... Show more ...

Posted in DIY  |  Tags siding,painting,stripping  |  5 comments

metaWeblog api in typo fails on some posts

Posted by Jim Morris on Sat Jun 03 23:32:02 -0700 2006

I was using a ruby script to post my blogs from the command line, and it used the xmlrpc/client which would occasionally fail with this error...

/usr/local/lib/ruby/1.8/xmlrpc/client.rb:546:in `do_rpc': HTTP-Error: 500 Internal Server Error  (RuntimeError)
    from /usr/local/lib/ruby/1.8/xmlrpc/client.rb:420:in `call2'
    from /usr/local/lib/ruby/1.8/xmlrpc/client.rb:410:in `call'
    from send2blog.rb:103
... Show more ...

Posted in Rails,Ruby  |  Tags typo,metaweblog  |  1 comments

Capistrano deploy from local repository

Posted by Jim Morris on Fri May 26 17:08:00 -0700 2006

UPDATE 2006-12-06 I have replaced this with a full blown SCM module that works much better, see this posting

... Show more ...

Posted in Rails,Ruby  |  Tags ruby,rails,capistrano,deployment  |  no comments

Howto format ruby code for blogs

Posted by Jim Morris on Fri May 26 00:14:00 -0700 2006

How do I get that nice formatted ruby code inline?

Well if you are on typo trunk use this...

<typo:code lang="ruby">
   ...ruby code...
</typo:code>
... Show more ...

Posted in Ruby  |  Tags ruby,syntax,highlighting  |  10 comments

Create Rails ActiveRecord Models from DDL

Posted by Jim Morris on Wed May 24 23:20:00 -0700 2006

I had a database with about 60 tables in it, most where simple lookup tables with simple has_many and belongs_to relationships, and I didn't want to manually create all the models, with the associations by hand. I googled around and came across Bill Katz's dbmodel, which takes the output of dbdesigner and creates the models with the relationships. However I already had the Databases and schema setup, and I didn't have (and couldn't find) a copy of dbdesigner to use. So I hacked Bills dbmodel to read a DDL file that was created from the command rake db:structure:dump, as I was using Postgresql this file had all the relevant relationship info in it plus a bit extra.

I added the ability to create the relationships that had non standard table names and foreign keys, and also added some validations to the created models.

... Show more ...

Posted in Rails,Ruby  |  Tags rails,ddl,activerecord  |  5 comments