"Have nothing in your houses that you do not know to be useful or believe to be beautiful." - William Morris

Rails: Action Mailer ‘302 found’ error

Posted: August 21st, 2007 | Author: | Filed under: Technology | Tags: , , | No Comments »

I’ve just been banging my head against an issue with my Rails Action Mailer (action_mailer) not sending emails. I know the application used to work, but thought the upgrade to the latest Rails had scuppered it. Every time I’d try and send an email the server console churns and then simply says: 302 Found.

So I turned on the full debugging in my config file (config.action_mailer.raise_delivery_errors = true) and this meant I got a time out error shown. Pinging my mail server gave a rapid response, so that was obviously not the problem.

Turned out it was simply that my local host blocks port 25, the standard SMTP port – forcing you to use their local SMTP for all outbound mail. Simple. I used this handy guide to connecting to SMTP from the command line over Telnet to help identify that port 25 was blocked. [ADDENDUM: If you need to authorize yourself on your telnet server then read this to find out how, and this to learn about base 64 encoding on the command line].

Luckily my host provides an alternate SMTP port number for just such an eventuality, but otherwise it means you have to set up your local development SMTP to match your local ISP information.


Mac Firefox Not Printing – Fixed!

Posted: August 11th, 2007 | Author: | Filed under: Technology | Tags: , , | No Comments »

I got a new printer the other day, which works fine but for some reason I can’t print from Firefox. With any page I hit command-P, the Print dialog comes up but nothing got to the printer. Pressing ‘Preview’ instead of print meant a progress dialog appeared but no preview turned up. Great. The temporary solution was to cut and paste the link into Safari which printed just fine.

Well after a bit of digging I’ve found the solution. Following some hints from the Firefox forums I closed down Firefox and restarted it from the terminal in safe mode, you have to be in the Firefox.app folder:

./firefox -safe-mode

On running this Firefox starts up as usual. I then tried printing again, and on hitting ‘Preview’ the following error message appeared in the terminal window:

WARNING: Font “Times” with style 0 can’t be handled by the imaging system. This document can’t be drawn/printed with this font.

Ah hah! A clue. So based on this I found a handy hint at MacRumors, that simply suggests going into Firefox Preferences – Content and changing your default font, I choose Arial 16pt. As if by magic, hitting Print then Preview opened up a preview PDF. Hoorah, all solved. So now I can just open Firefox as usual (not in safe mode) and everything prints just fine. Phew.

UPDATE: 2007-12-02

Recently I’ve been finding this solution has not been working for all pages, and over-riding the fonts for pages is not the best solution. It now turns out the issue may have been to do with me disabling the wrong ‘Times’ font family in font book – I’d disabled ‘Times’ and left ‘Times New Roman’ active. So in running firefox in safe mood I had the following error:

WARNING: Font “Times” with style 0 can’t be handled by the imaging system. This document can’t be drawn/printed with this font.

Going into Font book and enabling Times, this error went away and the page printed.

Obviously this isn’t a great solution, and having to close Firefox to restart in safe-mode just to find out what font you’re missing is a bit stupid to say the least. Why can’t we get a nice dialog box warning, or be allowed to replace problematic fonts? And why do fonts render fine on-screen, but then fail to print?

Versions pertaining to this issue:

  • MacBook Pro 2.2GHz
  • OS X 10.4
  • Firefox 2.0.0.6

Mac Life: Fixing ‘Drag & Drop’ Firefox Pain

Posted: August 1st, 2007 | Author: | Filed under: Technology | Tags: , , , , | No Comments »

While I’m still loving my new MacBook Pro there are definitely moments of pain that I could do without. One of those recurring pains has been from Firefox, in that every time I want to drag a link into one of file bookmark folders a really long and annoying tooltip pops up saying; “Drag and drop this icon to create a link to this page”. This tooltip fades after three seconds, but often the folder I want to drag the link into is underneath the tip.

Well thanks to a tip from PK you can now rid yourself of this interloper. Simply type about:config into the address bar at the top of Firefox, this will make a list of configuration properties show up. Then find the one that says browser.chrome.toolbar_tips and double click it to set it to false. Bingo. No more tooltips, and no more obstructions to bookmarking.

One thing to note about this solution is that it disables all tool tips, not just the one we don’t like, but for me that’s a liveable solution. It’s also a reminder to everyone developing UI to keep your tool tips short!


MacBook Pain: Won’t Boot, Very Hot – Fixed

Posted: July 28th, 2007 | Author: | Filed under: Technology | Tags: , | No Comments »

This morning I had a mild heart attack as my new MacBook Pro decided not to come back up from sleep mode. It had been sitting on my desk all night, plugged into the power having being put to sleep. I opened it and heard the fans whirring away, but nothing happened on screen. After a few minutes I held down the power key to re-boot it – on starting back up though I just had the grey apple logo and spinning wheel, but no visible progress!

I rebooted the machine a few times, and once it got through to the login screen, but in the background the ‘OS X Booting’ dialog box stayed on the screen. So I rebooted again, thinking that would clear it down – but then it wouldn’t come back up at all. Great.

I restarted the machine in verbose mode (press Command + V on startup) and watched the output, all good until a SATA disk drive error (something about block 0 missing) came up repeatedly on screen. OK. So a hard drive problem, my worst nightmare. This time I rebooted into single user mode (Command + S) and ran fsck – ‘File System Check’ – it turns out that most of my hard drive settings were out by a few blocks at all levels, and some parts were completely missing. Ug.

Luckily fsck repaired the drive successfully, and after entering reboot at the command line the machine came back up without apparent problems. Phew. I then backed up my recent files to DVD just in case and had a coffee.

Of course now I want to know what caused this. A few posts online indicate similar problems – my machine was super hot, even though it was off and recharging – had that upset the hard drive? In which case it’s something that could easily happen again. Or is this something to do with installing MacFuse recently so I could try and write to my PC shared NTFS drives? A lot of the posts with the same problem had been running Parallels, a Windows exection package. If anyone has any ideas please let me know!


$100 Laptop – An Overview

Posted: July 23rd, 2007 | Author: | Filed under: Technology | Tags: | No Comments »

The One Laptop Per Child project has released details of their new $100 laptop. This laptop was designed for poorer countries without good network & power infrastructure so it has some fascinating features. Key features that really stood out for me; the low power consumption architecture – designed to work with manual & solar charging methods, the screen that flips between colour / black & white to make it readable in direct sunlight, and most impressive, the rabbit ear wi-fi aerials that flip down when the laptop is closed, but when open allow transmission over up to 2 km. Also, the proprietary version of Linux on the machine is set up to create resource sharing networks, or a ‘mesh’ – meaning that when one laptop is connected to the Internet, then any laptop can connect via the wireless to share the connection. Genius. The BBC has a great overview here.