Ruby on Rails + MacOSX = Locomotive

Over the next few weeks / months I plan to blog about my experiences of using Ruby on Rails, with this being the first post.

I will be using my iBook (OSX 10.4) to work with rails, one reason is because I want to use my ibook more – I can then justify a new one, and also because it enables me to understand creating websites for linux servers.

In case you don’t yet know, Ruby on Rails is all the rage at the moment. Their website says

“Ruby on Rails is an open-source web framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration”.

I have to admit, I tried it when it was first released and found it really cool, however never thought it would take off – won’t make that mistake again.

Locomotive

Locomotive is an application for OS X to allow developers to drag and drop the installation into the Applications directory, and have a full working Ruby on Rails environment instantly.

Download : http://locomotive.raaum.org/

Strongly suggest you install (sorry, drag and drop) this. It will save you hours!

MySQL

I’m sure everyone has heard of MySQL. MySQL is a open source database application running on almost every platform, offering both commercial and a free community edition. 

I went ahead and installed MySQL 5.0 Community Edition (free) from http://dev.MySQL.com/downloads/MySQL/5.0.html .  OSX installation of this is very simple, has two packages – a main and a startup – I installed the main package first.  After installing both packages you will need to edit your ~/.bash_login script to set the path directory for MySQL.

pico ~/.bash_login
PATH=”/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH”

The default username is root.  Default password is blank – nice and secure.

You can login to the server by loading a new terminal window and entering the command MySQL.  If you have problems accessing the server, you might need to start the MySQL service (or just reboot).

First RoR Application

The application will look something like below (with Aqua effects which got lost in the screenshot)

From within the application you can start/stop the application, open a terminal with RoR commands (like gem), show the application in finder as well as create new applications.

To create a new application, select the Applications menu, and click Create New… which will launch the dialog below.

 

Enter a name, and a directory where the app will live and click Create.

Next, click Run on the toolbar which will start the pre-configured webserver.  Then go Applications > Preview in Browser to view the new application.  The application runs on http://localhost:3000

That’s your first application created.

Conclusion

Just to sum up, Locomotive solves a whole host of problems when configuring RoR on OSX. It gives you a great environment to develop applications.

Over time, I will post more on RoR, locomotive and MySQL.

Apple Replacement Battery Arrived

DHL just delivered my replacement iBook battery.

In a well padded box, there was a return address label, a security label (if broken, void), and a set of instructions on what to do next.

Basically, discharge the recalled battery completely, put it in the box, put the new stickers on, call DHL and ask them to pick it up charging Apple.  Will do that Monday.

 

That was quick and simple!

Playstation 3 Euro launch delayed

Just read on the BBC news website that the PS3 has been delayed in Europe, but will still be released in November in Japan and US.

Blame/Reason: Blu-Ray Drives

The xBox 360 team must be partying right now, another Christmas in Europe without competition (ok, Wii could cause some problems).

Mr Kutaragi has said “I am so sorry not to be able to answer all the expectations,”.  Wonder if he will have to say that again pre/post launch?

Computer Manuals .co.uk

After using a site called ComputerManuals.co.uk for around a year, I thought I should really post something about their excellent service!

An example is as follows:

Yesterday morning, I purchased three new books for uni next year.  The total for the three books came to £49.57 including FREE! postage and packaging and a 5% discount for a review I wrote previous. As an example, Amazon would have been £52.77 with their slow Super Saver shipping (5-7 days).  Yesterday afternoon I received an email saying the items had been shipped – Excellent!

This morning, a DHL van pulled up with the guy holding a average size box.  It just happens to be the books arriving.  Excellent! Not only where the books cheaper than Amazon, but the arrived a week earlier than Amazon would have.

I have had numerous experiences with this company, and all of them have been really good, never had a single problem (touch wood). The great thing about this company is that they attend the large Microsoft events, with a stand so you can have a quick look and buy on the stop and the same great price as online.  Saw them at VS Launch Day, DDD3, the MSDN Roadshow (might attend others I haven’t).

So visit the site, have a look around and see if anything takes your fancy.

Every Friday they update the best new books list so you can see the latest topics on offer. Currently they have the new WPF book on there.

Computer Manuals.co.uk

Sad News: Crocodile Hunter’ Irwin killed

Just read on BBC News online of some very sad news.  Steve Irwin, known for his Crocodile Hunter TV show and the Australian Zoo has died while filming a documentary in Queensland by a stingray.

It is a great shame that some one who has done some much for animals and the environment has died.  My thoughts go out to his family and the animals at this time.

 

Read the report here:

http://news.bbc.co.uk/1/hi/world/asia-pacific/5311…

DeveloperDeveloperDeveloper Day 4 (DDD4) Announced

Just saw on my RSS that DDD4 date has been announced.

The all important day is:

Saturday 2nd December 2006

There is now a call to arms for all developers who want to give a session.

A few have already been suggested here:

http://www.developerday.co.uk/ddd/agendaddd4.asp

The two from Barry Dorrans look interesting, might have to bookmark his blog idunno.org.   Looks like he is coming to Birmingham for the Ed Gibson talk – cool!

 

I will definitely be attending. However, not sure how I am going to get there this year.

Email Down and Bouncing

Looks like my email service has gone down and bouncing all emails to the senders.

Not happy with my hosts for this, I’m ok with email going down – but not bouncing them back to the sender!!

If anyone is trying to contact me, I am sorry, please bear with them.

If anyone knows a good reseller hosting provider cheaply then drop me a email (opps, hmmm, post a comment).

Tempted to get everything going to my email forwarded onto my gmail account in future.

[Update]

Email looks to be back and working – however I do not have my past emails until Friday. All new emails are getting to me.

Apple iBook Battery Recall – Oh No!

Lucky I just saw a post regarding apple recalling batteries (like Dell did). My poor little ibook is ill!!!! My battery is one of the ones required to be recalled. Finding the serial number of the laptop wasn’t easy. On the website it said you had to remove the keyboard (wasn’t looking forward to that) and then on another page says just load up System Profiler J

I always thought it ran hot…

Visit below for more information
http://www.cpsc.gov/cpscpub/prerel/prhtml06/06245.html

http://news.bbc.co.uk/1/hi/technology/5283424.stm

Come on Apple, release that MacBook Pro Core Duo 2!

Ed Gibson: On The Road

Announced at the NxtGenUG meeting was “Ed Gibson: On The Road”.  For everyone who was at DDD3, he gave the talk during lunch and gave an interesting in-sight on security and the internet.

There are events around the country so I recommend seeing if you are able to attend one near you, it should be a good afternoon.  The site is:
http://www.nxtgenug.net/EdGibson/

Hopefully I will be attending the Birmingham event.

I noticed that there is a meeting at Leeds University, hopefully if I am MSP (Microsoft Student Partner), I will be able to bring events like this to Hertfordshire University.