After a couple of months of intense coding Robert Loch and I launched RecommendBox yesterday. Its a site based around requesting and giving recommendations to your friends. There were a few immediate issues!! IE 6 is not yet fully supported, but on the whole it went ok. Now, sleep…….

Due to the incredible amount of spam it was getting I added a captcha today to the fckeditor demo using Captchator which is a pretty easy and quick way of doing it. It means you have to enter the text to create a new note but hopefully will mean things are a lot better.

I should point out that the spam was due to the site (i.e me and a false belief they wouldn’t find it) and nothing to do with the FCKeditor or the plugin.

If you have seen this sort of thing:

ActionView::TemplateError: Expected image.rb to define Image

or this:

SystemExit (exit):
    /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:70:in `exit'
    /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:70:in `rootdir'
    /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:84:in `directory'
    /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:258:in `so_name'
    /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:294:in `load_cache'
    /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.5/lib/inline.rb:678:in `inline'
    /usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:84

in your log files when using ImageScience you may well of been a bit confused and frustrated – I was.

Continue reading »

Dec 202007

I was looking for a neat way to crop images last night and had originally planned to use the excellent jsCropper library from Dave Spurr, which I have used on projects before. When, during a bit of googling about I came across Kropper from Jonathon Wolke. It takes a slightly different approach to Cropper with the crop area staying put and the image moving under the crop area, but also includes a neat zooming feature and some pretty slick design. Another plus, from a Rails perspective, is that the code comes in an example Rails app!!! Makes it very easy to integrate.

Ben Smith who I work with over at Cominded has put up a good article on getting your site to work with the iPhone. Definitely worth a read (as is much of his blog), now all I need to do is find a way to get one – I knew I shouldn’t of been tempted by the N95 (its spent more time being fixed than anything else)!!!!

I have just completed (well apart from moving any assets over) the switch from Typo to Mephisto. It was fairly painless. There was one :dependent declaration that needed fixing in the converter code and other than that pretty much everything I needed to know was in these two posts.

How I converted Type to Mephisto

Finally switched to Mephisto

The solution given for fixing your routes found in the later of these I found also needed this line:

Mephisto::Routing.redirect '/articles' => '/'

to get all my permalinks to work. The result on my memory usage is pretty dramatic and hopefully I won’t get as much spam…..

I have been messing around with Facebook apps recently and I found a couple of articles to be very helpful:

Tutorial On Developing A Facebook Platform Application With Ruby on Rails

Continuing Facebook Applications With Ruby on Rails

Fist in your Facebook

Continue reading »

Out of the box acts_as_paranoid comes with the ability to define a belongs_to relationship as including deleted records (although to get it to work you need to add require File.dirname(FILE) + ’/lib/caboose/acts/belongs_to_with_deleted_association’ to the init.rb file):

class ModelA < ActiveRecord::Base
  belongs_to :model_b, :with_deleted => true
end

This works quite nicely for that ModelA, but what happens if you want to include the deleted ModelA’s from ModelB through a has_one relationship…… its falls over. However that is easily fixed.

Continue reading »

So after a lot of work (mostly done by the three other members of the team – Richard White, Lance Ivy and Ed Moss) the new shiny version of AjaxScaffold has reached RC1 and is available under its new name ActiveScaffold.

Richard White gives a bit more info about it on his blog.

This will pretty much draw to a close this blog being used for the docs as AjaxScaffold will get an EOL stamp once ActiveScaffold reaches v1.0. So thank you to all who have given us feedback and supported the project so far.

We released a new version of AS today which fixes the issues with prototype and rico when using Rails 1.2.1. For details of the issue you can see my previous post.

This is simply a fix for the v3 plugin and contains none of the new (and very exciting stuff) coming in v4. It should be a straight upgrade for anyone on 3.2.2.