John Leach

Category: Ruby on Rails

My NWRUG Ferret Talk

Created · Ruby on Rails, Tech · 2 comments

I did a short talk on Ferret, the Ruby "Information Retreival Library", at the North West Ruby Users Group last Thursday.  We had a bit of a theme too, with Will Jessop speaking about Sphinx and Asa Calow speaking about Solr.

I got to have a bit of a nosey around the Manchester BBC building too - though I was worried I'd open the wrong door and end up on TV. Didn't fancy having to apologise to Jeremy Paxman.

Continue reading “My NWRUG Ferret Talk” →

Leeds Ruby Thing #2, Thursday 6th March

Created · Last updated · Ruby on Rails, Tech

The Leeds offshoot of the North West Ruby User Group is meeting again this Thursday, 6th March, 7:00 PM - 11:00 PM.  This time at Mr. Foley's
Cask Ale House
, on The Headrow (formerly Dr. Okells).

Expect unstructured discussion of Ruby, Ruby on Rails and other random stuff plus nice people, great beer and coffee and geeky tshirts.

The balcony back room of Mr Foley's has been booked.  Announce that you're coming on the upcoming page.

Continue reading “Leeds Ruby Thing #2, Thursday 6th March” →

Leeds Ruby Thing, Victoria Hotel 7th Feb 2008.

Created · Ruby on Rails · 1 comment

Some of the people of the North West Ruby User Group (who usually meet in Manchester) have organised the first little Leeds get together.  No real name yet, so it's the Leeds Ruby Thing for now.

No clear plan yet either, but expect unstructured discussion of Ruby and Ruby on Rails at least.

Thursday 7th February 2008 at 7pm in the Victoria Hotel pub. All welcome!

Continue reading “Leeds Ruby Thing, Victoria Hotel 7th Feb 2008.” →

North West Ruby User Group Talk: Building Brightbox

Created · Last updated · Personal, Ruby on Rails

Oh, btw, I'm doing a talk tomorrow at the North West Ruby User Group in Manchester about how we do the Ruby on Rails hosting at Brightbox.

I'll be talking about SANs, Centos, Ubuntu, Xen, Apache, Lighty, NGINX, MySQL and other goodies. Heck, I might even mention Ruby, which would be nice considering it's a Ruby user group.

My business partner Jeremy will be nattering about the business side and various other things.

Continue reading “North West Ruby User Group Talk: Building Brightbox” →

Rubinius multiple instances, one process

Created · Ruby on Rails

Rubinius has support (as of today!) for running multiple instances of it's VM within one process, each VM on it's own *native* thread, each VM running many ruby green threads. Each VM has it's own heap and so each VM could load different apps that wouldn't interfere with each other. We have plans for a mod_rubinius for apache that takes full advantage of this feature. Stay tuned ;)

Continue reading “Rubinius multiple instances, one process” →

Reliable rake task execution

Created · Last updated · Debian, Ruby on Rails, Tech, Ubuntu · 3 comments

My News Sniffer project needs to regularly do some back-end stuff like checking a bunch of rss feeds and downloading web pages. I do this with some rake tasks, which I call using the cron daemon.  Recently I've been having problems where some tasks take a bit longer than usual to complete and end up running in parallel. This slows things down, which means more tasks end up running in parallel and then my little virtual machine eventually falls on it's face under memory pressure.

I could implement some locking in my application, but it's always good to avoid as much new code as possible so, in the good old *NIX fashion, I cobbled together a short bash script taking advantage of existing tools. What this does is executes the given rake task in the given rails root using the Debian/Ubuntu tool start-stop-daemon (provided by the dpkg package, which is therefore always installed). start-stop-daemon uses a pid file to keep track of the rake program for the given task, so it will never run a second concurrent instance of rake for this task. Cron just keeps trying to run it every 5 minutes or whatever, but it only runs once concurrently.

Continue reading “Reliable rake task execution” →

Eclipse IDE

Created · Last updated · Ruby on Rails, Tech

Eclipse logo I've just tried out the Eclipse Integrated Development Environment. It appears to be named Eclipse due to how it consumes all your CPU and RAM, overshadowing anything else you might want to do.

I tried the RadRails addon thing out for developing Rails. It has some nice features but is rather a big jump from vim, which I've been using up until now. And to the best of my memory, vim has never crashed once. Whereas Eclipse has already crashed about 10 times in 24 hours.

Continue reading “Eclipse IDE” →

Segfault in Ruby Ferret query parser

Created · Ruby on Rails, Security

Whilst working with the Ruby text search engine library Ferret, I came across a segfault in the query parser. It had already been reported and fixed, but I realised it can lead to a denial of service.

If you use Ferret anywhere that allows users to execute queries, those users can crash the Ruby process with a specially crafted query.  This was quite serious for a number of my sites (not to mention slowing development of a current app) so I applied the fix to the released 0.11.4 source and repackaged it as 0.11.4.1.

Continue reading “Segfault in Ruby Ferret query parser” →

local and remote subversion repositories with Capistrano 2

Created · Ruby on Rails, Tech

Peeking at the code of the upcoming Capistrano 2, I noticed you can define different scm variables for remote and local use, which is something I need (I was looking at the code in the hope it could do this :)

So, say I have my code stored in a subversion repository on my local disk, say file:///project/trunk. That’s fine for when Capistrano is querying the latest revision, but the remote servers need to use the repository url svn+ssh://mymachine/project/trunk.

Continue reading “local and remote subversion repositories with Capistrano 2” →

Leeds Ruby on Rails Talk

Created · Last updated · Ruby on Rails

Ruby on Rails logoI'm talking about Ruby on Rails at the West Yorkshire Linux User Group on Monday 11th June 2007. I'll be covering what Rail is, how it works, and how you use it. Starts at 1900hrs at the E.C Stoner (snigger) Building at the University of Leeds. There follows a talk about Sun's ZFS file system by Tom Hall, then we retire to The Victoria Hotel pub for some real ale and whatnot.

Continue reading “Leeds Ruby on Rails Talk” →