Tuesday, 27 May 2008

Moved to Typo!

Note: The RichText blog has moved to www.ricroberts.com

This blog has been moved to www.ricroberts.com, so I could host it on Typo.

This post explains how I imported all my old blogger posts into the new typo installation.

Note that the feed has remained the same: feeds.feedburner.com/richtext.

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Please also visit the Swirrl blog

Friday, 23 May 2008

Read More About Swirrl

Note: The RichText blog has moved to www.ricroberts.com

As I mentioned a while back, my current project is 'Swirrl'.

Swirrl helps you store, share, edit and analyze the information you need to run your business. It's like a wiki, but better.

Recently I've been putting together some more information on what Swirrl does and why you might want to use it. Please take a look at the new Swirrl home page and Read More page.

There's also a registration form where you can leave your e-mail address if you want to be notified when we are ready to accept sign-ups. We’ll also announce it on the Swirrl blog if there's any other news on progress.


Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Please also visit the Swirrl blog

Friday, 14 March 2008

Lighting your campfire with fluid

Note: The RichText blog has moved to www.ricroberts.com

Inspired by blog posts from Robby Russell, and thoughtbot, we've recently started using Campfire for
text-chat between our distributed Swirrl team members.

As we all use macs, we were previously using Apple's iChat, with aim/.mac accounts. However, we often had connectivity problems with this, and so I went on the lookout for something new.

Although Campfire doesn't let you display a 'status', we use the idea that if you're in the chat room then you're available for chatting, and if you're not, then you're either away or don't want to be disturbed. This works fine for us. One major benefit of Campfire is that the transcripts of all chats are stored on the server for easy searching.
fluid logo
As is usual for a 37 signals application, The user interface is clean and intuitive. If you're on a mac, the user experience can be further enhanced by using fluid. Fluid lets you create what it calls "Site Specific Browsers". These are bascially uber-bookmarks that you can put in your dock, and let you launch a site in its own little browser as if it was a standalone app.

When using fluid, if you have any unread messages in a chat it handily shows up the dock icon (the image for which can be downloaded here).

If a conversation gets too complicated for text-chat, we still resort to an iChat voice chat, for the reasons described in this old post. iChat also offers the benefit of screen-sharing if you're on Leopard.

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Please also visit the Swirrl blog

Wednesday, 12 March 2008

Brightbox Rails Hosting

Note: The RichText blog has moved to www.ricroberts.com

I recently wrote about Swirrl's choice of Rails host, Brightbox, on the Swirrl Blog.

You can read what I had to say here.

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Please also visit the Swirrl blog

Thursday, 6 March 2008

Rails on Mac OS X Leopard

Note: The RichText blog has moved to www.ricroberts.com

We'll get to the instructions for setting up rails on Leopard in a moment, but first a bit of background...

A few days after it was released, I changed over to using Mac OS X 10.5 (Leopard) as my platform for developing rails apps. When I first installed Leopard it took me a little while to figure out the best way to do things, as Leopard comes with lots of rails development features pre-installed.

