views:

1097

answers:

3

I have started to think in RoR as an option to develop my applications, but I don't know much about it. I usually deploy my applications to Windows XP or Vista based PCs and use SQL Server as database.

Which are the system requirements to develop a Ruby on Rails application?

+4  A: 

Even a year ago, Ruby on Rails applications were obnoxiously hard to deploy. (And I say this as somebody who loves Rails.) But today, things are much easier. Unfortunately, I don't have any experience deploying Rails on Windows servers. I can, however, tell you about deploying on Linux.

The simplest setup is probably a Linux (or BSD machine) running Apache and Phusion Passenger. Apache should be installed by default on most Linux servers, and Passenger has a nice command-line installation tool.

For a database, I generally use MySQL, though PostgreSQL might be more suitable if you do lots of really complex queries. Again, MySQL will be installed on most Linux servers.

As for your actual deployment process, I'd recommend using Capistrano. This allows you to push updated code to your server with a single command, update your database as necessary, and even revert to an older version of your code if something goes wrong.

The advantage of deploying on Windows is that you already understand it. The advantage to deploying on Linux is that lots of people are familiar with that setup, and will be able to help you past the most common problems. If you do decide to deploy on Windows, I'd make sure that you find a good support community to answer your questions. (The more you deviate from a typical Rails setup, the more you need to know to make things work. So even if you don't end up going with the biggest crowd, it helps to find a smaller crowd and follow them.)

emk
+1  A: 

Deploying to Windows is certainly possible, but the tool support is not nearly as good as for Unix style operating systems.

There is an entire chapter about Windows deployments on the book "Deploying Rails Applications: A Step-by-Step Guide" by Ezra Zygmuntowicz, Bruce Tate, and Clinton Begin . See also "Deployment Strategies for Rails on Windows servers" articles by Brian Hogan.

Antti Tarvainen
+1  A: 

You can develop Ruby/Rails applications on your PC right out of the box without any additional installation tools necessary beyond Ruby, Rails, Ruby Gems, and SQLite on the PC. You don't even need a web server because script/server will get the job done for you (an implementation of a development web server in Ruby).

The deployment question is trickier but Rails is fairly mature in this regard you have both Capistrano and Phusion as options.

While a Windows deployment is possible, if you plan to host the application on the Internet you are either going to be deploying to virtualization environments (http://www.morphexchange.com, www.herkugarden.com, www.heroku.com, etc) or you will be dealing with Linux-based virtual hosts or Linux-based shared hosts. The development environment actually integrates with your deployment environment agnostically if you use Capistrano or Phusion.

Practically speaking, I've had the most stable development environment on *NIX based systems. Occasionally I run into the issue of a gem misbehaving depending on platform. Since most of my work is deployed to the Internet, it just makes more sense that my development environment is as close to possible as my deployment environment.

If your intention is stick with Windows, then you would be better served using the same platform for both deployment and development.

hyuan
I'll be deploying to intranets, and my clients won't install any server operating system. That's why I'll be using Win XP or Vista. Thank you for your answer.
eKek0