Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just recently learnt ruby on rails using ruby 1.9.2 and rails 3 using Michael Hartl's tutorial. I'm making an application which I wanted to host on my preexisting server. However, I found that they still do not support rails 3 as it breaks compatibility with mongrel.

My question is: How difficult will it be to port my whole Rails 3 app onto Rails 2 if need be? Keep in mind that although I understand rails 3 quite well by now, I have never used rails 2 and do not have any idea of the differences between them.

share|improve this question
I've been through a similar situation recently, althought not with RoR. Downgrading is a painful work, it will lead to many problems and many errors, some of which cannot be foreseen. I was ultimately forced to do the downgrade, but not without a hard fight trying to move to a platform that supported the actual version instead of the outdated one. My advice is fire every bullet you have until you're 101% sure that the downgrade is a must. – Matteo Mosca Jul 28 '11 at 10:59
Migrating servers might be less painful. – yfeldblum Jul 28 '11 at 12:58
It seems to me if you value your time at any level at or above minimum wage, you'd save more money by choosing a more flexible hosting provider. – JasonTrue Sep 26 '11 at 16:46

Difficult to say without seeing the code. But chances are, that large parts of the code need to be rewritten and adjusted. The ActiveRecord finders work different, many helpers have differences at least in details how attributes are used. Gems are handled different, routing is different...

Have a look at the Rails 3 release notes

I would not want to do this work.

share|improve this answer

Unless it's a small app covered with tests, it's gonna be pain in the a**. Also note that almost nobody does this, so when you run into some problem while porting, you will have to figure the solution on your own - Google won't be of much help here.

Basic principles are similar in Rails 2 and 3, but I bet there'll be tons of little differences (different method attributes, configuration parameters...). Although you probably could use the tutorials for porting Rails 2 -> 3, the other way than they were intended :).

As for the hosting, Mongrel was widely used for hosting Rails apps years ago, but times have changed and there are much better choices available nowadays. Apache + Passenger is more or less standard. If I were you, I'd try to move from Mongrel to another web server with supports Rails 3 (jeez, it's been out for a year!).

share|improve this answer
That last statement made me smile, a lot. Easier to change server, and jeez it's been out for a year. Couldn't agree more. Had the same situation with .Net4/Mvc3, I was forced to downgrade to 3.5/Mvc2 because changing server was not an option. As for why it was not an option, some explanations were given, all related to commercial stuff or trust or relationship with the provider, but none of these really made sense to me. Spending even 400/500€ rent for a new server wasn't sure as high as all the developer time they had to spend to convert the product, getting something worse nonetheless. – Matteo Mosca Jul 28 '11 at 16:17

Maybe you should consider another server or if you control it upgrading the mongrel there or switching to Passenger or something along those lines. It will be faster and less overall work.

Another alternative is to host it on Heroku or another hosting service.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.