Tag Archive for 'command line'

Ruby on Rails in Leopard in 5 minutes

So I just discovered that Leopard comes with a version of Ruby on Rails (RoR) pre-installed. The only problem is its a bit dated but there is a command-line one-liner to update it all no sweat with RubyGem (the Ruby package manager):

sudo gem install rails

of course you can also get RubyGem to update itself too:

sudo gem update --system

I love systems that keep themselves up-to-date.

Then to get going, get back to the command-line and create the project somewhere with mysql support:

rails -d mysql ~/Sites/myNewApp

And it should generate the basic RoR site layout. To test it, run the build in web server:

cd ~/Sites/myNewApp
ruby scripts/server

And then point your favourite web browser at http://127.0.0.1:3000/ and your away!

I’ve just started to learn Pythons answer to the MVC framework race: Django, but I’m lazy and when I came across this info this morning and how easy it was to get RoR up and running on Leopard I was suckered in. I guess I’ll learn both and compare the two at some point.

Convert .dmg to .iso


hdiutil convert /path/to/filename.dmg -format UDTO -o /path/to/savefile.iso

For Mac OSX only of course