Rails 3.0 - Production Server Setup

Hello all,

I am incredibly excited about Rails 3.0 and we will be using it for some products in the very near future. The problem is, we are currently using Debian for our development/production environments and they don't have very good support for Rails 3.0 (yet).

Now, I love Debian because it's incredibly stable, easy to use, tons of support, etc. However, I am willing to use a different server for development/production of any Rails 3.0 apps.

So, are many people going to use Debian with Rails 3.0? If so, could you point me to some articles on best practices, setup guides, etc. If not, what distro would be best? Anybody know what the guys at 37signals use?

Thanks very much!

what about ubuntu linux?

what do you mean with "they don't have very good support for Rails 3.0" ?

just edit your Gemfile, add "gem 'rails', '3.0.0'" and run bundle install.

Try rvm. It can be used to store and manage multiple versions ruby and gems into your home directory under .rvm. It works like this:

http://rvm.beginrescueend.com/rvm/install/

# install rvm $ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) # modify your .bash_profile and .bashrc per the instructions output from above command # have rvm install ruby 1.9.2 $ rvm install 1.9.2 # tell rvm you want to use 1.9.2 $ rvm 1.9.2 # confirm your using the right version $ which gem /home/username/.rvm/rubies/ruby-1.9.2-p0/bin/gem # install rails 3 $ gem install rails --pre # give it a test run $ rails new my_new_project $ cd my_new_project $ bundle install

I am using RVM and I have tried simply updating my Gemfile to include Rails 3.0, however, there are some libraries that need to be upgraded in order for bundle install to execute properly.

I had to reset my machine back to a snapshot, so I can't get you the exact library that was having trouble, but I do believe it was something with SQLite3.

The problem lies in using gems which I can keep up-to-date, but using apt which only applies security fixes in the stable branch of Debian. If the libraries upon which the gems depend are out of date, what is the accepted way of fixing that? Should I manually download all of the libraries and their required dependencies or should I just use the testing branch of Debian on a production server?

Regarding Ubuntu Linux: Ubuntu is based off of Debian; do they stay more up-to-date than the stable branch? If so, I would certainly give it a try, but I was under the impression that they had many of the same problems as Debian (with regards to Rails 3).

Thanks for your responses, I appreciate the help very much.

Yes, Ubuntu generally stays more up-to date than Debian in my experience.

Brad

And as a result, Debian remains more stable than Ubuntu.

I use them both. I use Debian on my servers where I need stability the most, and I use Ubuntu on my desktops where I want (not need) more "shiny and new" and can afford occasional downtime to fix things when they break.

Greg Donald wrote:

Yes, Ubuntu generally stays more up-to date than Debian in my experience.

And as a result, Debian remains more stable than Ubuntu.

I use them both. I use Debian on my servers where I need stability the most, and I use Ubuntu on my desktops where I want (not need) more "shiny and new" and can afford occasional downtime to fix things when they break.

Interesting. When I chose between Debian and Ubuntu about 4 years ago, part of my reason for choosing Ubuntu was reading that Ubuntu's package management was *more conservative* than Ubuntu's, and that as a result Ubuntu packages were *more stable* than Debian packages. Did something change in those 4 years?

(I've used both Debian and Ubuntu in that time and not noticed much difference.)

-- Greg Donald destiney.com | gregdonald.com

Best,

Well.. in the 12 years I've been using Debian, it has never once left me with an un-bootable system. The software is frozen for several months before a stable distro is released, and then updates only contain security fixes, not new features. The only thing I've ever found more stable than Debian is BSD, FreeBSD in particular has been rock solid for me over the years. I usually use FreeBSD (or OpenBSD if my hardware supports it) for my firewall servers where I don't even trust Linux.

Ubuntu provides me with bleeding edge new versions of everything, just like you would want for a modern desktop, but in turn has left me with an un-bootable system many times. Their recent choice to go ahead with Grub 2.0, for example, took down 5 developer machines where I work a few months back.. and that was the 10.04 LTS distro that is supposed to be long-term stable.

I've never once had to "fix" a Debian system after performing updates. Ubuntu I've fixed more times that I can count.

I'm sure everyone's experience varies, but mine has been that Ubuntu has much newer versions, and as a result is less stable than Debian overall.

Thanks so much for all of your comments and thoughts. I have personally decided that I will continue to use Debian as my development and production servers due to it's stability. Since I'm sticking with Debian, I decided to write down my process of installing Rails 3 on Debian and all of the small gotchas that I ran into and turn it into a blog post. For my particular application (which is very basic and only has some tests written so far), I ran into two major problems installing the gems when using bundler: 1) SQLite3 was out of date and 2) Nokogiri needed some dependencies installed. So, below you'll find my writeup of what I *think* is the proper way to install Rails 3 on Debian Lenny.

I would love some feedback, so if you see anything that looks odd (or just doesn't work on your system...mine isn't quite stock), please let me know and I'll update my guide.

http://www.fangiotophia.com/journal/2010/8/31/random-act-of-stupidity-6-debian-rails-3-setup-guide.html

Thanks again for your responses to my question, there were very helpful in my decision making.

Topher