Scott Rutherford

Life on and off the Rails

 

The Reading Festival

August 29th, 2006

What a great day this was. I only went to the Sunday, but really that was the one that mattered because of Pearl Jam – who were amazing. They played for 2 hours, with 2 encores and unexpected highlights such as Iron Man from Eddie on the ukulele. I think everyone there would agree they were witness to something very special and at times pretty moving. Its been a long time since Ten first blew me away, and many memorable moments have unfolded with it (and other of their albums) as a soundtrack.

It would be remiss of me not to rave a little about Placebo, who despite a couple of unfortunate technical issues put on a great show. The Dresden Dolls were also great, their version of War Pigs (on piano / drums) was of particular note. But, in the end it was Pearl Jam who stole the day.

Read the rest of this entry

I’ve just released the next version of the FCKeditor plugin. The main change in this version is the addition of the spell check functionality using ASpell. A big thank you to Ken Pratt for providing the patch for that and at the same time providing a solution (I hope) to the routing issues that some people have had.

If you already have this plugin installed you can upgrade by just deleting the existing install and getting it again. If you have altered the fckcustom.js file then you will need to add:

FCKConfig.SpellChecker = 'SpellerPages';

to it . If not just delete that too before reinstalling. You also need to be sure that ASpell is installed along with any dictionaries you want to use (If you are on windows check the README for the expected install directory).

Read the rest of this entry

Tuscan Milk

August 22nd, 2006

I was pointed a the customer reviews of this product on Amazon last week by a friend of mine (Richard Hill), and they are well worth spending a couple of minutes browsing, some of them are genius.

According to the New Tork Times it all started like this:

- ’ “We don’t hate Amazon; we just thought it was funny,” said Jeffrey Gates, 21, of Hopatcong, N.J., who along with a 27-year-old friend, Neal Strassner of Daytona Beach, Fla., kicked things off on July 20 by posting their own reviews.

They then posted images of their comments, along with a call for followers and a pulsating back beat, at ytmnd.com, a site that breeds send-ups of pop culture. (The pair’s page is at awesomemilk.ytmnd.com.)

The response was good, but a link from the blog Boing Boing on Friday blew the lid off. ‘

Read the rest of this entry

Web Design Meetup / YUI

August 17th, 2006

Had a great evening last night at the Web Design Meetup on Great Portland St in London. Simon Willison gave a very interesting talk (even the lack of a functioning projector didn’t detract) on the Yahoo javascript / AJAX libraries that have been open sourced for us to all enjoy (there are his notes from a previous but similar presentation here, Simon is obviously a bit of an evangalizer for the Yahoo UI libraries and why not…)

Niklas Richardson also gave a speed introduction to Flex 2, which despite my general opinion of Flash I have to admit was very impressive.

In following up on these people I then came across the Brit Pack page which has some very interesting people / sites / info. Check it out.

Ok, I admit I overreacted slightly to the Rails bug and have now realised I was talking rubbish. So here is a release that works with 1.1.6 and plays well with everybody. It also updates the install code and moves the fckcustom.js config file out of the base fckeditor install directory. This means that you can update or delete the install without having to worry about removing any customizations you have made.

In the new fckcustom.js (public/javascripts/fckcustom.js) there is also now an example of creating your own toolbar which can now be included using

<%= fckeditor_textarea("object", "field", :ajax => true, :toolbarSet => 'Simple', :width => '400', :height => '200') %>

As Jeff Owens has pointed out there are still issues with the Flash upload and I will try to address those as soon as possible.

This release fixes the plugin for Rails 1.1.6. The fix is has been applied by overriding the new version of “safe_load_paths” in “routing.rb”.

However, I am not really happy with the current fix as it won’t play well with other plugins doing the same or with Engines. I think the answer is to convert this to a Rails Engine and let that system handle the routing.

It seems to me that the new fixes leave only two options to plugins developers:

  1. copy any files to the apps directory when installing
  2. use Engines

Not too sure I like copying loads of files around, if only because I don’t like the idea of the same thing existing in mulitple places within a single app. So that means Engines – therefore seems like a version of this functionality should be in the Core (especially if you are gonna stop the existing ways of dynamically creating a controller).

