Evaluation: Ruby on Rails Development Platform. Recently, I’ve been reading a lot about Ruby on Rails as THE new development platform. I decided to learn a bit about it. Whenever I look into this type of thing, my first challenge is to simply get a development bed up and running where I can write a program. I’ll detail my steps in this post and give you an idea of how easy it was to get things up and running and whether I think it can live up to the hype. Step 1: Introducing myself to Ruby on Rails. First stop, Google. Search for “Ruby on Rails” and you get this page. The first result is what seems to be the “official” Ruby on Rails webpage. Good start. I decided to do a little reading. The top-line description is:
Rails is a full-stack, open-source web framework in Ruby for writing real-world applications with joy and less code than most frameworks spend doing XML sit-ups
Getting Started: So, my first question is “What is Ruby?”. I do some digging there too and learn that:
“Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, extensible, and portable.”
So, Ruby is a new scripting language and Rails is a web framework which utilizes Ruby. My first instinct is to compare it to the relationship between Perl and PHP (though if this comparison will hold up remains to be seen). Apparently, Ruby is partially influenced by Eiffel and Ada with some Java and Python thrown in. My experience with all of these languages is minimal (I learned Ada for a week in college and have some some very minor programming in Java) so I’m a bit wary of the learning curve. (Here’s a nice, friendly Ruby tutorial).
Ok, back to the full-fledged “Ruby on Rails”. On the home page there are some nicely produced movies and tutorials on getting started. I go through the following: 1) 15m into video 2) I browse the Ruby Blog to get a quick feel for the personality and the players of the project. Also, I learn that they’re very close to releasing the official 1.0 version of the product. Good to know… 3) The Ruby Wiki also is a good for a quick glance before installation. Especially this page, which give total Ruby on Rails (RoR) newbs like me some background on the project and what it is trying to accomplish.
Step 2:Installation: So, I’m bored with reading by now…it’s time for an actual installation. My personal workstation runs Windows XP SP2, but all my hosted apps are on a FreeBSD platform. I’ll try and install it locally on my Windows box and maybe later, if I’ve got time I’ll put it on my FreeBSD servers. We’ll see.
So, I start off using this page to help me with my Windows Rails installation. I downloaded the latest Ruby Windows installer (available here). That took a few minutes to install. Then, I have to update my Ruby installation using something called “RubyGems” by typing “gem update” at the command prompt. That took a while (>15 minutes). At the end of all this, I’ve got Ruby installed, but not yet the full “Ruby on Rails” framework. Now I need to install Rails by typing “gem install rails –include-dependencies” at the command prompt. This install Rails (which utilizes the previously installed Ruby). Another 10 minutes or so. Then I needed to type “rails {path to rails}”, which creates a skeleton directory for a brand new Ruby on Rails application. Now, I’ve got configure my Apache web server to work correctly with RoR. To do this I first need to download FastCGI (available here) and include a LoadModule command in my Apache httpd file (e.g. “LoadModule fastcgi_module “/mod_fastcgi-2.4.2-AP20.dll”. Then came a whole mess of configuration settings changes in various files which is best described here, starting at the heading which reads “Creating and Configuring a Ruby On Rails Application”. That seemed to do the trick.
This was all kind of a pain in the ass, but only took about 2-3 hours to complete fully (including reading and background learning). So, if you’re relatively familiar with Apache and web technologies in general, you shouldn’t have too many problems. There were a lot of steps involved, but they all seemed to work as advertised. As long as you follow the documentation, you shouldn’t have too many problems. More to come….