Hand cart on the (Ruby on) Rails
In my previous post I detailed my problems getting NetBeans 6.0 to use the native Ruby installation on OS X Leopard. So, we pick up the story with that issue resolved.
Ok, time to create a new Rails project and get started. I go through the standard steps in NetBeans and am informed that there is a problem with my gems directory, and NetBeans thinks I am using Rails 1.2.6, instead of the 2.0.2 I installed. The error message sends me off the NetBeans wiki for details. So, off I go to figure out how to add GEM_HOME and GEM_PATH to my environment, so NB will recognize my gems directory. After about 30 minutes of surfing for answers I find the right combination of pages that allow me to piece together the answer.
I’m now running with a freshly created Rails project, complete with a database, with tables.
NOW, I can start coding. So far, the NetBeans/OS X combination has been more frustrating than it should be. Hopefully, I’ve completed all of the initiation rites.
Accelerating From a Stop
Ok, step one: Install Netbeans 6.0 Ruby version. No problem here, it works like any other package install. Now to configure it to my taste. The main change is to change the default Ruby engine from the included JRuby to the OS X installed 1.8.6 version of Ruby. I have nothing against JRuby, but at this stage I don’t want to debug JRuby related issues, so I want to stick with the de facto version. On Windows the location of your local Ruby installation is easy enough to find, c:\ruby\bin\ruby.exe. On OS X I looked all over for it. It ran fine from the console, so it was installed and worked. But, where is the binary? I looked in the usual places, that I could think of, no joy. So, I turned to my local OS X/Ruby/NetBeans guru: Google. After much searching, I found a page with the path I needed. It seems that Ruby has been “framework-ized” into OS X. But, the binaries have been symlinked to: /usr/bin/ruby. Problem solved.
Step two: MySql. Downloaded. Installed from package. Done. Well, I need to install an OS X admin util. But, I can administrate it from the command-line in the meantime.
I opened the Depot Rails app from the Agile Rails book, ran the DB migrations and fired it up. Success.
Ok, I have a usable environment. Time to code.
Right turn ahead…
Ok, now back to software development topics. In particular, my current interest in Ruby, and it’s current killer app (framework): Rails. As for the post title, look here. It’s my hope that following the Rails won’t end up similiarly, but if you read stuff like this, you have to wonder. Although Zed seems to be generally pissed at life, he takes it out on the Ruby on Rails “community”.
I just got a new Apple MacBook Pro laptop a couple of weeks ago. I’ve been getting it all set up with my preferred apps. And, getting it set up to do some RoR development. OS X 10.5, Leopard comes with Ruby and Rails installed, which makes it easier to get started. I installed TextMate, the preferred Mac text editor. I also installed the Ruby version of Netbeans. I’ve been an Eclipse (and IBM Rational Application Developer, Eclipse with an IBM clown suit*) user for several years. Prior to that I used JBuilder and Forte, Netbeans predecessor. Eclipse has become a conglomeration of every plugin that can be imagined. It used to be the fast and slim alternative to Netbeans. Netbeans 6.0 is a cleaner, slimmer, and more focused IDE than Eclipse. I wish I could use it for Java development at work. I’ve played with the Ruby version of Netbeans 6.0 on Windows XP, with Instant Rails. Very nice, except for the Windows part.
So, I am going to try to document my journey down the (Ruby on) Rails.
* Credit for this description goes to my friend Kelly.