Recently, after reinstalling my OS, I had to figure some of it out again as I hadn't made enough notes. So this time, I thought I'd document it properly and share it on my blog for the benefit of others (and so I don't forget too!).

As you might remember from this post last year, I'm a fan of using Netbeans for my rails IDE. Since that post, it has come out of beta and is now a fully fledged release (currrently at v6.0.1).

However, I couldn't get its step-through debugger to work with Leopard's installation of rails. I think is is because Netbeans assumes certain relative paths between the ruby interpreter and your gems, which differ in the Leopard standard install.

After being inspired by this post by Robby Russell, I decided to use Macports as my solution. Macports gives you a self contained environment for installing stuff. Everything installed under Macports lives in /opt/local, so if you mess up your Macports environment, you can easily just trash this folder and start again.

Installation Procedure

Here goes... The following instructions walk you through how to set up a development environment with Ruby, Rails, MySQL, Netbeans and Subversion on OS X 10.5 "Leopard".

Before doing anything else, we need to install the Xcode tools from the Leopard DVD. Just double click on the installer and away it goes.

Download the installer from the Macports site, and run it.
(I used the dmg for v1.5.0 for OS X 10.5, but I think v1.6.0 is out now so you might want to try that one).

Now, for MySQL, I just downloaded the package from the MySQL site, and installed it.

The problem I've found with this using this package is that the preference pane and automatic startup item don't work quite right, but there are workarounds for this. In particular, this worked for me:

"[...] the working MySQL.prefPane is here

and to get the StartupItem to work (see bug#25008), copy the (if existent)
/usr/local/MySQLCOM directory to /Library/StartupItems/MySQLCOM "

There are also some great free GUI tools available on the MySQL site too. At the time of writing, there isn't a dedicated package for these available for OS X 10.5 -only 10.4, but it works fine.

Set paths
This step is important! Dont skip it.

edit ~/.bash_profile, for example using TextMate:
mate ~/.bash_profile

and add the following line:
export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

(As I mentioned before, anything installed in Macports is installed under opt/local)

Save the file, and restart your terminal session to pick up the changes.

Install ruby and rubygems in Macports

sudo port install ruby
sudo port install rb-rubygems

Install all your required gems

For example:

sudo gem install rake
sudo gem install rails
sudo gem install capistrano
sudo gem install termios
sudo gem install mongrel
sudo gem install mongrel_cluster
sudo gem install ruby-debug
sudo gem install ruby-debug-ide

(The ruby-debug and ruby-debug-ide gems above are required if you want step-through debugging to work in Netbeans).

I just use the subversion installation that comes with Leopard, as this works fine.

Download Netbeans from here, and run the installer. (For developing rails apps, you just need the 'ruby' bundle).

Debgging in Netbeans
In Netbeans, under Preferences->Ruby, set the ruby interpreter to /opt/local/bin/ruby
The fast debugger radio button should become available - select it.

That's pretty much it. You should now have a fully functioning setup for developing on rails.

Note: I use svn over ssh to access my subversion code repository. Below are some instructions for getting this to work with Netbeans. You can safely ignore all that follows if this doesn't apply to you - Netbeans works fine 'out of the box' with svn over http...

svn+ssh in Netbeans
In order to get the svn+ssh protocol to work with Netbeans, you need to set up a ssh key, and set your mac up to remember it. Here's how to do this

1. Create a pair of keys on your local machine.
From your home directory on your mac, run the following command:
ssh-keygen -t dsa

This will prompt you for a secret passphrase - make sure to use a good passphrase. When this is done you will get two files called id_dsa and id_dsa.pub in your ~/.ssh dir.

2. On your server, ensure that the .ssh directory exists for the user
Log in to your server via ssh
ssh myuser@myserver.net

make a .ssh hidden directory
mkdir ~/.ssh

3. Place your public key on your server
On your mac, run
ssh myuser@myserver.net 'cat >>.ssh/authorized_keys' <~/.ssh/id_dsa.pub

4. Try to log in to the server
ssh myuser@myserver.net

You will be asked for the passphrase

In OS X Leopard, there is a user interface for ssh-agent which will ask you if you want to remember the passphrase, and will store it in your keychain. From then on, you wont need to enter a password or a passphrase for this user.

5. Edit the subversion config
This step is required because, although when you check out from an svn repository in Netbeans, the dialog asks you for a tunnel command, it forgets that when you restart the IDE.

On your mac, edit the ~/.subversion/config file (note: this file wont exist unless you've previously run Netbeans)
mate ~/.subversion/config

Add an entry under the [tunnels] section like this:
ssh = $SVN_SSH ssh -l my_ssh_username

Save the file.

Now, Netbeans will be able to access your svn repository over ssh without needing a password from you.

6. Checkout from your repository
In Netbeans, If you go to the Versioning->Checkout dialog, you will see that the tunnel command is pre-populated for you. Just enter your repository location eg:


and everything should work fine.

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Please also visit the Swirrl blog