2013-01-10 06:20:28 +0000

Rails has just had a rather nasty security alert, get your application upgraded now. If you know what you are doing, you can follow the instructions inside of the Security Alert notes, if you don’t, then you can get an fixed price upgrade service from reInteractive. But whatever you do, do it soon.

2011-08-06 12:04:00 +0000

I have a 15" Macbook Pro, early 2010 model. It had a 500Gb Seagate 7200 RPM Momentus
drive in it, and had been serving me well over the past year but I wanted to give it
a speed boost, so I purchased a 240Gb SSD for the OS drive and new 500Gb Seagate Hybrid
drive with an OWC optical bay mounting kit for the data drive.

2011-06-30 11:01:00 +0000

2011-05-23 22:04:00 +0000

Last year I attacked a long lost black sheep of the Rails family, ActionMailer. This was because I had a project that needed to use email and I found the current implementation, shall we say, somewhat lacking. This year, I’m turning my attention to really the only remaining black sheep left, ActiveResource.

2010-10-19 18:18:00 +0000

2010-09-30 18:27:00 +0000

I had the situation where I wanted to rename a basic part of the TellThemWhen website, that is, changing the name of “instants” to “notifications”. As this was a major part of the whole website, I had to make sure existing URLs still resolved correctly, luckily in Rails 3, this couldn’t be simpler!

2010-09-24 00:11:00 +0000

RubyX are the maintainers for the RailsPlugins.org website with hosting kindly donated by EngineYard. As the site is all about compatibility with Rails 3, the irony was not lost on us that the site is running on Rails 2.3.5. I will do a series of posts which cover how we updated the site to Rails 3.

2010-09-19 01:31:00 +0000

In my last post I discussed the bubbling up horrors of having our online identity controlled by faceless mega-corporations. But it didn’t really provide any useful direction. This is my attempt to fill that gap. Specifically, how should we go about sharing our thoughts and emotions online, without having to give up the ownership of our data to a centralised body? These are my thoughts.

2010-08-29 23:27:06 +0000

You might run into this problem if you are bringing a Rails 2.3 app onto Bundler, specifically, when you try and run “rake cucumber” or just “rake” for RSpec you get an error about uninitialized constant Rails::Boot::Bundler.

2010-06-13 10:50:10 +0000

Today was the last day I had booked in my hotel room. I had won this room through an Internet bidding service at a heavy discount of $85 per night. However, I needed to extend my stay in the hotel another two days and that is where this relationship went to hell.

2010-04-04 04:43:28 +0000

2010-04-01 17:01:30 +0000

If you are switching over a Rails 2.3 app to Bundler with a Rails App, or you are setting up a new one, you might run into this error when you try to boot rails or run a rake task, thankfully the solution is simple.

2010-03-31 21:40:44 +0000

You know, there are these two guys working in broad daylight on Bundler, Yehuda and Carl (he’s the one in the sidecar), but I don’t think people have really grasped the importance of what they are doing.

2010-01-01 14:11:00 +0000

Recently my father invited me out to a motorkhana day at the DECCA driving facility in Victoria. He asked me to do a write up for him to send out to his members. For something completely different to my usual tech blogs, here it is:

2010-01-01 12:40:00 +0000

“WHATAREYOUSLOWINGDOWNFOR?!” my father shouted over the screaming engine of our BMW e30 racer. I managed to fugitively tear my eyes off the apex for a split second, just enough time to stab a glance of horror towards the passenger seat, but before I had the chance to vocalise my “Because we are going to crash!?” my father rejoined with “THIS IS A FLATOUTCORNER! BURYTHEGAS!”

2009-11-01 21:25:06 +0000

2009-10-28 06:59:45 +0000

Rails doesn’t play well with test-unit 2.x… if you try you get something like: Test::Unit::TestResult::TestResultFailureSupport on from /Library/Ruby/Gems/1.8/gems/test-unit-2.0.5/lib/test/unit/testresult.rb:28

2008-09-10 17:40:04 +0000

If you have been following my posts on Ruby-Talk and Ruby on Rails and even RSpec mailing list (and who wouldn’t?! I mean, aside from my mother) then you would have noticed I have been banging my head against a brick wall on the subject of System calls not being handled by the Timeout libraries in Ruby…

