Rails and Merb are merging

December 23, 2008

Thanks to the Tulsa.rb mailing list, I just heard some big news. Rails and Merb are merging. While I have never actually used Merb, I know there is a very enthusiastic community behind it. I was first introduced to Merb by Brad (a/k/a iBspoof) at a Tulsa.rb meeting, and I even heard Merb’s creator, Ezra Zygmuntowicz, speak at the Voices That Matter Professional Ruby Conference in November. I had avoided learning it simply because I felt like Rails was more mature and better documented, so it seemed better suited to a beginner. It will be interesting to see what develops as the two teams work together to make Rails 3.

Getting started with Rails

December 21, 2008

With so many good online tutorials on getting started with Rails, I won’t attempt to duplicate one here. I will, however share some of the highlights and pitfalls during my very early days of learning Rails.

My first real exposure to Rails was when a book on my BookMooch wish list came up as available. I had added Agile Web Development with Rails to the list several months before, after hearing so much buzz about Rails. I was excited to receive the book and start digging in. I was a bit disappointed, however, to discover that some of the code in the book didn’t work on my system. I had followed the instructions in the book to install Ruby, RubyGems, and Rails, but at some point, I started seeing error messages when trying to run the sample code.

I eventually figured out that the book was written for Rails 1.0, but I had installed version 1.2.3, the current version at the time. Being new to Rails, I didn’t realize just how rapidly things were changing in the Rails world. I checked the publisher’s web site and realized I had the 1st edition of the book, and that the 2nd edition had just been released a few weeks earlier. I quickly ordered that edition from Amazon (actually paying for it this time), and eagerly awaited its arrival.

When the 2nd edition arrived, I again dove in, and started working with the sample code. Somewhere along the way, Rails 2.2 was released. Once again, I had a “dead tree” version of a book that was out of date. At this point, I discovered how easy it is to install multiple versions of Rails. All it takes is one simple gem command to install a different version of Rails, or any other gem for that matter:

gem install rails --version 2.1.0

Doing this does not remove the older versions of your gems, so you can select which version of Rails you want to use when creating a project:

rails _2.1.0_ --database=sqlite3 testapp

Note that I specified SQLite as the database engine. I prefer using SQLite over MySQL during the learning stages, simply because it requires no extra setup. The databases are created automatically with rake, and there are no usernames and passwords to fiddle with. Just make sure you have the sqlite3-ruby gem installed first:

gem install sqlite3-ruby

If you haven’t taken the time to learn Rails, start now! Grab a book or an online tutorial, your favorite caffeinated beverage, and start hammering away. I don’t regret the time I have invested, and I doubt you will either.

Riding the Rails

December 7, 2008

Welcome to railsrider.com! I am starting this blog for several purposes. Much like weight-loss blogs motivate the overweight to shed the pounds, I am hoping that by making public my journey to becoming a Ruby on Rails developer, I will be motivated to continue down that path. I also hope that, by sharing my experience, other beginning Rubyists will be encouraged, and will find the resources they need to walk down that same path.

First, a bit of introduction is in order. I earned a B.S. in computer science in 1996 from Oral Roberts University in Tulsa, Oklahoma, back when Ruby was little more than a glimmer in Matz‘s eye. As you may have guessed, computer science isn’t one if the more popular degrees at small, Christian, liberal arts universities. Nonetheless, I am thankful for my time at ORU, as it helped prepare me for so many things that would come my way afterwards, in every aspect of my life.

While I never even heard of Ruby at ORU (Ruby 1.0 was released several months after I graduated), I did study Smalltalk a bit in an object-oriented programming class. Quite frankly, I just didn’t “get” Smalltalk, or OOP for that matter. I have the same thing to say about calculus-based physics, but that’s for another blog…

I really appreciate your visit, and I hope you will subscribe and join me in this adventure.


Follow

Get every new post delivered to your Inbox.