OSX Lion is the latest incarnation of Apple’s flagship operating system and last week the official GM seed was sent to developers for testing. Yesterday I put it through it’s paces and have been happily surprised with the performance and improvements laid out in the latest release, attached is a quick video of Lion in action in all it’s one solid O/S.

To note,

  • Launchpad for Apps (iOS)
  • Mission Control
  • FaceTime now integrated
  • Address Book UI upgraded (more like iOS Books)
  • Reset User Password via Apple ID
  • Touchpad Gestures now a core part of the O/S
  • Masses of UI improvements, gone and the rounded corners.
  • Can set specific desktop background per Virtual Desktop / Space
  • Fancy drag animation when moving files (gets out of the way of the cursor)
  • Loads more…

On the App side everything still works pretty well, the following apps operate fine on Lion:

  • Photoshop CS5
  • Transmit
  • Coda
  • CornerStone SVN
  • CSS Edit
  • OmniGraffle
  • VLC
  • Tower
  • TextMate
  • MAMP & MAMP Pro

These Apps have visual problems that need fixing for Lion:

  • Versions (opens main window & other regardless, sidebar cut-off)
  • Espresso (desktop background seeps into interface)

Regarding official release date for OSX Lion my gut feeling says mid-July, in all the builds done and dusted just up to Apple to sign-off on things so you may be lucky and find it in the App Store this Tuesday.

Nice work Apple.

Today we’ll install the latest stable version of Ruby on an Ubuntu Linux machine, let’s begin…

Fire up Terminal and type the following to install RVM:

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

Once installed you’ll have to add the following to the end of your .bashrc file to make rvm accessible from the prompt:

vim ~/.bashrc

Scroll down to the bottom, hit I to switch to insert mode and paste the following into the file, then hit ESC to switch to select mode, then type :wq to write the changes and quit the file.

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

Run this to refresh your terminal and pick up the changes:

source ~/.bashrc

Next install the pre-requisites for Ruby via:

sudo aptitude install libc6-dev libssl-dev libmysql++-dev libsqlite3-dev make build-essential libssl-dev libreadline6-dev zlib1g-dev

And install Ruby

rvm install 1.9.2 -C --with-readline-dir=/opt/local
rvm 1.9.2

Check it’s installed via:

ruby -v

And finally set it to default as:

rvm 1.9.2 --default

Job done.

Tonight I got the macbook out to run thru the ‘15 minute blog video’, one word… WOW! this thing is powerful, and way intelligent.

Thought I’d write some notes on how to get Ruby on Rails running on your macbook too, as if you’re a geek like me (and wanting to cut your dev time in half) you’re gonna want to, so here goes…

To setup Ruby on Rails on your Macbook, first download Locomotive, unpack the .dmg file and drag it into your applications directory.

Do the same for MAMP, downloading it and putting that in your apps dir (MAMP gives you Apache, MySql and PHP all in one tidy package). You may need to register or give your email address to obtain a copy but other than that it’s all good.

Once you’ve done that, fire up MAMP and Locomotive; you now have a web server and Ruby on Rails running on your desktop, pretty cool eh?

Point your browser to ‘http://0.0.0.0:3000/’ to see it in action.

However your gonna have trouble accessing your mini MySql server unless you switch to Locomotive and enter ‘/Applications/MAMP/db/mysql/’ in the Preferences/Terminal/’Additional Paths’ box. Doing this will tell Locomotive where to find your database server.

Now to create your first Ruby app, in Locomotive, select ‘Applications/Create New…’ then type the name of your new app.

To edit the source of your app, in Locomotive, select ‘Edit in TextMate’ and your away (TextMate is a powerful text editor built for the mac, you need to purchase it, $39, but it’s well worth it; trust me, includes lifetime updates so never need to again).

…one thing though, to make your app talk to your database fully, in TextMate, open the ‘config’ folder and edit ‘database.yml’, make your settings like;

development: adapter: mysql socket: /Applications/MAMP/tmp/mysql/mysql.sock database: blog_development username: root password: root host: localhost

This will tell Ruby to connect to the MySql socket and use the default username & password you get set to on first install of MAMP.

Restart MAMP & Locomotive and get on with the lessons at www.rubyonrails.org

Final words, Ruby is an intelligent language so what you name things will mean a lot more, things like making a table of posts for a blog; call it ‘posts’ and Ruby will know what your intended use for them is, like calling a to-do list ‘to-do’; things have more meaning.

Ruby hasn’t been around long, only since 2004, but is gaining a massive following due to the speed in which you can build complex web applications. The web pages themselves ‘.rhtml’ are generated as you run them.

To add new packages, or ‘gems’, use the ‘gem install’ command when in Locomotive (Applications/Open Terminal). And to generate new MVC parts, type ‘./script/generate ‘, Ruby makes heavy use of the MVC model, keeping the three components of your application separate at all times; minimising the time spent bug-fixing your app.

Drop me a line if you get stuck,

Till next time,