Problems with Mint on Typo

Mint is a wonderful statistics package and if you haven’t tried it out yet I seriously suggest you do.

However, when installing Mint on a Typo weblog some users may have encountered an interesting problem. When entering http://yoursite/mint you get a 404 File not Found. However if you enter http://yoursite/mint/index.php it all works fine.

The problem arises because Rails is trying to map the directory mint to a controller. We want Rails to ignore the mint directory so that we can see it. This is a rather straightforward task.

The answer can be found on the Mint forum. Paste the following code into your .htaccess file which is in the public directory.

RewriteCond %{REQUEST_URI} ^/mint.*
RewriteRule .* - [L]

That’s it. You needn’t do any more. If you want to know what is going on then keep reading.

RewriteCond

The line beginning RewriteCond defines a condition for the the RewriteRule it precedes. The condition takes two pieces of information. The first is a string to test and the second is the pattern to look for in the test string.

The %{REQUEST_URI} string is a server variable, in this case the URI entered into the browser by the user. The ^/mint.* string is the pattern to test for. The pattern specifies that the requested URI start with the string /mint and has anything following it.

RewriteRule

The next line, beginning RewriteRule specifies that the request should not be directed anywhere. The . (period), according to the mod_rewrite documentation, means “Any single character”. Therefore a request for /mint does not get redirected.

The last bit [L] stops the rewriting ending the condition.

Bibliography & Useful Links

  1. Typo (Ruby on Rails) : Configuring Mint
  2. Module mod_rewrite URL Rewriting Engine
  3. URL Rewriting Guide

If anyone has any links they think might be useful, feel free to post them. Any corrections to the article are more than welcome, I’m no expert.

Rails for designers

Rails can be difficult to get to grips with. I am still having trouble. Kevin Clark has come to the rescue.

Kevin Clark has put together a wonderful little article on Rails aimed at designers. It covers the parts important to the rendering of pages. It is an excellent starting point even if you aren’t a designer.

RoundCube Webmail Project

I have never been satisfied by any webmail system I’ve used. They all seem really ugly and never work the way I want them to.

RoundCube on the other hand finally provides a system that looks great and works really well. It is really quick and easy to install. Go and get it.

JavaScript Bibliography

I really like it when people provide all the sources that they used when writing an article or tutorial. It would be nice to have a plugin that helped you do this when writing.

A couple of days ago I was having a chat with Alex, one of the people I work with. We were talking about blogging and Wordpress and how it was nice when people provide a list of related links and sources used to write an article.

Alex put together a some JavaScript which looks at the body of your article and makes a list of all the links.

The only thing is some of the sources may not have been mentioned in the article. These would probably need to be put in a custom field or entered manually into the article body.

Another possibility would be to use the links section to archive sources and general links (whether they were used or not) and attach appropriate ones to an article.

Layout

Not as soon as I had hoped. Here are some useful resources I have come across on my travels that I found very helpful.

I have never really had any training in graphic design and as such am always trying to improve the way I design. Garret Dimon has written a nice article at YourTotalSite which gives some useful tips for design on the web.

Mark Boulton is another person who has some very useful wisdom to share. Mark has written a collection of articles on the subject of layout for print and the web. Since reading them I have applied the knowledge only to find that the whole process was quicker, more enjoyable and produced great results.

Here’s a list of Mark’s articles.

I hope you find them as useful as I did.

Some kind of direction

Over recent months I have been sorting out getting a job and moving to London. Now I am here I can finally get something done.

It has taken quite a while to get my site set up the way I wanted it but I have finally got something I am happy with. There are many things I have to catch up on so I am going to use my site as a place to talk about my findings and possibly to get feedback.

First up on my list is page layouts. I’ll post some links to articles some time soon.