« How to drive more traffic to your website? | Home | Setting up a Ruby on Rails server - Part 2 - install Ruby, Rubygems and Rails »

Setting up a Ruby on Rails server - Part 1

By Nick | March 22, 2007

Developing in Ruby on Rails is easy, but making your application available to the world is a little bit harder. I have managed to do it and many others have and you can find good tutorials all over the internet. I will also try to share my experience with you. And if somebody finds it useful, I’ll be happy.

First thing you need to consider is what type of hosting you are looking for: shared hosting, virtual private server or dedicated server. Which type you choose depends on your specific needs. When you have decided on the type, you can look for a good host. A good starting point is off course my own Rails Hosting Info site.

I have settled on a dedicated server, mainly because it gives me full control over everything (except the occasional outages, due to power or hardware failures). It was also because I needed Java, Ruby on Rails and a bit more RAM (the most I could squeeze out of my tiny budget). The biggest problem was that I didn’t really had that much experience with installing a complete box from scratch. So two weeks went into setting up a virtual environment on my PC (I used the free version of VMWare) and then roll the whole thing out in a couple of days. In the process I learned a lot, so it was a fun experience and having a dedicated server is a nice feeling. You want to start a new project? Just register a new domain name, setup a vhost and you’re off.

My dedicated server has an AMD Sempron 2400+ processer and 1GB of RAM and currently hosts 4 separate domains.

Choosing the operating system was a bit difficult. You have a lot of options Windows, Linux, BSD or even Mac. Windows and Mac weren’t really an option, because they aren’t free. My first option was OpenBSD or FreeBSD, but there were some problems with Java or so it seemed. And since Java was a must, I had to look at Linux. Biggest problem with Linux these days is that there are so many flavors. For example: Debian, Red Hat, CentOS, Ubuntu, … Luckily the hosting company I choose only supports two flavors: Centos and Debian. I first wanted to use Debian, since I already had some experience with it. But the packages were a bit outdated and there was a major release (Edge) pending, but it had some delay. So CentOS it was. CentOS is based on Red Hat Enterprise Linux, but contrary to RHEL it is free. What I learned from experimenting with two different Linux versions is that it doesn’t really matter which Linux version you choose, they are capable enough to do the job. So choose the one you are most comfortable with.

In the next couple of posts I will turn my attention to:

You will notice that I often take the path of least resistance. If it is to difficult to setup, I’ll look elsewhere. And trust me not everything was as easy as I initially thought.

Topics: Uncategorized |