Ruby on Rails deployment requirements

14,231

Solution 1

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.)

Solution 2

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.

Solution 3

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.

Share:
14,231
eKek0
Author by

eKek0

I'm a software developer living in Santiago del Estero, one of the smallest towns in Argentina. I'm also a system analyst, and program in Delphi and ASP.NET with C#. Currently, I'm working in a bank developing in-house software.

Updated on June 04, 2022

Comments

  • eKek0
    eKek0 about 2 years

    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?

  • eKek0
    eKek0 over 15 years
    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.
  • kleopatra
    kleopatra almost 9 years
    hmm .. spreading a reference to a book across the site might be considered ... spam. Please don't!
  • Alex Tamoykin
    Alex Tamoykin almost 5 years
    @kleopatra, agree, a link to buy a book is spam, the one I shared is free to read online. Which is no different from sharing a blog post with some useful resources.