Webreakstuff's blog on design, development and strategy. Click here to subscribe.

Ruby on Rails with Darwinports

Fred Oliveira on March 18, 2005

If you haven’t heard about the hype, you should. Ruby on Rails is a great new web application framework that’s behind stuff like basecamp, tada-lists, 43things, among other awesome stuff. While I’ve been using RoR on a few machines, I had to format my powerbook (don’t ask) and install stuff over again, so I kinda polished my choices in terms of software installation.

Yesterday I wrote about a darwinports-based installation of subversion. Now its time for Ruby on Rails. This assumes you know how to setup darwinports (if you don’t, check this post):

* sudo port install ruby
* sudo port install rb-rubygems
* sudo gem install rails
* sudo ln /opt/local/bin/ruby /usr/local/bin/ruby

These four steps will get ruby, compile it and its dependencies, install rubygems (ruby’s own “package” management system), and use gems to download, configure and install the Ruby on Rails framework. The last step links your darwinports ruby binary to the location RoR looks for it by default.

From this moment on, you’ll have rails installed and ready to work. You may now begin coding your next web application by running rails /pathtothenewapp. From this point on you can tackle your way through RoR’s ever-increasing documentation.

Why use darwinports with Ruby on Rails?

By using darwinports to install ruby and rails you are guaranteed a few things: by having darwinports compile ruby for you, you get binary code optimized for your own machine; it is much easier to update ruby (or rubygems) through darwinports when there are updates; you don’t mess around in your BSD subsystem files which is a good thing if you’re a computer cleanliness advocate like me.

Thanks to Aaron Johnson for the note concerning the change from “rb-gems” into “rb-rubygems” in darwinports


Comments on this post

Broqn Labs / Blog » mod_fastcgi and RoR with DarwinPorts

[...] rch 21, 2005 mod_fastcgi and RoR with DarwinPorts If you’ve seen my post on setting up Ruby on Rails using darwinports on OSX, you probably know what I&#8 [...]

Aaron Johnson

Hi -

I think

sudo port install rb-gems

has become

sudo port install rb-rubygems

fboliv

It has indeed, thanks a lot for the comment. Fixed.

Sorry, the comment form is closed at this time.