2008-07-12 18:21:30 +0000

When you are coding, you should try to separate out the things that change from the things that stay the same. This isn’t my idea, but it is worth tip’n here as I just saw a really good, simple example of this…

2008-07-07 10:01:02 +0000

2008-06-29 07:02:48 +0000

In my previous post (Spec Behaviour not Implementation) I went on a froth roll about why you should treat controller actions as black boxes. Here I give an all to common example of why this is good and how you can write specs that won’t break at the most trivial change.

2008-06-24 07:22:38 +0000

2008-06-24 07:18:17 +0000

Sometimes when you need someone to just look over your code and figure out what the heck is going on, you can turn to your best coding friend, this friend sits away in the log directory carefully collecting data waiting for your beck and call…

2008-06-02 07:37:55 +0000

When you are making a rails site, you sometimes need to get to the session hash or the params hash and see just what got sent back to the browser, but going in, editing the template and reloading is just a PITA, here is a quick tip that can help you have that (and any other) information no more than a click away, at any time, and any view….

2008-05-11 14:38:18 +0000

If you are using BE DE DE or TE DE DE, then you will get situations in your specs or tests where you want to be able to just create a valid model of another type to test against. This is where factories and builders come in handy.

2008-04-22 18:10:20 +0000

2008-04-22 18:02:21 +0000

Ruby is marvelous, everything evaluates. Which means a lot of the time, you can get away with things like ‘if @user…” and just depend on the existence of the @user var. But what if you just really need a Boolean true or false? Here is a little pattern you can use to do this…

2008-04-20 07:26:31 +0000

What is an <em> tag? How do you manually make a select box? What about a multi value select box? Do you know the difference between a <submit> tag and a <button> tag? Can you hand code a form to make a restful post to one of your Rails controllers? If you can’t do all the above with plain HTML and no rails helpers or don’t know the difference between a GET and POST request and when you use either, then you need to read on. If you can, feel free to skip to the next section.

2008-04-19 07:03:58 +0000

This year on May 15th there is going to be a world wide bloggers unite on the subject of Human Rights.

This is a great opportunity to raise public awareness on the subject of Human Rights. We all have them, but in the modern world of pending global governments (which I think are just another way to remove power from the people) It is time for all of us to become away of what it means to be living on this planet, what it means to be a member of this society, what it means to have a family and what it means to just be you.

2008-04-17 10:23:10 +0000

If you are using Rails, you are most likely using migrations. Have you ever had a migration fail half way through? Have you ever then had to figure out how to find each change and revert it in the database? Would you like to never have to do that again? Here is how…

2008-04-16 12:38:59 +0000

Sometimes it is easy to forget that when you take the plunge to learn something as encompassing as ruby on Rails, you forget just how MUCH you need to learn, and it can all seem a bit overwhelming at first. Here is a good way to go about learning it.

2008-04-15 10:20:04 +0000

If you are using PostgreSQL on Windows and you get: FATAL: pre-existing shared memory block is still in use Or you get: HINT: Check if there are any old server processes still running, and terminate them. errors, here is how you fix it.

2008-04-13 17:27:28 +0000

Did you know that Rails has inbuilt a strong email handling library called (ahem) TMail? I just so happen to maintain this now (Minero Aoki wrote it), but it gives you a great way to validate email addresses…

2008-03-24 11:52:25 +0000

If you are using a Ruby on Rails app, or Nitro, or just a plain Ruby application that handles email, you will need to handle at some point, bounced messages. This a simple way to get to the guts of the email and find out what the error codes are…

2008-03-16 08:05:58 +0000

The Ruby on Rails session is a dark and mysterious lady who is with you ever step of your applications development way… Usually she goes about doing her business without any problems, but sometimes things go awry… and hell hath no fury like a session scorned…

2008-03-15 09:54:31 +0000

And why is it that everyone seems to have an opinion on it? Some people hate it, some people participate in it, other people just don’t know what it is, don’t know what the fuss is about and couldn’t care less…

2008-03-13 05:16:22 +0000