Great video from YouTube, I though it was a Fat Boy Slim video when I saw it over someones shoulder in the Mac store in London last week. But its not its a band called Ok Go.

Read the rest of this entry

Acts_As_Taggable with User

August 13th, 2006

Good step by step guide by Ben to adding user ids to the acts as taggable plugin.

The article fails a little short of covering all bases:

  1. the tag_list method doesn’t take the user into account
  2. the delete tags isn’t linked to a user

but, it is a good start.

This fixes a couple of bugs and upgrades to version 2.3.1 of FCKeditor. The are a couple of changes to the way things work:

1) No controller, helper or view copied to the Rails app directory (you need to delete these if upgrading)

2) The editor files can now be included using
<%= javascript_include_tag :fckeditor %>

No spell check yet, and there are some issues with the file upload refreshing the resource browser after completion. Also there are no progress indicators for the ajax requests which can leave you wondering what (if anything) is going on.

Read the rest of this entry

Prototype Links

August 11th, 2006

Found a nice overview of the prototype library .

And then found Encytemedia and these articles about graceful degredation:

  1. graceful-degredation-with-prototype-rails-part-1
  2. graceful-degredation-with-prototype-rails-part-2

Encytemedia is the blog of Justin Palmer, and he has made a great job of customizing Typo.

I have set up a project for the FCKeditor plugin on RubyForge. Now, you can just install it using:

ruby script/plugin install svn://rubyforge.org//var/svn/fckeditorp/trunk/fckeditor

This will take care of the install process meaning you can just include the editor in your views using the helpers described in my previous post.

These helpers also now include :height and :width options to set the size of the editor. Both of these options are used like so – :height => ‘400’.

Read the rest of this entry

Unobtrusive Javascript

August 9th, 2006

It was a good evening yesterday at the LRUG meeting in Clerkenwell (Skills Matter). Both of the presentations were interesting, but it was the talk by Tom Armitage on ‘Ruby on Rails from the Other Side of the tracks’ that sparked my interests most. Although, I have to admit it wasn’t really the content on designers and programmers working in perfect harmony that got my attention as much as the talk about the Rails javascript helpers and the nasty javascript that they produce. This is outlined in a good article by Dan Web‘Rails is the Devil on you Client Side Shoulder’

Tom mentioned a plugin that has recently been released by Luke Redpath and Dan Web which (in Luke’s words) “allows you to use CSS selectors to attach Javascript events to your page. This plugin allows you to make use of the event:Selectors library, but in Ruby, directly from your controller or view and have the resulting behaviour rules dynamically generated at runtime in an external javascript file.”. This seems to me to be a much nicer way of doing things, nice one Luke and Dan.

FCKEditor Plugin for Rails

August 7th, 2006

Following on from my experiences with FCKEditor and Rails, I decided to wrap the whole thing up as a plugin. This can be downloaded here or installed using the plugin install command, see this post

It basically combines and extends the following pieces of work:

  1. Integrate FCKEditor with your Ruby on Rails application By Joshua M Charles
  2. Implementation details for FCKEditor integration with Ruby on Rails
  3. FCKEditor On Rails

The end result is the editor with a working resource manager and a set of helpers that allow use with both AJAX and basic HTML forms.

Read the rest of this entry

Rails Recipes - Chad Fowler

August 6th, 2006

Bulding Rails apps, buy this and read it cover to cover first, you will be amazed at how many issues have been solved for you. The book is comprised of a selection of ‘full’ recipes (sort of full plans to achieve something – like versioning) and snack recipes (hints on improving your code – postback actions). I would say I will probably use around 50% of them within the next couple of months.

Read the rest of this entry

Using FCKEditor In Rails

August 3rd, 2006

We (Cominded) have been looking at various rich text editors to play with and I went through a few before eventually deciding that FCKEditor was worth a more detailed look (Others included TinyMCE which is available as a Rails plugin, but isn’t really upto FCK’s standards. It did have the advantage of being under the Creative Commons license, but as we are creating services this ended up not being the deciding factor).

Read the rest of this entry
This blog used the Shay theme as a base and is powered by Mephisto