Rails install on RHEL5

[ Posted by James Harton Tue, 26 May 2009 04:11:21 GMT ]

So I don't think it's any secret that I am not a big fan of Redhat and it's products. Sure, they've funded some great Linux projects, but their operating system continually lags behind it's major competitors.

Installing Rails on RHEL5 is an almost entirely manual process, but sticking with my philosophy of doing as little work myself as possible, I'll use Redhat's package manager yum to install as much as we can; turns out that's not much:

~ # yum install ruby ruby-devel ruby-libs ruby-irb ruby-rdoc subversion-ruby

Okay, so at least we have a working Ruby. Next we need to get Rubygems installed:

~ # wget http://rubyforge.org/frs/download.php/35284/rubygems-1.1.1.zip
~ # unzip rubygems-1.1.1.zip
~ # cd rubygems-1.1.1
rubygems-1.1.1 # ruby setup.rb
rubygems-1.1.1 # cd ..
~ # rm -rf rubygems-1.1.1

Next, since it may be years later that you are reading this, you probably want to run gem update to update to the latest version.

Next, use Rubygems to install Rails:

~ # gem install rails

Now you're ready to start coding. Just for comparison's sake, let's look at that whole process on Debian or Ubuntu from a completely clean fresh install:

~ # apt-get install rails

'Nuff said. Thanks to Tech Trivia for the pointers.

Posted in  | Tags , , , , , , ,  | 2 comments

Stalkr Widget

[ Posted by James Harton Fri, 22 May 2009 04:33:16 GMT ]

I've just thrown together a small widget for Stalkr that allows you to display your contact information on your blog or website. It's really easy to use, just add the following code to your page where you want the widget to be:
<script type="text/javascript" src="http://www.stalkr.cc/widget/jamesotron"></script>
obviously replacing "jamesotron" with your Stalkr login. You can see the output on the top right of this page. Feedback is appreciated.

Posted in , ,  | 2 comments

Qimo - Linux for kids

[ Posted by James Harton Wed, 20 May 2009 21:54:41 GMT ]