If Mr Hubbard were still with us, he would have had another birthday today. With all the humanitarian works his philosophy of Scientology has sparked, it is interesting to see just who this man is and what he actually did, without all the media induced hoo-ha.

2008-03-12 04:30:50 +0000

I had a situation where I had two tables, one was read only data and the other was where I would put my new data. They both modeled the same object (a person) but I had to figure out how to have ONE object for the system to interact with.

2008-03-07 16:59:38 +0000

This problem actually relates to any site that uses queued effects, I just ran into it on Ruby on Rails. The problem is that if you queue up too many scriptaculous effects on a dom object, you will end up having nothing displayed, or flickering or highlights that never fade etc…

2008-03-02 18:57:26 +0000

If you have a form with some required text fields (like, name, password) then waiting for your users to hit submit is too late to tell them those fields are required. The other option is disabling the submit button until they have filled in the data, here is how…

2008-02-27 17:21:46 +0000

If you are programming a Ruby on Rails AJAX application, you will have to handle system exceptions at some point, because if you don’t, the user gets to sit watching a spinner.gif file merrily spinning away for the rest of his or her natural existence…

2008-02-24 09:36:20 +0000

While working on a recent Ruby on Rails project, I needed to be able to check the changes in the forms that were appearing on the page and highlight those fields on change. I looked around and couldn’t really find anything I liked, so I made one.

2008-02-22 12:42:20 +0000

2008-02-21 12:56:50 +0000

If you are using Ruby on Rails with AJAX to update parts or whole pages of your site, you will hit the history problem soon enough, luckily, with Really Simple History and Rails’ RJS templates and helpers, it becomes quite trivial to handle.

2008-01-16 20:44:31 +0000

2008-01-16 12:25:07 +0000

If you have ruby and a mac, no doubt you want to try out 1.9 – but be warned, some things can break! This little tutorial shows you how to install Ruby 1.9 in parallel to your 1.8.x installation… which can be handy…

2008-01-15 18:47:19 +0000

I have an SQLServer that has dates before 1970. If you have this, then you will get crashes with the latest SQL Server Adapter. This shows you how to get around it while we get it fixed in the adapter.

2007-12-12 15:40:31 +0000

2007-12-10 07:03:18 +0000

2007-12-10 06:39:34 +0000

Ruby on Rails 2.0 includes the ability to load a gem version of TMail instead of the bundled version inside of ActionMailer. However, if you are running on Rails 1.2.6, this doesn’t help you much. Here is how you take advantage of the latest fixes to the TMail library and stay in the 1.2.x branch of Rails

2007-12-10 04:31:09 +0000

“Mikel, I need a website to promote the Drug education campaign we are doing, needs a contact form, signup form and lots of basic information, oh, it would be good if it could have a blog on it as well – maybe in the future.”

This was the brief I got a few weeks ago to make http://www.drugfacts.org.au/...

2007-12-04 04:55:13 +0000

2007-12-02 11:14:40 +0000

2007-12-02 09:16:09 +0000

Being constantly connected to the Internet is a double edged sword. The volume of distractions are just massive and keeping your focus can be difficult. At least that is how it is for me. This is how I solve it…

2007-11-27 17:06:21 +0000

2007-11-26 19:34:30 +0000

Sometimes you just have to go ahead and do it the hard way.

The last three days was that time for me. I had to write an application that interfaced with an existing MS SQLServer system, and I couldn’t change the schema of any existing table… what to do? Well… I can tell you it was a lesson in the difference between being opinionated software and bigoted software…

2007-11-19 15:40:09 +0000

If you use Google webmaster tools, you would have used the sitemap.xml file to tell Google about the pages your site has. While there are tools to make this, I wanted it to be automatic, so I made Rails make it for me!

2007-11-15 04:36:39 +0000

2007-11-14 14:16:30 +0000

RSpec allows you to write nice readable tests… and some little tricks make it even nicer! And I don’t know about you, but the word lambda is (1) ugly, (2) means basically bugger all and (3) is hard to pronounce late at night… so lets replace it!

lindsaar.net is proudly bought to you by the letters l, i, n, d, s, a, r, e and t.
The comments on this site belong to Mikel Lindsaar and do not reflect the viewpoint of my employer, parents or anyone else.
Powered by Sinatra