Installing Ruby on Rails

 
avatar

I probably should have posted about this earlier, but I didn't. About a week ago I wanted to begin actually developing some use Rails, and I wanted to install Ruby, Rails, and some other things onto my machine to have a local development environment. I have to say that it was extremely easy. Personally I use Macs, and I went through the process outlined by this article: Building Ruby, Rails, Subversion, Mongrel, and MySQL on Mac OS X. I'm sure there are simple to follow instructions for installing the whole thing on a PC as well somewhere.

A simple overview is that the first thing to install is Ruby. Ruby is a object-oriented scripting language from Japan, which is gaining popularity more and more recently. As it turns out, Mac OS X ships with Ruby installed, but by following the instructions in the article above you update to the most recent version, which is always a good idea.

Once Ruby is installed, you move on to installing Rails. Rails is a web framework that allows you to create web applications. The really nice thing about installing Rails, and most of the things on in the process outlined for installation, is that they install as "gems". These are little Ruby modules that are included in a RubyGems package, and they make installing modules extremely simple. Essentially, rails creates all the files for a web application, and ties them together to send information back to a web browser. However, in order to do that we need a web server. Mac OS X comes with Apache built in, but there is another method outlined here.

Mongrel is a Ruby web server, and can be run when you are developing applications. Once all of this is installed (including the additional apps they recommend, like Subversion) you can create Ruby applications using Rails and serve them from your local computer to your web browser. No internet connection is required, and there is no uploading and downloading during development. It's much like having PHP compiled (mac os X comes with that, too) on your machine and being able to develop PHP websites right on your local machine.

And, of course, once you have all of that installed be sure you have a database application such as MySQL. It just so happens that MySQL has a nice package for Mac OS X that installs a preferences pane as well, so starting and stopping MySQL is simple. Make sure to also change your root user password once you install, as you don't want to leave it blank, even on your local computer.

I've been toying with Rails a bit, and I plan on getting into creating my first application once I get caught up on some work. I'll post again about what I discover, but I have a lot to learn. It is definitely differnent when you are developing with the Terminal and TextMate rather than Dreamweaver. However, it promises to be interesting.

Category: Developers' Corner | Tags: Ruby on Rails

0 Comments

Rss-sm

Sign-up to receive EcommerceNotes, our acclaimed email newsletter.

View A Sample | Privacy

Connect with us

Bloggers Wanted

We’re looking for merchants and other ecommerce professionals to share their experiences with our readers. If this interests you, we invite you to contact us.

Help

Featured Tags | All A-Z

 

Inside Practical eCommerce