What is so hard about Rails deployment?

Recently there has been a lot of fuss about the ease of Rails
deployment. People made various claims, such as "I've deployed PHP,
Java, (insert something else here) and Rails. Rails is by far the most
painful." and "Java deployment (with Tomcat) is easier."

I have no experience with Java deployment. But I have a friend who has
worked on several high-end software systems written in J2EE. He says
that deploying J2EE apps involves creating a .war file and uploading
that to the web container (Tomcat). While uploading is easy, creating
the .war file is not, and involves editing tons of XML configuration
files.

PHP deployment is easy:
1. Upload files to server.
2. There is no step 2. (assuming we don't have to setup the database;
but that's app-dependent)

People say Rails deployment is painful, but I really don't understand
what's so painful about it:
1. Upload files to server.
2. Setup Mongrel (or lighttpd) on a port.
3. Setup your web server to proxy a virtual host's request to Mongrel/
lighttpd.
It has 2 more steps than PHP, but neither steps are hard. (2) can be
done with 1 command. (3) is just copy-pasting some configuration
snippets and changing the port numbers.

Granted, it took me a while to figure this out. Back in 2005,
deployment documentation was quite bad. I expected to be able to
integrate Rails into Apache, only to find out that there is no
mod_rubyonrails, and that FastCGI on Apache is broken (at least, it
was on Fedora 4 with Apache 2). After lots of Googling I eventually
settled with lighttpd, and the thing Just Worked(tm). Today, we have
tons of books about Rails deployment.
And I agree, this setup is not usable for shared hosts, who hosts many
many websites on a server. Keeping the Mongrel instances running will
require far too much memory. But I still do not understand why people
claim that Rails deployment, in general, is hard.

I'd like to hear from you why exactly you think Rails deployment is
painful, or (if applicable) why it is by far the most painful compared
to anything else you've tried.

Personally I agree with you, deploying is not hard, but it is really
annoying that shared hosts cannot seem to reliably run ruby like they
can php(lets not confuse frameworks for languages).
I do understand that rails runs better on a VPS, hell it should,
anything should run better on a VPS then on a shared system, but
sometimes we just aren't building a site that is that large, that it
should require a VPS to run. Also I do get really tired of micro
managing all the VPS's for little clients I've done work for, it's
really annoying, and is the main reason I'd like to see Ruby running
like php does, with a mod_ruby. There is a mod_ruby, but it shares
classes, and hence is no good for shared hosting environments, which
kinda defeats the purpose.
I don't even know if rails as a framework is what we should be looking
at for these smaller sites, I mean Camping is great, as is Sinatra
amongst others. Plus Ruby does make it might easy to roll your own if
it's something small.
The issue for me is the dependence on mongrel for even small
applications. I love mongrel it rocks and I use it for everything, but
if I got a site with like 2 forms and couple of pages that pull small
data sets from MySQL what the hell am I using a stack like rails for,
and why am I running a VPS?

Anyhow just putting it out there, I'm not bitching about Rails, 'cause
I love it, it's got it's place, but I'd love to be able to use Ruby
for absolutely everything, and the only thing stopping me is the lack
of support for ruby from shared hosts. And from what I can glean that
is due to mod_ruby and it's issues with shared environments.

I don't really know what is easier. All I can tell you is that
whenever I upload my Rails proyects to Dreamhost they start breaking
nobody-know-where.
Random Application Error. Its because of the fastcgi. I try many
configurations but they all break sooner or later!

Yup my(and many others) point exactly. In fact the dreamhost guys have
been one of many people blogging about the difficulty of dealing with
rails in a shared environment.

There's a fundamental difference between hosting a PHP app and a Rails
app: the Rails app, because of its relatively large size when the
framework code is included, needs to stay resident in memory inbetween
requests, whereas a PHP app can typically be loaded from scratch for
each request. This means that Rails requires more server resources,
and that doesn't fit well with shared hosting.

If you want a $9/month hosting account, Rails is harder. Cheap Rails
hosting tends to be problematic. If your app is important enough to
justify a VPS, then the problems are relatively few. This does leave
some apps with little economic value as problematic for Rails hosting.

Michael

Yeah, it is all about the shared hosts. It's pretty darn easy to setup
Rails in a virtual or dedicated server... but not necessary for the
people just starting out with RoR. Perhaps I should start a website
(built on rails, lol) to explain to people step-by step how to get
Rails working with each shared host...

For example, I use GoDaddy. They work GREAT. But absolutely none of
the tutorials told me that I could not freeze to any Rails version
above 1.2.6 because GoDaddy doesn't support "gem" just "require_gem".
And very few of them even told me where or what to freeze, lol.
Thankfully god must have given me the answers.

-Ryan

It is harder than PHP, especially when you factor in mongrels die, or memory leak often and need to be restarted. Java is still a bitch to deploy imho.

When you jump into the whole apache/mongrel/pound/monit voodo it does begin to become a little overwhelming for new developers.

Hopefully some projects like swiftiply and rubinius will go a long way to alleviate these problems.

Everything is relative.

Imagine way back when you didn't know PHP. Putting a new PHP app out
there was "hard" then, was it not? Making sure your host had the
latest PHPLib so you could have sessions, remember that? I recall
trying to find a web host that would even host PHP. Perl/CGI was all
that was available at the time, no one really wanted to mess with PHP
hosting. See any similarities with Rails today?

Michael Slater wrote:

There's a fundamental difference between hosting a PHP app and a Rails
app: the Rails app, because of its relatively large size when the
framework code is included, needs to stay resident in memory inbetween
requests, whereas a PHP app can typically be loaded from scratch for
each request. This means that Rails requires more server resources,
and that doesn't fit well with shared hosting.

If you want a $9/month hosting account, Rails is harder. Cheap Rails
hosting tends to be problematic. If your app is important enough to
justify a VPS, then the problems are relatively few. This does leave
some apps with little economic value as problematic for Rails hosting.

Michael
  
I find that the cheap plans at RailsPlayground and more importantly, HostingRails (at about US$5) work well enough for small sites. I've got a Radiant site deployed using FastCGI and it works well enough for the hits that I get.

Cheers
Mohit.