I've been spending a little bit of time trying to find a Linux distro that is usable for pre and early school age kids, I haven't found a lot (yes, I've played with OLPC's Sugar, but it didn't blow my mind). I came across Qimo while browsing Boing Boing as part of my daily time-wasting routine in Cory's post, Great OS for babies?. Whilst I agree with a number of commenters that giving a child who still hasn't figured out the rules of their physical surroundings too much access to a virtual environment may be counter-productive, I do believe that my kids are actively searching for stimulation in a large number of ways. I wouldn't put Qimo in front of my 15 month old son very often, or for extended periods of time I would let my five year old use it to reinforce her reading and arithmetic learning.

Qimo Screenshot

Qimo is built upon a standard Ubuntu 8.10 distro, and contains the usual suspects in terms of Ubuntu's standard installed software. Where Qimo differs is that by default it displays a slightly more kid friendly version of XFCE Desktop with almost everything superfluous removed in favour of a small dock-like launcher at the bottom at the bottom with only a few apps listed (the full suite of Ubuntu installed apps is still accessible via the Q menu on the top left of the screen) including the likes of GCompris, TuxPaint and Childsplay.

One thing I liked straight away over Qimo's main competitor, Edubuntu, is that Qimo seems much more targeted for children to actually interact with - things are kept friendly looking and uncluttered - Edubuntu appears to be mainly an even brighter coloured theme to the standard Ubuntu with a few extra bits and bobs installed by default. Edubuntu is targeted at a slightly different user base, however, being designed for school children of all ages and teachers.

I've yet to give Qimo a whirl in front of the kids, but I hope to do that over the coming couple of weeks and will gauge their reactions and post about it here.

Tags , , , , , , ,  | 1 comment

This operation cannot be undone

[ Posted by James Harton Tue, 19 May 2009 05:15:43 GMT ]

I have a new phone. Not because I particularly wanted a new phone, or at least this one. The interesting thing about this phone is that it's a usability nightmare, but rather than write a long and impotent rant about the legion problems with it, I'll focus on a single issue;

This operation cannot be undone

and posit a maxim

if an action is immutable then either reengineer the problem so it's not or bite the bullet.

In other words, there are two possible things you can do about it;

  • Make it undoable.

    Here's the example that inspired this article, when I have read an SMS message I attempt to delete it the phone tells me "This operation cannot be undone. Do you want to delete this message?" Forgetting for a minute the fact that in order to reach this dialogue I have to have selected More options and then Delete message from the phones rather dinky and ridiculous menu system, it's annoying for the reason that some developer (or, more likely, developers) thought about their user's experience enough realise that there may be situations in which the user might accidentally delete a message that they wanted to keep but rather than actually fixing the problem decided that bugging the user with an extra unnecessary step was the best solution. This is wrong for at least two reasons, firstly users, when routinely confronted with nonsense dialogues will quickly form the habit of clicking without reading thus effectively removing any possible intended good, and secondly (and far more importantly) the messaging application in this phone is already complex enough to handle POP3, IMAP, Exchange, MMS and SMS all with their own attendant Inbox, Outbox and Sent folders. Where is the pain in simply moving the message to a Trash folder and periodically purging old messages like every mail client since Pine has routinely done?

  • Bite the bullet.

    Sometimes a user is going to tell you to do something bad, and you just have to assume that they know what they're doing, for example if I type:

    $ sudo rm -rf /

    then I somewhat reasonably expect that my machine is going to dutifully do exactly what I asked it to do, ie; swallow itself whole. Even my Mac, the epitome of usability, will quite happily do this for me.

Why have the particular developers chosen to do the unthinkable and make the users experience that little bit worse (this is by no means an isolated incident)? The excuses are many, and most will boil down to constraints; time, cost or scope constraints. None of these is the real reason, the real reason is that the organisation responsible has failed to make quality sexy. Hint: if you're asking the user a question, you better make the interruption worth their while.

You're quire correct in guessing that I'd rather have an iPhone, but I don't think it's too much to ask that people who write any software that people interact with every day should make that interaction as smooth as possible.

Tags , , , ,  | 1 comment

We Are The Pirate Bay

[ Posted by James Harton Tue, 19 May 2009 01:06:40 GMT ]

Swedish artist Montt Mardié decided we need an anthem for filesharers everywhere. Montt wants people to download the original video and audio and remix it in their own way. You can see some of the remixes by looking at the video's responses on YouTube.

Montt himself says:

An artist has got to make a living just like everybody else, there’s no doubt about it. And these are tough times, believe me I know. The thing is though, if I were to go back in time, 10 years or so, and tell the 15-year-old version of myself that over a night, 60 000 people had heard one of my songs, the first question I’d throw back at myself wouldn’t be “how much money did I make?”.

You can donate to Montt via his paypal through his website.

Posted in  | Tags , , ,  | no comments

Hosting for creative projects

[ Posted by James Harton Mon, 18 May 2009 22:38:23 GMT ]

I've been spending a bit of time lately thinking about where to get our creative projects hosted. I hesitate to call projects like Flittr artistic, but they're definitely creative. I think of it as a toy. Currently Flittr is hosted on Marek's VM but since cheap VM's operate on low memory footprints and Marek has his own Mono projects to host I can't host any additional projects on his box, even with Passenger and Ruby Enterprise keeping the memory usage to a miminum.

Of course, given Marek's well documented love for Mono he has suggested we try using IronRuby, which I'm happy to give a go but not on the production system (and I don't have time at the moment to set up a development environment).

That's where Heroku comes in. Heroku is a cloud-based Ruby hosting service, from their site:

Heroku is a platform for instant deployment of Ruby/Rails web apps.

Heroku is a completely novel approach to deploying web applications. Forget about servers; the fundamental unit is the app. Use the Heroku client gem to create and manage apps from the command line. Then deploy your code with Git, and control the running app with the remote Ruby console and rake commands.

Sounds good. What's the catch? Well, for free you get 1 dyno and 5MB of storage. Which is great unless your app uses a lot of resources. Now Flittr uses relatively little CPU and RAM (well, as little as any Rails app can) but has a growing database (currently 68MB) because it stores the state of every Flittr ever sent to someone's browser for repeatability and stores basic image metadata because hitting Flickr for each image is a very costly operation. So, if you have a small Rails app then definitely look at Heroku first. What are your other options? We'll cover them in the next installment.

Posted in , , ,  | no comments

Typo on Heroku

[ Posted by James Harton Sun, 17 May 2009 23:45:06 GMT ]

Somehow it's fitting that my first blog post here on Mashd should be about getting Typo to run on Heroku. I kept getting errors about conflicting gems. It seems that json-1.1.3 is bundled in vendor/gems by Typo when you run the installed. In order to fix it I had to do:

$ git rm -r vendor/gems/json-1.1.3
$ rm -rf vendor/gems/json-1.1.3
$ git commit -m "rm json gem from typo"
$ git push heroku master

Posted in ,  | Tags , , , , ,  | 1 comment